Searching Comment Fields

John Forgan June 20, 2011

Hi,

Using Jira 4.0

I'm trying to find all issues that don't contain a search string in the Comment field, and am using comment !~ "my text". However this only returns issues that have a comment, and that comment doesn't contain the text. Issues who's comment field is empty are not returned.

Unfortunately "comment IS EMPTY" isn't supported.

Any tips on how to manage this?

Thanks

John

2 answers

2 votes
justindowning
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2011

Sure, use the JIRA Toolkit Plugin. Create a new field with field type "Number of comments" and apply the it to your configuration scheme. Then, run a JQL query like this:

comment !~ "my text" AND "Number of Comments" = 0

That should show you issues where there is at least one comment and none of the comments contain the "my text" string.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2011
Good idea!
0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2011

You are right, comment is empty is not supported.

Sounds like a good user story for a plugin like the JQL tricks plugin. You can write a new JQL Function or a maye be even report for this.

Suggest an answer

Log in or Sign up to answer