Remove a step from a running approval

Description

Builds on AP-2449 (ClearedFieldStepRemoval, continueAfterStepsChange, ParallelGroupNames) and AP-2380 (Rovo PathChangeReason, DecisionHistory), both in dev. AP-2495 (blocked group steps) has no code yet: a stalled group step is any group step in progress. AP-2146 (Teams) is not in dev yet: the Teams "Step removed" card is added when AP-2146 is merged.

Problem

  • A step that is no longer needed cannot be taken out of a running approval: an approver who left, an external email that no longer works, a stalled group step, a webhook that will fail.

  • Today the user who started the approval can only reassign a user or email step (Start approval permission, "Enable user/email steps updates", StepReassignmentService), or reject, rerun or delete the whole approval.

  • AP-2449 already removes a step from a running approval when its work item field is cleared: it drops the open step, records a new approval version, recomputes parallel groups and continues the approval. Nobody can do the same by hand.

Steps exist in both products; the behaviour is the same in Jira and Confluence.

Change

  • New "Remove step" action on a step of the approval panel and the approval details, for in-progress approvals: a delete icon at the right end of the step row, shown while the mouse is over the step or keyboard focus is on it (always shown on touch screens). It shows what happens next ("The approval continues with Legal review.") and asks for a comment, required unless "Require a comment" is off.

  • The removal check runs before the dialog opens: a step that cannot be removed opens a short dialog with the reason and a Close button; if the approval changed meanwhile, a warning appears and the panel reloads. The dialog fits its content in Jira, the JSM portal and Confluence; Cancel comes before Remove step.

  • Who: the user who started the approval, when the reassign rules let them act (Start approval permission when the app's permissions are on, JSM agents with access, never JSM customers), and global admins, like the AI prompt step rerun (PromptStepRerunService.canRerun). Off unless the new global setting "Enable step removal" (General settings, Step updates) is on. Under it, the setting "Require a comment" (on by default, shown only while step removal is on) decides whether the comment is required; the server enforces it.

  • Which steps: user, group, email, vote and AI prompt steps that are waiting or in progress, including group and vote steps with votes; automation, webhook and Notification steps while waiting (they finish as soon as they start); work item field steps that resolve when they start, while waiting. Not decided or skipped steps, not the start, not success, rejection or expiration steps. Not steps that follow a work item field with dynamic updates: like reassignment, they change only through the field (the next field change would add the person back). Not on archived, outdated or deadline-passed approvals. A running AI prompt step can be removed; its result, when it arrives, is ignored.

  • Group steps that exclude the user who started the approval, and steps marked "Required" in a parallel group, can be removed only by global admins.

  • The removal is refused when no other open step that needs a decision (user, group, email or vote step asking for approval or consent; not an AI prompt step, which can only approve, and not a step still waiting for a work item field value) would remain, or when the approval would end. The message says to reject or delete the approval instead.

  • After the removal the approval continues the way AP-2449 does after a cleared field:

    • a new approval version is recorded; the version selector shows the step as skipped in the earlier version, and parallel group names stay as they were (ParallelGroupNames);

    • parallel groups are recomputed: custom approval and rejection counts are lowered to the remaining steps, and a group whose counts are met ends, skipping its other open steps (ParallelGroupResolutionService);

    • if the removed step was the current one, the next steps start: approvers are called to act, and automation, webhook and AI prompt steps run (continueAfterStepsChange);

    • the work item property, Approval field and workflow conditions in Jira, and the approval state in Confluence, are refreshed once, after the commit;

    • concurrent changes are refused with "Approval was modified concurrently", as for a reassignment.

  • Activity lists the removal as "Removed", dated by the removal, with "Step 'Legal review' removed by Ann Smith" and the comment, when there is one, in its tooltip; the CSV export says "Removed". Votes already cast on a removed group or vote step stay visible in the earlier version.

  • Notifications: approvers asked to decide on the removed step (the step was in progress) get the existing "Removed from step" message (STEP_REASSIGN_REMOVED, "This change was made by ..."): the user, the email address, the moderator and voters who have not voted, and group members who have not voted. A waiting step, or a step still waiting for a work item field value, notifies nobody. A Jira-channel message follows its template switch. Slack messages of the removed step say "Step removed", not "reassigned"; Teams follows with AP-2146. Slack messages, email action links and queued notifications of the other open steps move with them to the new version, as after a reassignment.

  • Rovo: the step is gone from the remaining path; Explain an approval lists the removed steps (who, when, and the comment when there is one), and the path change reasons say the starter or an administrator can remove a step. Rovo cannot remove steps.

Decisions (2026-11-09)

  1. An in-progress step with votes (group or vote step) can be removed; the votes stay in the earlier version.

  2. A removal needs at least one other open step that needs a decision, so a removal never completes the approval. Otherwise the starter could approve their own request by removing its approvers.

  3. Gate: the global setting only, off by default; no per-step option.

  4. Channels: UI only; Web API v2 and Rovo only show the result.

  5. Steps that exclude the approval creator (group steps) and steps "Required" in a parallel group: only global admins.

  6. (2026-11-16, review) The comment is required by default; the "Require a comment" setting under "Enable step removal" lets sites remove steps without one.

Out of scope

  • Adding steps to, or reordering steps of, a running approval; undoing a removal.

  • Removing steps through Web API v2 or Rovo.

Acceptance criteria

  • Setting off: no "Remove step" action; the server refuses the request.

  • The "Remove step" icon appears only on hover or keyboard focus, at the right end of the step row.

  • The starter removes the current user step with a comment; a new version is recorded, the next approver is called to act, the removed approver gets "Removed from step", and Activity shows the removal and the comment.

  • "Require a comment" off: a step is removed without a comment; Activity shows the removal without a comment. On: the server refuses a removal without a comment.

  • A waiting step is removed: nobody is notified, and the approval continues when it reaches the next step.

  • Removing the only open approver step is refused with a message, shown in the dialog as soon as it opens.

  • The removal dialog fits its content (no empty band, no scroll) in Jira, the JSM portal and Confluence, with and without the comment field.

  • A stalled group step with votes is removed and the approval continues; its votes stay in the earlier version.

  • A step that follows a work item field with dynamic updates has no "Remove step" action.

  • Parallel group with custom counts (2 of 3, one approved): removing one open step leaves 2 of 2; removing a step so the group's counts are met ends the group and starts the next step.

  • Removing the current step when a webhook step follows: the webhook runs. Removing a running AI prompt step: its late result changes nothing.

  • Another user, a JSM customer, or a user without Start approval permission (app permissions on) is refused; a global admin is allowed.

  • Archived, outdated or deadline-passed approvals: no action, refused by the server.

  • Two users remove steps at the same time: one succeeds, the other gets "modified concurrently".

  • In Jira the work item property, Approval field and workflow conditions match the new current step.

  • Rovo describes the new remaining path and the removal.

Fixes included

  • The Jira chat messages for Removed from step and Reassigned were sent even when that message template was turned off; they now follow the template switch, also for plain reassignments.

  • Vote steps with a deadline still close on time after a step is removed or reassigned.

  • Approval cards whose decision area sits beside the steps give the steps the free width (vote progress bars included) and keep the decision area at the right, instead of splitting the card in half.

Manual tester notes

  • Turn on "Enable step removal" in General settings, Step updates; "Require a comment" appears under it, on. Use an approval with user, group, email, vote, webhook and AI prompt steps, and one with a parallel group with custom counts.

  • Hover a step: the delete icon appears at the right end of its row and disappears when the mouse leaves; tab to it with the keyboard.

  • Open the removal dialog for a removable step and for the last open approver step (refused), in Jira (work item panel, Approvals page details), the JSM portal (agent) and Confluence (page byline, Approvals page details): no empty band under the buttons, no scroll.

  • Turn "Require a comment" off: the label says "Comment" and Remove step works with an empty comment; Activity shows the removal without a comment. Turn it back on: Remove step stays disabled until a comment is entered.

  • After each removal, check the version selector (earlier version shows the step as skipped), Activity ("Removed" with the comment in the tooltip), the next approver's notification and the removed approver's "Removed from step" message, by email, in Slack and in Teams.

  • As the starter, check that steps required in a parallel group show no "Remove step" action, and that a group step excluding the starter is refused; as a global admin, remove both.

  • In Jira, check the Approval field, JQL and a workflow condition on the work item; ask Rovo "what is this approval waiting for?" and "why is a step gone?".

  • Repeat the current step, waiting step and parallel group cases in Confluence.

  • Turn off the Removed from step template and remove an in-progress user step: no Slack message.

  • Remove a step from version 2 or later: the Activity row shows the version the step was removed from.

  • An approval whose only other open step is an AI prompt step: removing the last approver step is refused.

  • While another step has an open Slack approval message, remove a different step, then decide the other step from its Slack button: the decision is recorded and the message updates.

  • Archive and unarchive an approval, then remove one of its steps: Activity lists both the restore and the removal.