JQL filter for issues with more than x comments?

Jason J_ Fedelem
Contributor
January 26, 2023

I'm trying to build a filter that exposes controversial cards.  In our org, this is generally indicated by the number of comments as the discussion gets going.  So I'd like to be able to filter for cards with more than x comments on them.  So far I haven't found a way to do this.

 

Any ideas?

4 answers

1 accepted

2 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2023

Hi @Jason J_ Fedelem ,

There isn't a specific JQL for comment count.

However, you might consider the following solution.

  1. Create a custom number field, e.g. comment-count
  2. Create a automation rule that triggers on comment added
  3. Test if you're comment–count has reached your threshold. if not increment otherwise exit the rule.
  4. Use JQL to find issues that have reached the threshold

Example, assume your threshold is 10. Now you can use the following JQL defined all issues that have reached your threshold.

comment-count = 10

Jason J_ Fedelem
Contributor
January 26, 2023

This works without having to add more addon's or spend more money.  Thanks!

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2023

great to hear it worked for you!

Julie Santini August 28, 2023

Hello, 

I want to do the same thing. Can you explain more ? I work with kanban

 

Thanks, 

 

Julie 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2023

Hi @Julie SANTINI , beyond what I provided above where do you have questions? Is it with creating a custom field, details of the automation rule or the JQL?

Julie Santini August 28, 2023

Is it with creating a custom field, details of the automation rule or the JQL?

I have all questions for this answer above. 

How we create custom filed? What are the details of the automation rule and the JQL ? 

Thanks 

Jason J_ Fedelem
Contributor
August 30, 2023

@Julie SANTINI Google how to create a custom field... that's easy.

After creating the custom field, create the automation....

Here is my automation
Screenshot 2023-08-30 at 12.02.13 PM.png

Like Jack Brickey likes this
1 vote
mauricio.groth
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.
January 26, 2023

Hi @Jason J_ Fedelem

I’m Maurício, a support engineer at Digital Toucan and I’m here to help you.

Unfortunately, using JQL of Jira, you’ll not be able to do it.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find all your tickets that have more than 3 comments

commentsCount > 3

Please contact our support if you have any other questions about this query. 

We’ll be happy to help you!
Best regards,
Maurício

Jason J_ Fedelem
Contributor
January 26, 2023

Thanks for your input!

1 vote
Samuel Gatica _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2023

Hi @Jason J_ Fedelem 

Unfortunately, this is not feasible with the native Jira features, but this can be accomplished with the addon Comment Custom Fields for Jira (https://marketplace.atlassian.com/apps/1219476/comment-custom-fields-for-jira?hosting=cloud&tab=overview). Then you can use JQL to query the counter.

Hope this helps

Best regards

Sam

Jason J_ Fedelem
Contributor
January 26, 2023

Thanks for your input, I appreciate it.

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
January 26, 2023

Hi @Jason J_ Fedelem

I'm glad you got your use case solved! Just for future reference, if you're open to solutions from the Atlassian Marketplace, this would also be easy to do with the app that my team is working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of so-called “smart columns” that aren’t natively available, including the number of comments (along with many other comment-related fields).

This is how it looks in action:

number-of-comments-v3.gif

As you can see above, you can easily sort and filter by the number of comments, or apply advanced features such as conditional formatting. Once you've narrowed down your list of issues, you can work on these issues directly in JXL, trigger various actions in Jira, or export them with just one click.

Hope this helps,

Best,

Hannes 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events