I have a ticket with the comment "custom note I wrote". Although it has multiple comments, one of the comments is just this string. I use this filter to find only this ticket:
comment ~ "custom note I wrote"
And only the ticket with "custom note I wrote" shows up.
However, when I negate the search:
comment !~"custom note I wrote"
All tickets are returned, including the ticket with this comment! This is not a simplified version of the query I'm running (there are no other conditions in the query).
I solved this by creating a filter called hide helper with this query:
comment ~ "custom note I wrote"
Then, I created this filter:
filter != "hide helper"
Which returns all the tickets except the one with "custom note I wrote". This is the behavior I expected from the original negated search (comment !~"custom note I wrote")
This is a fine solution, but I'm very curious as to why negating it doesn't work like I expect. My first thought was that I'm missing a wildcard or something, but since the ticket is returned in the original query (comment ~ "custom note I wrote") I don't believe this is the case.
Hi @Frank Salmick , welcome to the Community!
It's interesting- the query comment !~ "custom note" should indeed fail if there is more than one comment on that particular issue (because it's looking at all comments - more here)
I assume the filter != "hide helper" query works, because the hide helper filter is first isolating the issue by using a query which does work (comment ~ "custom note") and then returning issues that are not targeted by this filter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.