You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2021-07-12 13:57:47

a-nesterenko
Member
Registered: 2015-11-20
Posts: 16

Fields

Hello,
in file ..fields/inc/container.class.php  I add string
'Item_DeviceSimcard' => Item_DeviceSimcard::getTypeName(2),
to expand support Asset - SIM.
As a result, I created a tab with two fields. But when you try to add these fields to the main window of the list of SIM cards, the data stops being displayed.
In debugging mode, we have an error message:

SQL Error "1146": Table 'glpi.glpi_plugin_fields_item_devicesimcardtarifsims' doesn't exist in query 
"SELECT DISTINCT `glpi_items_devicesimcards`.`id` AS id, 'alex_n' AS currentuser, `glpi_items_devicesimcards`.`entities_id`, `glpi_items_devicesimcards`.`is_recursive`, `glpi_items_devicesimcards`.`id` AS `ITEM_Item_DeviceSimcard_1`, `glpi_items_devicesimcards`.`id` AS `ITEM_Item_DeviceSimcard_1_id`,
 GROUP_CONCAT(DISTINCT CONCAT(`glpi_devicesimcards_45be027946cce0bf704fd168a3a33526`.`designation`, '$#$' , `glpi_devicesimcards_45be027946cce0bf704fd168a3a33526`.`id`) 
ORDER BY `glpi_devicesimcards_45be027946cce0bf704fd168a3a33526`.`id` SEPARATOR '$$##$$') AS `ITEM_Item_DeviceSimcard_4`, `glpi_states`.`name` AS `ITEM_Item_DeviceSimcard_14`, `glpi_users`.`name` AS `ITEM_Item_DeviceSimcard_21`, `glpi_users`.`realname` AS `ITEM_Item_DeviceSimcard_21_realname`, `glpi_users`.`id` AS `ITEM_Item_DeviceSimcard_21_id`, `glpi_users`.`firstname` AS `ITEM_Item_DeviceSimcard_21_firstname`, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_plugin_fields_tarifnamefielddropdowns_105780125c6b0d17e476f9987cd7c828`.`completename`, '__NULL__'), '$#$',`glpi_plugin_fields_tarifnamefielddropdowns_105780125c6b0d17e476f9987cd7c828`.`id`) ORDER BY `glpi_plugin_fields_tarifnamefielddropdowns_105780125c6b0d17e476f9987cd7c828`.`id` SEPARATOR '$$##$$') AS `ITEM_Item_DeviceSimcard_76665`,
 GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_plugin_fields_tarifparamfielddropdowns_105780125c6b0d17e476f9987cd7c828`.`completename`, '__NULL__'), '$#$',`glpi_plugin_fields_tarifparamfielddropdowns_105780125c6b0d17e476f9987cd7c828`.`id`) 
ORDER BY `glpi_plugin_fields_tarifparamfielddropdowns_105780125c6b0d17e476f9987cd7c828`.`id` SEPARATOR '$$##$$') AS `ITEM_Item_DeviceSimcard_76666`, `glpi_items_devicesimcards`.`serial` AS `ITEM_Item_DeviceSimcard_10`, `glpi_items_devicesimcards`.`itemtype` AS `ITEM_Item_DeviceSimcard_6`, `glpi_items_devicesimcards`.`items_id` AS `ITEM_Item_DeviceSimcard_5`, `glpi_items_devicesimcards`.`itemtype` AS `ITEM_Item_DeviceSimcard_5_itemtype`, `glpi_contracttypes_8c799389c5430add67bdf72b7ce194bd`.`name` AS `ITEM_Item_DeviceSimcard_129`
 FROM `glpi_items_devicesimcards`LEFT JOIN `glpi_devicesimcards` AS `glpi_devicesimcards_45be027946cce0bf704fd168a3a33526` ON (`glpi_items_devicesimcards`.`devicesimcards_id` = `glpi_devicesimcards_45be027946cce0bf704fd168a3a33526`.`id` )
LEFT JOIN `glpi_states` ON (`glpi_items_devicesimcards`.`states_id` = `glpi_states`.`id` )
LEFT JOIN `glpi_users` ON (`glpi_items_devicesimcards`.`users_id` = `glpi_users`.`id` )
 LEFT JOIN `glpi_plugin_fields_item_devicesimcardtarifsims` ON (`glpi_items_devicesimcards`.`id` = `glpi_plugin_fields_item_devicesimcardtarifsims`.`items_id` AND `glpi_plugin_fields_item_devicesimcardtarifsims`.`itemtype` = 'Item_DeviceSimcard' ) 
LEFT JOIN `glpi_plugin_fields_tarifnamefielddropdowns` AS `glpi_plugin_fields_tarifnamefielddropdowns_105780125c6b0d17e476f9987cd7c828` ON (`glpi_plugin_fields_item_devicesimcardtarifsims`.`plugin_fields_tarifnamefielddropdowns_id` = `glpi_plugin_fields_tarifnamefielddropdowns_105780125c6b0d17e476f9987cd7c828`.`id` )
LEFT JOIN `glpi_plugin_fields_tarifparamfielddropdowns` AS `glpi_plugin_fields_tarifparamfielddropdowns_105780125c6b0d17e476f9987cd7c828` ON (`glpi_plugin_fields_item_devicesimcardtarifsims`.`plugin_fields_tarifparamfielddropdowns_id` = `glpi_plugin_fields_tarifparamfielddropdowns_105780125c6b0d17e476f9987cd7c828`.`id` ) LEFT JOIN `glpi_contracts_items` ON (`glpi_items_devicesimcards`.`id` = `glpi_contracts_items`.`items_id` AND `glpi_contracts_items`.`itemtype` = 'Item_DeviceSimcard' ) LEFT JOIN `glpi_contracts` AS `glpi_contracts_75a921d1c48c76553dc0a9e69050f745` ON (`glpi_contracts_items`.`contracts_id` = `glpi_contracts_75a921d1c48c76553dc0a9e69050f745`.`id` )LEFT JOIN `glpi_contracttypes` AS `glpi_contracttypes_8c799389c5430add67bdf72b7ce194bd` ON (`glpi_contracts_75a921d1c48c76553dc0a9e69050f745`.`contracttypes_id` = `glpi_contracttypes_8c799389c5430add67bdf72b7ce194bd`.`id` ) WHERE `glpi_items_devicesimcards`.`is_deleted` = 0 
GROUP BY `glpi_items_devicesimcards`.`id`
 ORDER BY `ITEM_Item_DeviceSimcard_1` ASC LIMIT 0, 100"

I will be grateful for your help.

Offline

#2 2021-08-02 06:56:51

a-nesterenko
Member
Registered: 2015-11-20
Posts: 16

Re: Fields

Good afternoon.
I was hoping for a miracle, but a miracle, alas, did not happen.
The new version of the plugin fields_1.12.7 did not fix the stated problem. (

Offline

Board footer

Powered by FluxBB