Repository navigation
Conversation
…ssigned technician
| if ($obj !== false && $obj->getFromDBByCrit(['items_id' => $item->getID()])) { | ||
| $data += $obj->fields; | ||
| } else { | ||
| $data += self::getPendingValues($item, $c_id); |
There was a problem hiding this comment.
Tab containers are skipped on creation (line 2667, isNewItem() && type !== 'dom'), so they never get an entry in $pending_values; but during the nested status update the item is no longer new, so a tab container with a mandatory field is now validated, finds no row and no pending value, and still raises Some mandatory fields are empty and blocks the switch to Assigned.
This happens whenever the tab container is checked during that nested update (no c_id in the request, i.e. no dom container for the itemtype, or API / generic path), which is the same symptom the PR fixes for dom containers.
Treating an item that is still in $pending_values as being created for the tab skip would close it, with a test using a mandatory field in a tab container.
if (($item->isNewItem() || self::isBeingAdded($item)) && $loc_c->fields['type'] !== 'dom') {
return [];
}Dedicated test should be added
Description
When an item with a filled mandatory field is created with an assigned technician, the
Some mandatory fields are emptyerror is displayed although the value is saved, and the ticket stays in the New status instead of Processing (assigned).Steps to reproduce
Teland check Mandatory field.Telfield.