Merged
Conversation
stonebuzz
approved these changes
Mar 12, 2026
Rom1-B
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist before requesting a review
Please delete options that are not relevant.
Description
When the user has a rule that adds an SLA when creating a ticket, if they have another rule that removes this SLA when deleting a technician group, the latter did not remove the group (whereas it did so without the plugin).
The reason was that the rules did not trigger ONUPDATE because no field was changed when the group was removed, as removeAssignGroup() deletes the old group directly in SQL, without going through the rules engine.
To correct this, before deleting the old group, we call $ticket->getFromDB() then $ticket->update() with _actors containing only the new group. GLPI then detects the old group as deleted in transformActorsInput(), loadActorsForRules() sees a real change, and the business rules are executed with the correct final state (SLA deleted, etc.). The _plugin_escalade_rules_only flag is passed to prevent re-entry into the escalation logic.
And in pre_item_update, immediate return if _plugin_escalade_rules_only is present, letting prepareInputForUpdate() run the rules and save the results normally.
Screenshots (if appropriate):