glpi icon indicating copy to clipboard operation
glpi copied to clipboard

[GLPI 11 main] Problem for plugins - cannot list inventory data from simplified interface

Open tsmr opened this issue 4 months ago • 3 comments

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • [x] I have searched the existing issues

Version

GLPI 11 main

Bug description

Following this change: https://github.com/glpi-project/glpi/issues/21509#issuecomment-3432713361, Plugins are affected:

For example, the Consumables plugin, which allows users to request consumables, can no longer list them via its simplified interface. Therefore, it becomes unusable.

Relevant log output


Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

tsmr avatar Nov 01 '25 09:11 tsmr

@tsmr Is this fixed by #21622?

cedric-anne avatar Dec 04 '25 06:12 cedric-anne

No sorry - A consumable item is not taken into account when assigning a ticket.

so :

$raw_allowed_itemtypes = $profile->fields['helpdesk_item_type'];
        $allowed_itemtypes = importArrayFromDB($raw_allowed_itemtypes);
        if (!in_array(static::class, $allowed_itemtypes)) {
            return [new QueryExpression('0')];
        }
        $raw_rights = $profile->fields['helpdesk_hardware'];
        $all_assets = $raw_rights & (2 ** CommonITILObject::HELPDESK_ALL_HARDWARE);
        if ($all_assets) {
            return [new QueryExpression('1')];
        }

cannot be used. Perhaps add a $bypass parameter on Dropdown::show ?

tsmr avatar Dec 08 '25 18:12 tsmr

If your plugin is supposed to be give the ability to list consumables from the simplified interface, maybe you could add $_SESSION['glpiactiveprofile'][Consumable::$rightname] = READ; in the PluginConsumablesProfile::initProfile() method.

cedric-anne avatar Dec 09 '25 08:12 cedric-anne