Jira Advanced Query for searching text in a comment field in a ticket does not appear to work.

How can I get this query to work for my team? Comment!~ "success couponscom-integration"

I trying to display only tickets that do not have the comment 'success couponscom-integration'

Using Comment ~ seems to work just fine but the Comment!~ does not appear to catch it all. I'd like to use this on my rapidboard to see which stories and bugs have not been merged to integration or release.

3 answers

This widget could not be displayed.
Andy Nguyen Atlassian Team Jan 03, 2014

Hi Steve,

If you search by comment, the JQL query will only search for those issues which have been commented on, which means that all the issues without comments will be ignored.

And please note that the query comment !~ 'success couponscom-integration' is not a negation of comment ~ 'success couponscom-integration'. For example, if an issue has 2 comments, 1 with the phrase 'success couponscom-integration' and 1 without, both of the above queries will include this issue in the search result, because:

  • the ~ operator matches the comment which contains the phrase
  • the !~ operator matches the comment which does not contain the phrase

My suggestion in this case is to try installing JIRA Toolkit plugin. It provides several custom fields that may help you extend your JQL. These potentially useful custom fields include:

  • last commented by
  • days since last comment
  • last public comment date
  • number of comments

All the best,

Andy

You are correct Andy, so a solution would be to create a filter that shows issue which contains "success couponscom-integration" and then simply negate that filter

Filter1 is: comment ~ "\"success couponscom-integration\""

and then use

not filter = filter1

Andy Nguyen Atlassian Team Jan 11, 2014

Hi Udo,

Have you tested this on your side? I'm afraid this will cause a cyclical reference error owing to the nature of comment field to search for all comments in every issue (as I mentioned earlier ~ cannot negate !~). For more information, kindly have a look at this: Non-consistent cyclical reference handling in JQL.

Cheers,

Andy

Hi Andy,

yes, it is working.

Cheers, Udo

This widget could not be displayed.

Have you tried

comment !~ "\success couponscom-integration\""

Since you are searching for a phrase see also https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-Comments

thanks all for the replies. I'll try these and see what we get.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

167 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you