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

1 vote
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,


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.



Hi Andy,

yes, it is working.

Cheers, Udo

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 Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

153 views 3 7
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot