How to search for JIRAs which have no comment?

Ben Hoi December 18, 2012

In "Advanced Query", "comment" does not support "is empty" and supports only ~ and !~.

I had the idea of excluding each vowel. I tried "comment !~ 'A'" but that did not exclude comments with 'A'. Maybe the search string needs to be longer?

Any idea? Is this a bug?

6 answers

8 votes
JamieA
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.
December 28, 2012

There is a function in the script runner plugin that can do this:

issueFunction not in hasComments()

or

issueFunction in hasComments(-1)

(ie, less than one comment).

4 votes
Thom Franklin April 23, 2019

All comments have "AM" and "PM" in them. 

This will show you all records with comments:

comment !~ '\"m" '

This will show you all records without comments.

comment ~ '\"m" '

Mark de Bont February 18, 2020

Both queries return issues with comments, not sure what goes wrong....

1 vote
Renjith Pillai
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.
December 24, 2012

For achieving the reverse, I was able to do this.

Install JIRA Tool Kit plugin and add a custom field of the type 'Number of Comments'

https://marketplace.atlassian.com/plugins/com.atlassian.jira.toolkit

Once done do a JQL search similar to below:

COMMCOUNT != "0"

This gives all issues with comments.

0 votes
Neeraj Tiwari June 16, 2013

Can we do a similar search for all issues that doesn't have description in a specific project? We recently transferred all our bugzilla tickets to JIRA and some of the tickets have no description in them. We are suspecting the description was not copied. In order to verify this we want to know how many issues actually doesn't have the description in them? Can anyone of you know how we can accomplish this in JIRA using Script Runner. We have the latest JIRA (6.0.1) and Script Runner installed currently.

0 votes
Theinvisibleman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 20, 2012

Hi,

As far as I know, this is not possible in JIRA currently. However, I agree that this can be a rather useful search feature. Hence, I have created a sub task for it here : https://jira.atlassian.com/browse/JRA-31057.

No worries, as the parent task of this sub-task is this : https://jira.atlassian.com/browse/JRA-23288 (List of suggested JQL improvements)

For now, I would recommend that you :

* Vote, so that it will receive more attention

* Watch it, so that you will receive any and all updates

* Comment, and give your opinion on the matter

Please note that the implementation of new features and improvement requests falls under Implementation of New Features Policy : https://confluence.atlassian.com/display/DEV/Implementation+of+New+Features+Policy

0 votes
Geoff
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.
December 19, 2012

Getting the same results here.

Trying to search for:

comment ~ '\ '

returns:

The field 'comment' does not support searching for an empty string.

You could try raising a feature request on https://jira.atlassian.com

Suggest an answer

Log in or Sign up to answer