You are not logged in.
Hi,
When I move one ore more computers to another entity (transfer list) I lose the connection between Software and all computers in my GLPI
To reconnect the Software I have to do an inventory of all computers.
If my research is correct, the table "glpi_items_softwareversions" is the link between software and computer!?
this table is empty after each computer transfer to another entity.
I installed a new testing GLPI 9.5.1 system and tried a few settings. The same thing happens there.
I have saved a mysql query logfile from the moment I click on "execute".
I can post it if required.
my System:
GLPI 9.5.1 with fusioninventory 9.5.0+1.0
Ubuntu Server 20.04 LTS
Apache 2.4.41
PHP 7.4.3
MariaDB 10.3.22
Offline
Same issue
GLPI 9.5.1
DELETE `glpi_items_softwareversions` FROM `glpi_items_softwareversions` LEFT JOIN `glpi_networkequipments` ON (`glpi_items_softwareversions`.`items_id` = `glpi_networkequipments`.`id` AND `glpi_items_softwareversions`.`itemtype` = 'NetworkEquipment') WHERE `glpi_networkequipments`.`id` IS NULL
2020-07-29T11:56:06.427550-04:00 65270 Query DELETE `glpi_items_softwareversions` FROM `glpi_items_softwareversions` LEFT JOIN `glpi_peripherals` ON (`glpi_items_softwareversions`.`items_id` = `glpi_peripherals`.`id` AND `glpi_items_softwareversions`.`itemtype` = 'Peripheral') WHERE `glpi_peripherals`.`id` IS NULL
2020-07-29T11:56:06.433614-04:00 65270 Query DELETE `glpi_items_softwareversions` FROM `glpi_items_softwareversions` LEFT JOIN `glpi_phones` ON (`glpi_items_softwareversions`.`items_id` = `glpi_phones`.`id` AND `glpi_items_softwareversions`.`itemtype` = 'Phone') WHERE `glpi_phones`.`id` IS NULL
2020-07-29T11:56:06.439605-04:00 65270 Query DELETE `glpi_items_softwareversions` FROM `glpi_items_softwareversions` LEFT JOIN `glpi_printers` ON (`glpi_items_softwareversions`.`items_id` = `glpi_printers`.`id` AND `glpi_items_softwareversions`.`itemtype` = 'Printer') WHERE `glpi_printers`.`id` IS NULL
Last edited by bacus99 (2020-07-29 19:12:41)
Offline
Moved your question to GLPI eng general under my name, my setup is almost the same
Offline
think it's somewhere here
foreach ($CFG_GLPI['software_types'] as $itemtype) {
$itemtable = getTableForItemType($itemtype);
// Clean DB
$DB->delete('glpi_items_softwareversions', ["{$itemtable}.id" => null], [
'LEFT JOIN' => [
$itemtable => [
'ON' => [
'glpi_items_softwareversions' => 'items_id',
$itemtable => 'id', [
'AND' => [
'glpi_items_softwareversions.itemtype' => $itemtype
]
]
]
]
]
]);
if (count($this->needtobe_transfer[$itemtype])) {
$iterator = $DB->request([
'SELECT' => [
'glpi_softwares.id',
'glpi_softwares.entities_id',
'glpi_softwares.is_recursive',
'glpi_softwareversions.id AS vID'
],
'FROM' => 'glpi_items_softwareversions',
'INNER JOIN' => [
'glpi_softwareversions' => [
'ON' => [
'glpi_items_softwareversions' => 'softwareversions_id',
'glpi_softwareversions' => 'id'
]
],
'glpi_softwares' => [
'ON' => [
'glpi_softwareversions' => 'softwares_id',
'glpi_softwares' => 'id'
]
]
],
'WHERE' => [
'glpi_items_softwareversions.items_id' => $this->needtobe_transfer[$itemtype],
'glpi_items_softwareversions.itemtype' => $itemtype
]
]);
if (count($iterator)) {
while ($data = $iterator->next()) {
if ($data['is_recursive']
&& in_array($data['entities_id'], $to_entity_ancestors)) {
$this->addNotToBeTransfer('SoftwareVersion', $data['vID']);
} else {
$this->addToBeTransfer('SoftwareVersion', $data['vID']);
}
}
}
}
}
Deleted from transfer.class.php, and no delete anymore
Offline
This issue is now discussed on GitHub glpi-project #7864
Offline
Fix #7967 on GitHub did solve the Problem for me.
I assume the Problem will be fixed in 9.5.2 since it is on the Milestones list.
Last edited by Kaefer1303 (2020-09-18 09:47:32)
Offline