Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL required for automation rule.

sravani vennapusa
December 2, 2025

We are trying to create an automation rule that will send an email to the reporter and assignee, if the reporter has not commented on the work item for more than 7 days. Can someone please suggest the JQL for creating an automation rule.

2 answers

3 votes
Trudy Claspill
Community Champion
December 2, 2025

Hello @sravani vennapusa 

If you have only native JQL capabilities there is not a method to create a JQL that selects issues based on the date and author of comments.

What you might want to consider is adding a custom field called "Date of last comment by Reporter". You could use an Automation Rule triggered by the addition of a comment to check if the comment author was the Reporter and then update that custom date field.

You could then have a separate rule that includes a JQL to check that custom date field for issues where the date is more than 7 days in the past.

 

There may be third party apps that extend JQL capabilities that might enable you to create the JQL filter you want. Are you open to considering an app?

sravani vennapusa
December 2, 2025

Can we combine a JQL with the condition . If yes what will be the condition?

Trudy Claspill
Community Champion
December 3, 2025

There are no native JQL features to select issues based on comment author or comment dates. The only native JQL feature related to comments is to search for comments based on the content of the comment. Reference:

https://support.atlassian.com/jira-software-cloud/docs/jql-fields/#Comment

You would have to find other criteria to use to select the issues.

Then for each issue you would have to iterate over the comments, evaluating them to see if the author was the reporter and what the date of the comment was.

There was a discussion on such a solution in this post:

https://community.atlassian.com/forums/Jira-Service-Management/Iterate-comments-on-a-list-of-issues/qaq-p/3071645

Like Bill Sheboy likes this
0 votes
Bill Sheboy
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 Champions.
December 3, 2025

Hi @sravani vennapusa 

As @Trudy Claspill clearly described, there are no built-in JQL features for a search by the comment author and date created.  Thus, either a marketplace app to extend JQL features or a custom field with automation rule would be needed.

There is an edge-case where a single automation rule can do this using dynamic list searching methods.  This approach requires there have been fewer than 100 comments within the timeframe you want to check / scan for any comments from the Reporter.  A general outline, as described in that article and the post linked-to by Trudy, would be:

  1. for a work item with comments
  2. "flatten" the most recent 100 comments into a Created Variable, saving the author's accountId and the created date / time into a delimited list
  3. with another Created Variable, make a dynamic regular expression to find entries from the Reporter
  4. use the #3 regex with the #2 list to match() and find the maximum (i.e., latest date / time) for a reporter's comments
  5. perform your condition test

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events