Repository navigation
Conversation
3 of 4 tasks
Mary-Clb
marked this pull request as ready for review
November 6, 2026 13:09
Mary-Clb
requested review from
a team,
Lainow,
RomainLvr and
stonebuzz
and removed request for
a team
November 6, 2026 13:24
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.
Description
When a ticket is created with a filled mandatory field from a "dom" container and an assignee, an error "Some mandatory fields are empty" is displayed and the ticket stays in the "New" status instead of "Processing (assigned)". This happens with the standard ticket form and with GLPI forms. During
Ticket::add(), GLPI runs an internalupdate()on a new instance to set the assigned status, before the "item_add" hook stores the plugin values. Since #1269, mandatory fields are checked on updates against the persisted values, which do not exist yet at that point, so the check fails and the internal update is cancelled. The issue was reported after #1294, but it is not related to it.Items being added are now tracked in a WeakMap from "pre_item_add" until "item_add". For an update made in this window, tab containers are skipped as they are on creation, and "dom" containers are checked against the values submitted on the add instead of the database, so status overrides still apply. Tests covering a filled mandatory field, a mandatory field set by a status override, and a mandatory tab container on a ticket created with an assignee are added.
Screenshots :
Before :


After :

