pluginsGLPI / customfields

customfields plugin for GLPI
GNU General Public License v2.0
13 stars 4 forks source link

Plugin works for devices, not for computers and monitors. #80

Closed marcogaio closed 8 years ago

marcogaio commented 8 years ago

I've upgraded to GLPI 0.85.X and upgrade the plugin to latest (master branch).

Plugin works for devices (but see #79), but does not work for computers and monitors: if i modify data and 'save', nothing get saved and the customfield page keep displaying the default/empty data,

I've looked at configuration of customfiled page between computers and devices and seems identical.

Thanks.

btry commented 8 years ago

Just fixed in my local copy a regression which may be the cause of your issue. If you enable debug mode and show the custom fields tab on a item, I'm expecting 6 red warning lines, in hook.php about a not defined variable $type.

Can you confirm that ?

marcogaio commented 8 years ago

No, no red lines.

But i've found a computer where i can save customfield plugin data, so seems is not a generic trouble for alla computers or monitors...

btry commented 8 years ago

Ok, you noticed a useful behavior.

Choose a item on which customfields does not work. Keep in mind the itemtype and its ID.

Check in the table glpicustomfields$itemtype : a row with the same ID must exist. If not, the plugin will not be able to save your data ,then create this row and ensure you put the ID of the faulty itemtype, and try to change a custom field value for the item.

If this works, check the automatic row ceation works for you : create a new item for an itemtype managed by Custom Fields. Check its ID appears in the table glpi_plugincustomfields$itemtype .

marcogaio commented 8 years ago

OK, effectively row missed; i've created and now i can change customfield.

I've tried to create new items, and customfields are correctly modifiable.

Probably i've done some mistakes upgrading, and in the meantime i've created some item.

Sorry... i will fix them by hand, Thanks.

btry commented 8 years ago

Thank you for your feedback.