JQL: Last comment is not from assignee

Sean Roberts June 18, 2020

Our users want to see issues where last comment is not from the assignee. This helps with identifying issues that need attention as workflows do not cover all scenarios.

I've found this function but not been able to use `assignee` with it:

issuefunction in lastComment(...)


8 answers

1 vote
Kathy Barton
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2020

I'm looking for the same thing. We require developers to add comments every day so I need to be able to check to see if there is a comment from the last day AND if that comment is by the assignee. Please consider adding this feature. 

1 vote
stefantinger July 15, 2020

Question is only one month old and i am looking exactly for the same now ^^
Would be really interesting if it is somehow possible.

Otherwise I probably need to open a feature request...

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 18, 2020

You would need to write a JQL function for that - the standard functions of JQL look only at the field data, they don't look at attributes of the data (the author of a comment is not the main point of the comment)

0 votes
Myesha May 19, 2024
Howdy from Texas! My name is Myesha and I am excited to answer this question! I am a Kanban Lead for 4 Kanban teams and had this exact same challenge. My organization does not allow me to use any plugins or ScriptRunner so I had to find a solution with out of the box Jira. I was able to solve it by creating a custom date field, setting up an automation and then creating a JQL query based on the new custom field. 

Assignee Last Comment Automation Rule.png

To achieve the functionality of tracking when the last comment was made by an assignee on a JIRA ticket, you can follow these steps:

1. **Create a Custom Date Field:** Begin by creating a custom date field named something like "Assignee Last Comment Date." This field will store the date of the last comment made by the ticket assignee.

2. **Trigger:** Configure the automation to trigger whenever a new comment is added to an issue.

Rule is run when a new comment is added to an issue.png

3. **Add a smart values condition:** Add a condition to check if the `Assignee Name` equals the `Comment Author's Display Name`.


Compare 2 values using smart values and regular expressions.png

4. **Edit Issue:** If the condition is true (meaning the assignee made the comment), update the "Assignee Last Comment Date" custom field with the current date.

Set the custom field to todays date.png
5. **Create a JQL Query for Reporting:**
   - Use a JQL query to identify tickets where the "Assignee Last Comment Date" is older than your team's agreed-upon update frequency (e.g., more than 1, 2, or 3 days). Here’s an example of such a query:
statusCategory = "In Progress" AND "Assignee Last Comment Date" <StartOfDay(-3)
This will show you all tickets in progress where the assignee has not commented in the last three days.

This setup will allow you to efficiently monitor and ensure that all tickets are updated as per team expectations without having to manually check each one.

Please note that while this automation rule will effectively track comments made by assignees from the moment it is set up, it does not retroactively apply to tickets with comments made before the rule was implemented. This means that any tickets that needed updates prior to the implementation will not be automatically flagged by this rule. For those, you might need to manually review or set up a temporary measure to ensure they meet the team's commenting expectations until they receive new comments under the new system. This automation is primarily beneficial on a go-forward basis, helping to maintain regular updates moving forward.

Hope this helps!
0 votes
Dominick Willis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2022

A little late to the party, but I thought I'd contribute anyway as I sank a *lot* of time into researching this very thing a while back for searching tickets assigned to my team that needed an update.

I was able to get a workable set of results using the ScriptRunner 'Expression calculator ' function:

issueFunction in expression("(statusCategory not in (Done)) AND filter=10502", "customfield_10600 != assignee") OR statusCategory not in (Done) AND filter = 10502 AND cf[10600] is EMPTY

Filter 10502 is just my filter for narrowing down to ticket specific to my team and custom field 10600 is our field ID for the 'Last Commenter' field. So this is searching for open (not Done) tickets assigned to my team where the Last Commenter is not the Assignee. There's a second clause to account for tickets assigned to the team which have had 'no' comment, as that isn't covered by the expression function.

I hope this is useful for you.

0 votes
stefantinger July 27, 2021

Just for completion, i resolved it that way:
As we already using ScriptRunner, i created a Script Field (Template 'Number Field') and used the following script

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue

def commentManager = ComponentAccessor.getCommentManager()
def lastComment = commentManager.getLastComment(issue)

if (lastComment != null && issue.getAssignee().getUsername().equals(lastComment.getAuthorApplicationUser().getUsername()))
return 1

return 0

 Now i can just check the field if the last comment is from the assignee or not.

0 votes
Artem_Danylkov_SaaSJet_ June 23, 2020

Hello Sean,

It's hard to find last comment is not from the assignee in JQL function, so i recommend you our addon Issue History. It help you to monitor all changes made with issues, including history of adding comments.

To get this data you need to choose comment field at the column manager.

You can also select a list of issues with comments written by the specific user you are interested in.

Best regards


Sean Roberts June 24, 2020

Thanks for the tip. But we have a big Jira installation so the cost would be prohibitive.

It's expected by the users that such filtering should be native.

Artem_Danylkov_SaaSJet_ July 2, 2020

Hello Sean,

If this can solve your problem then I would recommend the lite version of our app Issue History Lite it has main functionality of the application, but is much cheaper.

Hope it helps


0 votes
Pavel Junek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 18, 2020

Hi Sean,

You can look to Adaptavist Script Runner Documentation.

You can try this:

project = "XX" and issueFunction in lastComment("by pavel.junek")



Sean Roberts June 18, 2020

Pavel - We already use that function, though typically with `currentUser()`. However, we want to filter on `lastComment(assignee)` but it doesn't seem to be available as an option.

Pavel Junek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 18, 2020

Ah, so in this case, I'm afraid that's not really the possibility here.

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events