Problem with search queries and NOT

I have 2 diffrent searches:

this one works, it shows open tickets that have set the CustomField “Kategorie” to the value “Datenschutz”

Queue = ‘community’ AND ( Status = ‘new’ OR Status = ‘open’ ) AND CF.{Kategorie} LIKE ‘Datenschutz’

this one is the problem, it should show only the tickets that are not set to “Datenschutz” BUT it shows ALL Tickets in the queue (with open or new Status) also tickets which are set to “Datenschutz”:

Queue = ‘community’ AND ( Status = ‘new’ OR Status = ‘open’ ) AND CF.{Kategorie} NOT LIKE ‘Datenschutz’

any idea why the last one is not working ?

the custom field is set to Type: select one value, Render type: Select box, Applies to: Tickets, assigned to queue “community” (and 3 others)

NOT LIKE includes ones with no values. You probably want something more like

Queue = ‘community’ AND ( Status = ‘new’ OR Status = ‘open’ ) AND ( CF.{Kategorie} NOT LIKE ‘Datenschutz’ AND CF.{Kategorie} NOT NULL )

no actually i want all tickets except the ones with ‘Datenschutz’
but i still get them as result.

this is user hast the same issue:

looks like it is a bug

What version of RT do you have, I’ve done a test with version 4.4.3 and the query works correctly, I recommend you upgrade to a newer version.

so even sth like CF.{bar} != 'X’ works correctly ? it only happens with custom fields and negation. “=” works normaly. also “NOT LIKE” doesnt work.

i will try to update thx, but its not that old, version 4.4.1.