I would like to generate a JIRA query to display all User Stories with empty comments(null).
Hi @Fabian Esposito and welcome to the Community!
JQL does not natively support filtering for comments is empty. There is a feature request that you can track here: JRACLOUD-31057. In the description section, a couple of workarounds are mentioned.
Hope this helps!
I stand corrected 🫣 - even though the above feature request is still showing as unresolved, @Nikola Perisic is correct. I just tried in a test environment and it seems that the below query is now indeed working:
comments is empty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nikola Perisic @Walter Buggenhout hm, interesting - looking at my Cloud sites, it looks like the Comments (plural!) field isn't available by default. The one that I have on some of my sites comes from Jira Product Discovery. Mind double-checking this? You should see the full list of fields at https://<your-site-name>.atlassian.net/rest/api/3/field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hannes Obweger - JXL for Jira for me it shows Comments as a custom field which is indeed filtering out the issues without comments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the confusion here, guys. But indeed, after double-checking, it's back to my original answer:
comments is indeed a custom field which does not filter out the comments on issues.
To make absolutely sure, I performed a search with comments is empty, added a comment to an issue that was returned, added a comment to it and refreshed my search results list, to see the issue still being returned.
I'll have to agree with you, @Hannes Obweger - JXL for Jira and point back to what I said initially. No native support unless you use a creative workaround as described in JRACLOUD-31057 (or with marketplace apps).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fabian Esposito ,
I don't think it's natively possible. I've tried searching for this particular feature request but only managed to find similar one(s).
One alternative would be using Marketplace apps such as ScriptRunner (if talking about cloud, then check this) or maybe JXL.
Alternative would be playing with REST API and maybe create some kind of automation & 'comment counter' field by which you could filter issues by.
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Tomislav Tobijas _Koios_ ,
Have you tried with issuetype = Story and Comments IS EMPTY?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nikola Perisic I've checked multiple sites (more than 5 different environments) and none have "Comments" system field. As @Hannes Obweger - JXL for Jira mentioned, there's "Comments" field related to JPD (stated as jira.polaris:formula) but filtering issues by that doesn't work.
On the other hand, there's a "comment field" but it doesn't support using IS/IS NOT operators and "~" operator (which is available) does not support using empty strings.
We could, potentially, be talking about experiments Atlassian is rolling out to some sites, but that's something I cannot confirm.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.