Option to drop a work item field approval step when the field is cleared during an approval
Description
Problem
An approval step can take its approvers from a work item user field. With "Dynamically update users when the step is active" turned on, clearing that field while the approval is running stops the approval: the step stays open waiting for the field to be filled again, nobody can act on it, and the only way forward is to put a name back.
That is what we want when the field was cleared by mistake. It is wrong when the approver is genuinely no longer needed and the approval should simply move on. There is no setting to choose between the two.
Scope
A new option on the work item field approval step, off by default, for both plain user steps and steps using "treat users as group". It requires "Dynamically update users when the step is active".
On: clearing the field while the step is open removes the step and the approval continues with the next approver. Off: unchanged, the step waits for the field.
The last approver cannot be removed this way. If the step is the only one in the approval, it stays and the approval keeps waiting, with the banner explaining why.
The two empty-field options are regrouped under one "When the field has no users:" heading, placed next to "Dynamically update users when the step is active", so each option only has to name its moment:
When the field has no users:[ ] at resolution time: keep the step waiting (plain user steps)[ ] at resolution time: skip the step ("treat users as group")[ ] after the step starts: remove the step (new, both flavours)
Options that require dynamic updates are hidden while that setting is off.
Tooltip on the new option: "The step is removed only if the approval has another step. If it is the only step, it stays and waits for the field, because an approval needs at least one approver."
Removing a step creates a new version of the approval. The removed step is no longer shown on the approval.
Acceptance criteria
-
New per-step option, default off, on both flavours of the work item field step.
-
Option off: clearing the field mid-approval behaves exactly as today.
-
Option on, other steps present: the step is removed, the next approver becomes active, a new approval version is recorded.
-
Option on, the step is the only one in the approval: the step stays, the approval keeps waiting, the banner says the step was not removed because the approval would be left without an approver.
-
Decisions already made on that field's steps survive the removal.
-
If a removal leaves nothing to decide, the approval completes properly: outcome steps, notifications, completion webhook and the work item transition all run.
-
The empty-field options sit under one heading and only the ones that apply are shown; options requiring dynamic updates are hidden while that setting is off.