fusioninventory-for-glpi icon indicating copy to clipboard operation
fusioninventory-for-glpi copied to clipboard

[GLPI 9.5.7] Dynamic Groups : unable to filter by Software

Open ppenin opened this issue 3 years ago • 16 comments

With GLPI 9.5.7 and FusionInventory 9.5+3.0, dynamic groups are broken when filtering by software. Version is replaced par serial number.

With GLPI 9.5.6 image

With GLPI 9.5.7 image

ppenin avatar Jan 29 '22 13:01 ppenin

Thanks for the report, I will check that this week end

ddurieux avatar Jan 29 '22 15:01 ddurieux

I not have this problem.

Can you give me the request (field fields_array) in table glpi_softwareversions of the database, related to this group?

ddurieux avatar Jan 31 '22 16:01 ddurieux

could you be more specific ? i don't understand what to do with fields_array

on GLPI 9.5.6, the request is :

SELECT DISTINCT glpi_computers.id AS id, 'ppenin' AS currentuser, glpi_computers.entities_id, glpi_computers.is_recursive, glpi_computers.name AS ITEM_Computer_1, glpi_computers.id AS ITEM_Computer_1_id, glpi_entities.completename AS ITEM_Computer_80, glpi_computers.id AS ITEM_Computer_2, glpi_states.completename AS ITEM_Computer_31, GROUP_CONCAT(DISTINCT CONCAT(glpi_softwares.name, '$#$' , glpi_softwares.id) ORDER BY glpi_softwares.id SEPARATOR '$$##$$') AS ITEM_Software_1, GROUP_CONCAT(DISTINCT CONCAT(glpi_softwares.name, ' - ', glpi_softwareversions_Software.name, '$#$', glpi_softwareversions_Software.id) SEPARATOR '$$##$$') AS ITEM_Software_5 FROM glpi_computers LEFT JOIN glpi_entities ON (glpi_computers.entities_id = glpi_entities.id ) LEFT JOIN glpi_states ON (glpi_computers.states_id = glpi_states.id ) LEFT JOIN glpi_items_softwareversions AS glpi_items_softwareversions_Software ON (glpi_items_softwareversions_Software.items_id = glpi_computers.id AND glpi_items_softwareversions_Software.itemtype = 'Computer' AND glpi_items_softwareversions_Software.is_deleted = 0) LEFT JOIN glpi_softwareversions AS glpi_softwareversions_Software ON (glpi_items_softwareversions_Software.softwareversions_id = glpi_softwareversions_Software.id) LEFT JOIN glpi_softwares ON (glpi_softwareversions_Software.softwares_id = glpi_softwares.id) LEFT JOIN glpi_softwarelicenses AS glpi_softwarelicenses_Software ON (glpi_softwares.id = glpi_softwarelicenses_Software.softwares_id) WHERE glpi_computers.is_deleted = 0 AND glpi_computers.is_template = 0 AND ( (glpi_computers.name LIKE '%E0%' ) AND (glpi_states.id = '2') AND ((glpi_computers.name NOT LIKE '%D1%' OR glpi_computers.name IS NULL) ) AND ((glpi_computers.name NOT LIKE '%L1%' OR glpi_computers.name IS NULL) ) AND (glpi_softwares.name LIKE '%Citrix Workspace (DV)%' ) AND (glpi_softwareversions_Software.id <> '43339' OR glpi_softwareversions_Software.id IS NULL) AND ((glpi_computers.name NOT LIKE '%FILE01%' OR glpi_computers.name IS NULL) ) ) GROUP BY glpi_computers.id ORDER BY ITEM_Computer_1 ASC

with debug mode, an error is displayed in 9.5.6 but not blocking PHP Warning (2): Invalid argument supplied for foreach() in /var/www/html/glpi/plugins/fusioninventory/inc/computer.class.php at line 77

ppenin avatar Feb 01 '22 07:02 ppenin

any news about this issue ? additional information is needed ?

ppenin avatar Feb 03 '22 16:02 ppenin

any news about this issue ? additional information is needed ?

ppenin avatar Feb 22 '22 15:02 ppenin

I have the same problem, would like to know if there exists already a fix. GLPI version 9.5.7 Thanks.

alexlesan avatar Mar 10 '22 14:03 alexlesan

any news about this issue ? additional information is needed ?

@ppenin, as there is no news from the author, you can try to replace the /inc/search.class.php file with the same file from GLPI 9.5.6. Seems that there were changes that affects the plugin.

Here you can see the changes that they did: https://github.com/glpi-project/glpi/pull/9560/files

The attached file is from 9.5.6 version, you can use it I think, or at least to check if works on your side too search.class.php.zip .

alexlesan avatar Mar 15 '22 12:03 alexlesan

I have tried many things and not reproduce this problem :(

ddurieux avatar Mar 15 '22 12:03 ddurieux

I have tried many things and not reproduce this problem :(

In my case, it was an upgrade of GLPI 9.5.6 to GLPI 9.5.7, after the upgrade the problem appeared.

alexlesan avatar Mar 15 '22 12:03 alexlesan

I have tried this (upgrade from 9.5.6 to 9.5.7) but not have problems :(

ddurieux avatar Mar 15 '22 12:03 ddurieux

I ugraded FI 9.5+3.0 to 9.5+4.0 with the rigth procedure : success.

I upgraded GLPI from 9.5.6 to 9.5.7 : success but dynamic groups FI are broken when filtering by software. Version is replaced par serial number.

ppenin avatar Apr 04 '22 15:04 ppenin

I have problem to reproduce your problem :(

ddurieux avatar Apr 04 '22 15:04 ddurieux

Hello @alexlesan,

i upgraded GLPI from 9.5.6 to 9.5.7 and replaced /inc/search.class.php file from GLPI 9.5.6 : dynamic groups when filtering by software work well ! Therefore, there is a php warning about ./fusioninventory/inc/computer.class.php image

ppenin avatar Apr 07 '22 09:04 ppenin

Bonjour, je relance ce problème, il m'arrive exactement la même chose sur la version 10 de GLPI. Le plus intrigant, c'est que cela ne le fait pas sur tout les groupe. Sur certains, la règle reste bien sur les logiciel avec la bonne liste.

jettarse52 avatar Jun 16 '22 14:06 jettarse52

quelle différence avec celle qui fonctionne?

ddurieux avatar Jun 16 '22 16:06 ddurieux

J'ai l'impression qu'à partir du moment où le critère logiciel est en premier, cela ne marche pas C'est une piste mais assez compliqué a tester car en plus si je supprime le critère logiciel, cela me supprime tout les critère. Le comportement est assez étrange.

jettarse52 avatar Jun 16 '22 19:06 jettarse52