Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Filter for the existence of comments on issues

I would like to write a filter that will return any issues that have comments. The only option in JQL I've seen related to comments is the Tilde (~) which I believe indicates "contains."  However, I want to find all issues with comments, not just those, and I don't know how I can do that with ~ because I can't know what the comments might contain. I tried " ", but Jira didn't like the empty string operator.

Any ideas would be appreciated.

Thank you.

Michael Anderson

 

 

 

 

 

 

4 answers

Hi Michael,

JQL Search Extensions adds a bunch of keywords for comments. After installing the plugin you can then use the following JQL:

commentsCount > 0 

Full documentation is here.

I came up with the following workaround  - add the following as a part of your query:

(comment ~ "anything*" OR comment !~ "anything*")

Hello,

There are already some answers which might be interesting for you:

https://community.atlassian.com/t5/Jira-questions/How-to-find-issues-which-does-not-have-a-comment/qaq-p/402636

https://community.atlassian.com/t5/Jira-questions/How-to-search-for-JIRAs-which-have-no-comment/qaq-p/292185

Look for example at Jira Toolkit Plugin and create custom field 'Number of comments'. 

0 votes

Hello,

you could write such a filter if you have Adaptivist Scriptrunner installed. This plugin has "hasComments" JQL function. You can read more here about this function:

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_hascomments

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Partner Webinar Opportunities: January 2022

Hi everyone 👋, I really like the format of the webinar opportunities summary that @Jimmy Seddon posts monthly on the Welcome Centre group. It's a great place to go to check that you didn...

148 views 3 11
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you