I’m trying to create a JQL query that will show me only issues that DO NOT have a particular comment phrase. Right now I can find issues that contain specific comment text easily enough.
For example, when I use: comment ~ "System Error Found" - this gives me 6 results out of 30 total issues.
But when I try to exclude those items using: comment !~ "System Error Found" - I still get all 30 issues instead of the expected 24.
What I actually want is to get the remaining 24 issues that don’t have that specific comment text. I noticed this filtering approach works fine with summary fields since they support “in” and “not in” operators. Is the issue happening because comments are stored as multiple child elements under each ticket?
I’m just a regular user without admin privileges, so I’m limited in what I can do. Any suggestions for the correct JQL syntax to achieve this filtering?
honestly, jql comment filtering is broken by design. i’ve dealt with this same frustration for months. here’s what works: export all 30 issues to excel, then filter out rows with “system error found” in the comment column. takes 2 minutes and you’ll get exactly those 24 issues you’re looking for.
Yeah, this is a classic JQL gotcha that trips up tons of people. The issue is how Atlassian handles comment queries - when you use comment !~ "System Error Found", JQL checks each comment separately instead of looking at the whole issue. Since most issues have multiple comments, JQL matches issues where at least one comment doesn’t have your phrase, which is basically every issue.
Here’s my workaround: create two saved filters. First, save your comment ~ "System Error Found" query as a filter. Then make a second filter using key not in filter("YourFirstFilterName") to get the opposite results. I’ve used this trick for similar comment filtering headaches before. Not pretty, but it works when you’re stuck with standard JQL.
You’re facing a common limitation of JQL. The !~ operator doesn’t function as expected with comments, since each issue can have multiple comments and JQL checks them separately.
Using comment !~ "System Error Found" means JQL is looking for any comment that doesn’t include that phrase. Since most issues contain various comments, it will always find a match.
Unfortunately, JQL can’t filter for “issues with no comments containing X”. I’ve run into this issue as well.
I now use automation workflows to tackle this. Set up Latenode to pull all JIRA issues via API, and then apply programming logic to filter out the 24 that don’t have “System Error Found” in any of the comments. You can export this to a spreadsheet or use it to create a JIRA filter.
This method is much more dependable than trying to force JQL to function outside its intended design. Plus, you can automate it for timely results.
This exact problem drove me crazy for weeks until I found a workaround that actually works. JQL evaluates comment operators at the individual comment level, not the issue level - that’s why your logic breaks. Here’s what I do now: use JIRA’s search functionality with a script. Export your issues to CSV or hit the REST API if you’ve got access. Then filter programmatically by checking if any comment contains your target phrase. I just use a simple Python script that pulls issue data through the API and filters by comment content. If you’ve got Advanced Roadmaps or other reporting tools in your JIRA instance, try those too. They sometimes have more flexible filtering that can handle negative comment matching. Bottom line - you’ve got to work around JQL’s limitations here. Atlassian hasn’t fixed this functionality gap despite years of people asking for it.