glpi icon indicating copy to clipboard operation
glpi copied to clipboard

fix(lock): Display all lock available

Open stonebuzz opened this issue 3 years ago • 2 comments

Actually, GLPI displays only the locks of the current itemtype.

But some data are related to Ìtem_XXXX relationship who do not have their own form (like Computer) and GLPI allow user to update it directly from current itemtype

It is frustrating to see the lock in the OS tab but not in the Lock tab

Actually is see two relationship in this case :

  • Item_OperatingSystem
  • Item_Disk

So this PR :

  • compute related lock (Item_OperatingSystem and Item_Disk) for current itemtype
  • display itemtype and value from glpi_lockedfield table
  • add Item_OperatingSystem to $CFG_GLPI['inventory_lockable_objects'] (missing)
  • Fix Locked itemsdisplay (Software / license header / massiveAction display if there is no deleted item)

Before

image

After image

If Locked items part is empty image

Q A
Bug fix? yes/no
New feature? yes/no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #number

stonebuzz avatar Sep 21 '22 10:09 stonebuzz

Redefined inventory_lockable_objects with all objects that have the is_dynamic column ex : item_DeviceProcessor, DatabaseInstance, ComputerAntivirus. and can be linked to an asset by ìtemtype_id (ie: computers_id) or itemtype / items_id

stonebuzz avatar Sep 26 '22 14:09 stonebuzz

image

stonebuzz avatar Sep 27 '22 08:09 stonebuzz