Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Ticket search for recent ticket comments (JQL)

Bill Parlock September 2, 2022

I am trying to do search for tickets that have not been commented on in the current month. I managed the JQL for that. The challenge is I need to do the search, ignoring any comment from a certain user (management aka "UserA").  So a ticket might have 2 comments, the last comment by "UserA" and previous to that from someone else, I would like to ignore the "UserA" comment and and determine if the previous comment was made before the current month.

I do not have any additional JQL plugins from the marketplace.

Here is my current JQL I have been working on:

 PROJECT = "MyProject" and  ( issueFunction not in commented("by UserA")  and (issueFunction in lastComment('before startOfMonth()' ) )

Any suggestions would be welcome. I am not sure this can be done.

2 answers

2 accepted

0 votes
Answer accepted
Bill Parlock September 12, 2022

Thank you for your help and suggestion to contact Scriptrunner. Here is the final JQL:

issueFunction not in commented("by UserA") AND issueFunction in lastComment("before -4W") AND project = "MyProject "

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 12, 2022

@Bill Parlock -

I am glad that my suggestion helped you at the end.  Please also click on Answer accepted on my original postings when you have a chance.

Best, Joseph

jun lee November 23, 2022

Hi

 

I used jql as like issueFunction in commented('by username'), but some issues are included in queary result.  For example, person A commneted to jira issue #1, 2, 3, 4, 5 but the results of the inquiry are only included in 1, 2, and 3.

 

Do you know why?

0 votes
Answer accepted
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2022

@Bill Parlock -

It looks like you are using ScriptRunner for Jira.  Take a look at the at this vendor link which I am sure you already did - https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/comments

Try something like -

project = MyProject and issueFunction not in commented("after -4w by UserA")

This should give you the result of finding issues commented not by UserA within the last 4 weeks.

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Bill Parlock September 2, 2022

Thank you. I will give it a try.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2022

@Bill Parlock -

Keep me posted of your testing result.  If my suggestion helped you, please click on Accept answer when you have a chance.

Best, Joseph

Bill Parlock September 2, 2022

The results will give me any issues not commented by UserA in the last 4 weeks. This is part of what I am looking for. So in addition, I am looking for issues with no comments for the last 4 weeks. So basically I am looking to exclude any comments by UserA, and then determine the tickets that have not been commented on in the last 4 weeks.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2022

@Bill Parlock -

The following JQL may work for you -

project = MyProject AND issueFunction not in commented("after -4w by UserA") AND issueFunction in hasComments(0)

Hope this helps.

Best, Joseph

Bill Parlock September 6, 2022

So I have been working with this suggestion. As written, this will only return tickets that have never been commented on. I am looking for tickets that have not been commented on in the last month. I am continuing to work with the JQL (changing slightly what I am looking for , to make testing easier. ie. return tickets with multiple comments, but not from UserA). But it seems I can only get the first AND statement working because once the comment from UserA is ignored, any other comments on that ticket are also ignored) . So if I have a comment from UserA, and a comment from myself 'Bill' on the same ticket, then my comment is not recognized. 

Thank you for your assistance.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2022

@Bill Parlock -

Can you share with me your latest JQL?

Another suggestion for you is for you to contact Scriptrunner for Jira vender (Adaptavist) for further suggestion.  I know that in the past, they are extremely responsive and provide possible solution as long as you give them exactly what you want to achieve. 

Please share with me of their suggestion if you can.

Best, Joseph 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.13.18
TAGS
AUG Leaders

Atlassian Community Events