You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When searching tickets by using filter with "Category - is not" criteria, with multiple "and" rows, the resulting list dosen't take in account the tickets where Category is not set.
Logically, they should get listed because they match criteria.
The filter looks like:
Relevant log output
Page URL
No response
Steps To reproduce
Go to Support - Tickets
Define filter with multiple criteria "Category - is not"
Results should list all tickets fulfilling the criteria
In reality, tickets without Category are not listed.
Your GLPI setup information
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
petertuharsky
changed the title
Filtering tickets by cathegory using "is not" criteria dosen't return items with undefined value
Filtering tickets by category using "is not" criteria dosen't return items with undefined value
Apr 25, 2025
This probably works this way for most dropdown type search options.
The category search option uses the glpi_itilcategories table to use the complete name in other search types like contains, so the resulting SQL criteria is like:
AND (`glpi_itilcategories`.`id` NOT IN ('1', '2'))
Since there obviously isn't a joined record for the missing category, glpi_itilcategories.id is NULL. MySQL and other DBMS consider it an unknown value and therefore resolves something like NULL <> 1 and NULL = 1 both as false. The NOT IN is equivalent to NULL <> 1 AND NULL <> 2.
Code of Conduct
Is there an existing issue for this?
Version
10.0.18
Bug description
When searching tickets by using filter with "Category - is not" criteria, with multiple "and" rows, the resulting list dosen't take in account the tickets where Category is not set.
Logically, they should get listed because they match criteria.
The filter looks like:

Relevant log output
Page URL
No response
Steps To reproduce
Your GLPI setup information
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: