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

How to find issues which does not have a comment

Hiro Kimura Nov 08, 2012


I'd like to find issues which does not have any comment.

I see JQL does not support 'EMPTY' keyword for comment field, so I created a following query to find it since all our comments have a "foo" if it's specified.

comment !~ "foo"

However, the result from the query contains the word 'foo'.

Could you please tell me what was wrong in the query above? or anything good to find the item which does not have any comment?



4 answers

1 accepted

0 votes
Answer accepted
Nic Brough [Adaptavist] Community Leader Nov 08, 2012

I cheated - there's a plugin somewhere that adds some counter fields to Jira - one of them is "number of comments", so you can say "number of comments > 0" in your searches. I really should dig it out...

Oops - I mean "number of comments = 0" for issues with no comments...

Hiro Kimura Nov 12, 2012

I think the name of the plug-in is "JIRA Toolkit Plugin". I installed it and created a "Comments count" field. By specifying the "Comments count = 0" seems not working. but I can use the field to sort the issues, which means I can find the no commented issues easily.

1 vote
Kramarics György Nov 08, 2012

Hi Hiro!

If you have groovy runner plugin, you can write a script. Maybe in a scripted field, where you can get the contetn of the comment filed. If you have the value you can check if it is empty. The return value of the field is searchable.


Hiro Kimura Nov 12, 2012

I have the groovy runner in my server, but it's a little difficult to me to write a script. Sorry.

Thanks anyway for your advice.

1 vote
UoS Web Team Nov 08, 2012

When you comment on an issue the Updated field is set. Therefore you could use the issue search facility (in simple mode) and set

Updated to: -1m

This will search for all issues that haven't been updated upto the last minute. A bit cluncky but one way of doing it.

However, the more elegant way is to use the JIRA Charting Plugin which can do this for you. It does require a bit of setting up (see about half way down this page), but you can access a First Response Date type field in the issue search facility. Note: This will only return the timestamp of a comment which has been made by anyone other than the reporter.

Not a direct solution, I know, but hope it helps anyway.

Hiro Kimura Nov 12, 2012

I tried both of them.

About the 'Updated' solution, I couldn't get the right result. I still don't know why, but the query returns issues which has a comment. I tried to/from and other convinations but no luck.

About the 'JIRA Charting Plugin', I couldn't get the result as I expected either. The reason I guess is the reporter of the most issues are myself.

0 votes
Andy Brook (DEV) Nov 08, 2012

Nothing is wrong with the query. Its just limited to finding where comments arent like the value given, it isn't currently syntactically capable of checking for null/empty values, Gyuri is also right, a script /real code is the only way to extract that particular information.

JamieA Nov 08, 2012

Tut tut, as though a script is not "real code" !

Andy Brook (DEV) Nov 08, 2012

ARF, meant script or real plugin code, packaged, versioned, source controlled, scripted stuff is fine in small quantities, depends etc.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira

Try Jira Cloud for Outlook: Organize your work without leaving your inbox

Hi Atlassian community, My name is Max and I work on the product integration team at Atlassian. I am pleased to announce the early access program for the Jira Cloud add-in for Outlook. This add-in...

1,636 views 3 15
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