I'm in the process of trying to filter my search results to exclude tickets that have comments with a specific build number mentioned in them.
I have a JQL search configured to find tickets created by me that are still open and of a certain type. This results in 114 tickets.
I find that if I add AND comment ~ "6.4.11-1" then it works to find the one ticket in my search results that include that build in a comment. This results in a single ticket being found.
If I use AND comment !~ "6.4.11-1" then it finds all 114 tickets again, including the one that should be excluded.
The JQL suggestions tell me this is possible, and it doesn't result in any errors. The Atlassian documentation tells me this is possible, https://support.atlassian.com/jira-service-management-cloud/docs/jql-fields/#Comment.
Is this a bug in JIRA?
Hello @Greg Harder
Welcome to the Atlassian community.
Does the issue that contains "6.4.11-1" in a comment have any other comments on it that don't contain that text?
If so, that is why the filter returns that same issue when you use AND comment !~ "6.4.11-1", and your results are not a bug.
The filter looks at each comment on the issue. If any one comment on the issue matches the filter criteria then the issue is included in the results.
The suggested workaround from Google Gemini is as follows:
"your text"
with the phrase you want to exclude:
"Contains - your text"
. "Contains - your text"
with the name of the filter you just created:
filter != "Contains - your text"
Oh, nice! Thank you so much, I figured I was missing something like that. Is that search behavior documented anywhere? I'd like to know more about how JIRA searches for your exact queries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome
I don't know if it is explicitly documented that a search for text in (or not in) comments is applied to each comment. It might be inferred from the documentation where it says "Search for work items that have a comment that contains particular text..."
For more information about text searches in general you can follow the link the the paragraph about Comment field text searches.
https://support.atlassian.com/jira-software-cloud/docs/search-for-work-items-using-the-text-field/
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.