Update group steps with the "Work item field" source when the field changes during an approval
Description
Problem
A group step with the "Work item field" source reads the groups from the field only once: when the approval starts or when the step is reached. If someone adds a group to the field or removes one from it while the approval is running, the approval path stays the same. An admin therefore cannot add an extra approver group to a running approval, for example a risk group after one of the approvers' decisions. User steps with the "Work item field" source already have this option ("Dynamically update users when the step is active").
Change
-
A group step with the "Work item field" source gets a "Field updates" section with the same options as the user step: dynamic updates while the step is active, "at resolution time: keep the step waiting" and "after resolution: remove the step".
-
The "skip the step" option for groups without members moves from "Group members" to "Field updates", with a label saying it applies to groups from the field. For the "Chosen group" source it stays in "Group members".
-
The dynamic options are available when the global setting in "Step updates" is on. Its name and description now cover both user fields and group fields.
-
Adding a group to the field while the step is active adds a group step for it in the same parallel group, and its members are asked for a decision.
-
Removing a group from the field and an empty field are handled the same way as in the user step, including steps that already have a decision.
-
Each change records a new approval version, and Activity and the version history show who changed the field.
-
As in the user step, steps from a dynamic field have no "Remove step" action.
Out of scope
-
Reacting to membership changes of the Jira group itself (AP-840).
Acceptance criteria
-
Without the option enabled, a group step with the "Work item field" source works as today: later field changes do not change the approval.
-
With the option: adding a group to the field while the step is in progress adds a new group step in the same parallel group, and the members of the new group get "Action required". The approval ends only after this group decides, if the parallel group requires all.
-
Adding to the field a group that already has a step in the approval changes nothing. A group without members gets no step when "skip the step" is on.
-
Removing a group from the field gives the same result as removing a user from the field in the user step, also for a group that has already voted. Members who have not voted get "Removed from step".
-
An empty field at start and clearing the field after start follow "keep the step waiting" and "remove the step" the same way as in the user step.
-
Field changes after the group step has ended do not change the approval.
-
Existing definitions with "skip the step" keep this setting after the option moves to "Field updates".
-
With the global setting off, field changes do not change group steps.