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.