Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Searching Issues where comment field does not include text

I am working on JIRA Cloud and would like to get a list of records where a certain comment does not appear.

This works perfectly when the JQL is comment ~ "String" but the opposite does not.  I have tried using comment !~ "String" or NOT (comment ~ "String") also single quotes around String.

Lastly, the String = Baseline so it does not have any special characters.

Many thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted

Hi @Maria Del Rosario Gonzalez 

the search for "comment !~ String" or "NOT (comment ~ String)" probably does not work because JQL checks if any other comment exists that does not contain the text.

Since JQL does not support subqueries / subselects in a direct way, the only solution I can think of is a little complicated.

  • select the issues containing the text in comment, e.g. comment ~ String
  • save this as a filter, e.g. "MyCommentFilter"
  • select all issues not in the filter by JQL like "filter not in (MyCommentFilter)"

Please make sure that after saving the filter in second step, reset the search form not to show the "MyCommentFilter" anymore, otherwise Jira will display an obscure error message about cyclic dependencies.



Thanks Harald, this worked!  Much appreciate the prompt response!!

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events