The approval starter is not told when a blocked group step they were asked to decide is removed by someone else

Description

Depends on: AP-2495 (blocked group steps) and AP-2506 (remove a step from a running approval), both in dev.

Problem

  • When a group step is blocked (AP-2495), the user who started the approval gets one "Approval blocked" message that asks them to decide the step: "You can decide the step for the group in the approval, with a comment."

  • A global admin can remove that step (AP-2506). When the group excludes the starter, only a global admin can remove it.

  • The removal notice ("Removed from step") goes to the people asked to decide on the removed step who have not acted yet: the user, the email address, the moderator and voters who have not voted, group members who have not voted. They are taken from the step's pending approvers (StepRemovalService.recipientsOf).

  • On a blocked step every member who could vote has voted, so nobody is pending and nobody is told. The starter, the only person the app asked to decide that step, does not learn that it was removed and that the approval moved on. They find out only by opening the approval.

  • AP-2506 was specified before blocked group steps existed, so its list of recipients does not cover the starter of a blocked step.

Group steps and step removal exist in both products; the behaviour is the same in Jira and Confluence.

Change

  • When a blocked group step is removed by someone other than the starter, the starter gets the existing "Removed from step" message, with "This change was made by ...", on the same channels and following the same template switch as the other removal notices. Its text ("No action is required on your part") fits: the starter no longer needs to decide the step.

  • Not sent when the starter removed the step, and not to a JSM portal customer who started the approval (Jira), who got no "Approval blocked" message either.

  • Other removals are unchanged: the starter is not told about the removal of a step that is not blocked.

Acceptance criteria

  • A global admin removes a blocked group step: the starter gets one "Removed from step" message naming the step and the admin; nobody else gets one.

  • The starter removes a blocked group step: the starter gets no message.

  • An approval started by a JSM portal customer: removing its blocked step sends the customer nothing.

  • With the "Removed from step" template turned off, nothing is sent.

  • Removing a step that is not blocked notifies the same people as today.

Manual tester notes

  • Turn on "Enable step removal" in General settings, Step updates.

  • Definition: a group step with a group of 2 that excludes the approval creator, 2 to pass and 2 to fail, followed by a user step.

  • As user A (not a global admin), start an approval. One member approves, the other rejects: the step shows "Blocked: ..." and A gets "Approval blocked".

  • As a global admin, remove the blocked step with a comment: A gets "Removed from step" naming the step and the admin, by email and in Slack when Slack is on; the user step's approver is asked to act.

  • With a group that does not exclude the approval creator, make the step blocked and remove it as A: A gets no message.

  • Turn the "Removed from step" template off and repeat the admin removal: nothing is sent.

  • Repeat the admin removal in Confluence.