Looking for a JQL query to identify a user's comments within a comment created date range.

Jonathan Smith
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.
October 16, 2024

Hello all,

I have a business user who is looking to build a JQL with the following requirements:

  • For comments created/modified within a date range (not issue created)
  • For a specific user (comment by, not assignee)
  • Show those issues.

I used copilot and Atlassian AI to try and figure this out but nothing is working properly. Is this JQL possible with the available comment fields?

Thanks,

Jonathan

 

1 answer

1 accepted

4 votes
Answer accepted
Samuel Gatica (ServiceRocket)
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2024

Hi @Jonathan Smith 

This is not possible via standard Jira - but an app which enhances JQL search functions will be able to do this, such as Scriptrunner.

Here are some example: JQL Keywords 

lastCommentedDate

The lastCommentedDate keyword can be used to search for issues based on the date of most recent comment.

assignee = currentUser() AND lastCommentedDate < startOfMonth()

status = 'In Progress' AND lastCommentedDate = '2016-10-14'

This keyword can be used with the JQL relative date functions and also the numeric comparison operators.

commentedOn

This keyword can be used to find issues that had a comment made on them on a particular date.

commentedOn = '2016-02-14' AND project = VALENTINE
project = APOLLO AND assignee = narmstrong AND commentedOn in ('1969-07-20', '1969-07-21')

The commentedOn keyword can be used with the following operators: in, not in, != AND =

commentedBy

The commentedBy keyword can be used to search for issues that have comments on them made by a particular user. You must specify a username:

reporter = currentUser() AND commentedBy = 'jsmith'

This keyword can be used with the following operators: in, not in, != AND =

 

lastCommentBy

This keyword can be used to search for issues based on the user who made the most recent comment. You must provide a username:

reporter = 'jsmith' AND lastCommentBy = currentUser()

assignee = currentUser() AND lastCommentBy in ('jbond', 'jbauer')

This keyword can be used with the following operators: =, !=, in and not in

 

Best regards

Sam

Jonathan Smith
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.
October 16, 2024

Sam,

Thank you for the feedback!

Jon

Suggest an answer

Log in or Sign up to answer