OCSInventory-NG/OCSInventory-ocsreports

Condition cannot be deleted from Search with various criteria

Pesk0v opened this issue · 0 comments

OCS Inventory version
Version : 2.12.1

Operating system : AlmaLinux 9.3 (Shamrock Pampas Cat)
PHP Version : 8.0.30
Web Server : Apache/2.4.57 (AlmaLinux) OpenSSL/3.0.7 mod_perl/2.0.12 Perl/v5.32.1
Database Server : MariaDB Server version 10.5.22-MariaDB

The bug description
Once a condition containing parameter cve_search_computer has been created for querying inventory results, it cannot be removed from the list of filter criteria.

To Reproduce

  1. Go to OCS Inventory website

  2. Click on Manage > Saved searches

image

  1. Go to Create a search tab

image

  1. Add any condition with parameter cve_search_computer, e.g. cve_search_computer : Identifier.

image

Click on Add button and the new condition appears in the list below

image

  1. This condition cannot be removed manually by clicking the Remove button image though others conditions can be still added and removed. Should one more condition with parameter cve_search_computer be added to the search, it's again becomes a new unremovable 'permanent' entry in Search with various criteria.

Expected behavior
Any condition can be deleted using the Remove button image.

Impact
While any other conditions can be removed from the filter, nothing happens when trying to remove condition containing parameter cve_search_computer and this criteria remains in the filter criteria.
This really creates a serious impact as the cve_search_computer cannot be removed but still keeps working in the filter interfering with other criterias which could/should be added.

Workaround
This can be fixed only by user log-out. All conditions for Search with various criteria turn to be completely reset the next user log-in.