- This line was added.
- This line was removed.
- Formatting was changed.
Searches issues having comments, additionally you can further refine your query by using a number expression.
A 'number expression' is made of an optional operator representing by its mathematical symbol and a (prositive/negative) number.
By default, this function only includes issues with at least one comment even if you use the '<' or '<=' operator. You must explicity add 'issues NOT IN hasComments()' clause to your query, if you also want to search for issues without comments.
• Find issues without comments:
issue NOT IN hasComments()
• Find Stories that have three or more comments
type = Story AND issue IN hasComments(">= 3")
• Find issues within the EMEA project having less than 2 comments or with no comments at all.
project = EMEA AND (issue IN hasComments("< 2") OR issue NOT IN hasComments())
Real World Use Cases:
· JRASERVER-40308 - JQL query to filter by comment quantity (by Vincent Chin)
· Is it possible to search for issues with no comments? (by Svante Gustafsson at ATLASSIAN Community)
· Filter issue that has comment (by Pangianto Pang at ATLASSIAN Community)
· How can I filter issues by comment count?(by Stanislav Golodov Reis at ATLASSIAN Community)
JQL Function Reference