You are not logged in.
Hi,
I might have found a bug while searching the inventory in GLPI version is 0.78.2
While putting a couple of local criteria in inventory search and a global criteria, the result is wrong.
By logging the MySQL request I found out that the last condition (which was specified as a global criteria) is inside the parenthesis.
Even Worst, the precedence of the AND operator over the OR makes the request wrong.
Look at the Mysql request :
WHERE
`glpi_softwares`.`is_deleted` = '0'
AND `glpi_softwares`.`is_template` = '0'
AND
(
( `glpi_softwares`.`name` LIKE '%virus%' OR `glpi_entities`.`completename` LIKE '%virus%' OR `glpi_manufacturers`.`name` LIKE '%virus%' OR `glpi_softwareversions`.`name` LIKE '%virus%' OR `glpi_operatingsystems`.`name` LIKE '%virus%' )
OR
( `glpi_softwares`.`name` LIKE '%kasper%' OR `glpi_entities`.`completename` LIKE '%kasper%' OR `glpi_manufacturers`.`name` LIKE '%kasper%' OR `glpi_softwareversions`.`name` LIKE '%kasper%' OR `glpi_operatingsystems`.`name` LIKE '%kasper%' )
OR
( `glpi_softwares`.`name` LIKE '%afee%' OR `glpi_entities`.`completename` LIKE '%afee%' OR `glpi_manufacturers`.`name` LIKE '%afee%' OR `glpi_softwareversions`.`name` LIKE '%afee%' OR `glpi_operatingsystems`.`name` LIKE '%afee%' )
AND
(`glpi_operatingsystems_Computer`.`id` = '45')
)
Here is the screenshot of the request setting.
So is this a bug or me not using the feature the right way ?
Offline
The problem is that we cannot make parenthesis choice.
In your case the paenthesis is needed for your purpose but for another search no.
We need to work on these problem.
I create a ticket for it : https://forge.indepnet.net/issues/2681
MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI : Support Contribute References Freshmeat
Offline