Skip to content

The asset type is ignored during the search. #316

@RogueSnipa

Description

@RogueSnipa

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

GLPI Version

11.0.4

Plugin version

2.14.2

Bug description

When filtering assets by the value of fields added by the plugin, an incorrect result is returned. Most likely, the asset type is ignored during the search.

Relevant log output

Page URL

No response

Steps To reproduce

  • install the Tag plugin
  • create a tag named "tag1"
  • create some assets of the "Computer" and "Network devices" types
  • add the tag "tag1" to the Computer-asset with id = 1 and the NetworkDevice-asset with id = 2
  • in the Assets-Computers section, perform a search with the condition "Plugins-Tags is tag1"

as a result, 2 assets will be displayed: with id=1 (correct result) and with id=2 (incorrect result)

Your GLPI setup information

No response

Anything else?

here is an example of the contents of the tables in the database

glpi_computers

id entities_id name
1 0 comp1
2 0 comp2
3 0 comp3

glpi_networkequipments

id entities_id name
1 0 Switch1
2 0 Switch2
3 0 Switch3
4 0 Switch4
5 0 Switch5
6 0 Switch6
7 0 Switch7

glpi_plugin_tag_tags

id entities_id is_recursive is_active name comment color type_menu
1 0 1 1 tag1 #f44336

glpi_plugin_tag_tagitems

id plugin_tag_tags_id items_id itemtype
1 1 1 Computer
2 1 2 NetworkEquipment

search settings
Image

search result
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions