Closed NazarovRoman closed 2 years ago
I wonder if this should be added to transfer list; I guess not.
Rules are a unique case where multiple types share the same table. This patch will make the Transfer compatible with rules that are assignable to entities, but I don't know if it would break other cases:
diff --git a/src/Transfer.php b/src/Transfer.php
index 2df4810806..6cb495ea41 100644
--- a/src/Transfer.php
+++ b/src/Transfer.php
@@ -4123,7 +4123,7 @@ class Transfer extends CommonDBTM
if (!($item = getItemForItemtype($itemtype))) {
continue;
}
- $table = getTableForItemType($itemtype);
+ $table = $itemtype::getTable();
$iterator = $DB->request([
'SELECT' => [
Please test #13212
Code of Conduct
Is there an existing issue for this?
Version
10.0.3
Bug description
Error SQL Error "1146": Table 'glpidb.glpi_ruletickets' doesn't exist in query "SELECT
glpi_ruletickets
.id
,glpi_ruletickets
.name
,entities
.completename
ASlocname
,entities
.id
ASentID
FROMglpi_ruletickets
LEFT JOINglpi_entities
ASentities
ON (entities
.id
=glpi_ruletickets
.entities_id
) WHEREglpi_ruletickets
.id
IN ('79') ORDER BYlocname
,glpi_ruletickets
.name
"Logs access-errors.log php-errors.log sql-errors.log
Relevant log output
No response
Page URL
help.bpmg.kz
Steps To reproduce
No response
Your GLPI setup information
Information about system installation & configuration
Server
GLPI constants
Libraries
SQL replicas
Notifications
Plugins list
Anything else?
No response