Skip to content

FIX / Handle group assignment on uninstall templates#199

Open
Mary-Clb wants to merge 2 commits intomainfrom
fix/group-assignment-on-uninstall-template
Open

FIX / Handle group assignment on uninstall templates#199
Mary-Clb wants to merge 2 commits intomainfrom
fix/group-assignment-on-uninstall-template

Conversation

@Mary-Clb
Copy link
Copy Markdown

@Mary-Clb Mary-Clb commented Apr 8, 2026

  • 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.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !43139
  • Group assignment was not working due to a change on GLPI : the plugin now also supports items using GLPI's assignable group handling, instead of depending only on the legacy field detection.

@Mary-Clb Mary-Clb self-assigned this Apr 8, 2026
@Mary-Clb Mary-Clb requested review from Rom1-B and stonebuzz April 8, 2026 08:12
Comment on lines +216 to +217
$can_update_groups = $item->isField('groups_id') || method_exists($item, 'prepareGroupFields');
if ($can_update_groups) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you test this?

Suggested change
$can_update_groups = $item->isField('groups_id') || method_exists($item, 'prepareGroupFields');
if ($can_update_groups) {
if (
$item->isField('groups_id') ||
($item instanceof AssignableItemInterface)
) {

Then have the customer validate the patch?

@Mary-Clb
Copy link
Copy Markdown
Author

Mary-Clb commented Apr 8, 2026

Waiting for customer approval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants