Skip to content

Conversation

@stonebuzz
Copy link
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes !35598

since a lot, Component option only propose two options

image

whereas on a computer, many more options are available

image

I assume that the following constants were (at some point) split into several constants to make them easier to manage

$CFG_GLPI["itemdevices_itemaffinity"]     = ['Computer'];
$CFG_GLPI["itemdevicememory_types"]       = ['Computer', 'NetworkEquipment', 'Peripheral', 'Printer', 'Phone'];
$CFG_GLPI["itemdevicepowersupply_types"]  = ['Computer', 'NetworkEquipment', 'Peripheral', 'Enclosure', 'Phone'];
$CFG_GLPI["itemdevicenetworkcard_types"]  = ['Computer', 'NetworkEquipment', 'Peripheral', 'Phone', 'Printer'];
$CFG_GLPI['itemdeviceharddrive_types']    = ['Computer', 'Peripheral', 'NetworkEquipment', 'Printer', 'Phone'];
$CFG_GLPI['itemdevicebattery_types']      = ['Computer', 'Peripheral', 'Phone', 'Printer'];
$CFG_GLPI['itemdevicefirmware_types']     = ['Computer', 'Peripheral', 'Phone', 'NetworkEquipment', 'Printer'];
$CFG_GLPI['itemdevicesimcard_types']      = ['Computer', 'Peripheral', 'Phone', 'NetworkEquipment', 'Printer'];
$CFG_GLPI['itemdevicegeneric_types']      = ['*'];
$CFG_GLPI['itemdevicepci_types']          = ['*'];
$CFG_GLPI['itemdevicesensor_types']       = ['Computer', 'Peripheral', 'Phone'];
$CFG_GLPI['itemdeviceprocessor_types']    = ['Computer', 'Phone'];
$CFG_GLPI['itemdevicesoundcard_types']    = ['Computer'];
$CFG_GLPI['itemdevicegraphiccard_types']  = ['Computer', 'Phone'];
$CFG_GLPI['itemdevicemotherboard_types']  = ['Computer', 'Phone'];
$CFG_GLPI['itemdevicecamera_types']  = ['Computer', 'Phone'];

Now it's work !

image

Screenshots (if appropriate):

@stonebuzz stonebuzz requested a review from Rom1-B December 16, 2024 15:42
@stonebuzz stonebuzz self-assigned this Dec 16, 2024
@stonebuzz stonebuzz added the bug label Dec 16, 2024
@stonebuzz stonebuzz merged commit e13d7ef into main Dec 16, 2024
3 checks passed
@stonebuzz stonebuzz deleted the fix_component branch December 16, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants