Repository navigation
Conversation
Mary-Clb
marked this pull request as ready for review
November 13, 2026 15:31
Mary-Clb
requested review from
a team,
Lainow,
MyvTsv and
jdurand-teclib
and removed request for
a team
November 13, 2026 15:32
jdurand-teclib
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When searching on the Tags criterion from an itemtype list (e.g. Assets > Computers with "Tags is X"), the results include items that do not have the tag. These items share their ID with an item of another type (e.g. a phone) that does have the tag, and their Tags column is empty. The "is not" and "contains" search types are affected the same way, wrongly excluding or including items.
Since
use_subqueryis enabled on this search option, the core builds aitems_id IN (SELECT ...)subquery onglpi_plugin_tag_tagitemsthat only takes the link tableconditioninto account and ignoresspecific_itemtype, so the subquery is not filtered on itemtype. The fix adds an explicititemtypecondition on the link table join, which the core applies to both the join and the subquery. A test covering the equals, notequals and contains search types has been added.Screenshots (if appropriate):