Notify selected people when an approval is completed
Description
Problem
Approval Path cannot send a customised message about the outcome of an approval. Today an administrator can either accept the fixed watcher notification and the status comment, both of which have content that cannot be edited and recipients that cannot be chosen, or build a workaround with a webhook step and a Jira Automation rule.
The Notification step comes closest, but it only runs when the approval succeeds. There is no way to notify anyone when an approval is rejected.
Proposed solution
A new step type available only in the Success, Rejection and Expiration sections of an approval definition: Notify.
The step sends one message about the finished approval to the people chosen on that step. Because it is added per section, an administrator can notify one group of people when the approval is approved and a completely different group when it is rejected, with different content in each case.
Recipients on a single step can mix:
-
the person who started the approval, as a dedicated option that needs no configuration and follows the approval wherever the definition is reused
-
named users
-
groups
-
plain email addresses, including people outside Jira and Confluence
-
users, groups or email addresses taken from a work item field (Jira only)
For a work item field the administrator chooses whether the field is read when the approval starts or when it finishes. The default is when it finishes, so the message reaches whoever is in the field at the moment of the decision.
Content comes from three new templates in Global settings > Message templates, one for approved, one for rejected and one for expired. They are edited in the same place as every other message template and can be turned off there. A step can override the subject and body if one definition needs different wording.
The default templates list the approval outcome together with who decided, when, and any comment they left, so the recipient does not have to open the approval to find out what happened.
Available in both Jira and Confluence, and delivered through whichever channel is configured globally, including Slack.
Step UI behaviour
Recipients
A Recipients field that behaves like the Recipients field of the "Send customized email" action in Jira Automation. Selected values are rendered as chips, each with an icon identifying its kind:
|
Recipient |
Icon |
|---|---|
|
Approval creator |
its own person-based glyph, distinct from User |
|
User |
|
|
User from a work item field |
|
|
Group |
|
|
Group from a work item field |
|
|
|
|
|
Email from a work item field |
|
A chip can be edited or removed. Adding a new value, or editing an existing one, opens a layer directly below the field.
Recipient editor layer
The layer starts with a recipient type selector: Approval creator, User, Group, Email.
-
Approval creator is preselected when adding a new value. If it has already been added to this step it is removed from the list and User becomes the preselected type.
-
Switching the type collapses the expanded section and expands the selected one.
-
Add / Modify at the bottom of the layer commits the value.
-
Clicking outside the layer closes it and discards the value being edited. No Cancel button.
Approval creator needs no further configuration.
User, Group and Email each expand a detail section with a radio group choosing the source:
|
Type |
Radio options |
Default |
Control below |
|---|---|---|---|
|
User |
User / Work item field |
User |
user picker, or a picker of work item fields holding users |
|
Group |
Group / Work item field |
Group |
group picker, or a picker of work item fields holding groups |
|
|
Email / Work item field |
|
text input for the address, or a picker of work item fields holding email addresses |
The Group section also has an Exclude from group subsection, matching the one already used by the Group approval step.
In Confluence there are no work item fields, so the radio group is not rendered and each type offers its single source only.
Recipients[ Approval creator x ] [ Anna Kowalska x ] [ finance-team x ] ...+-----------------------------------------------------------+| ( ) Approval creator (o) User ( ) Group ( ) Email || || Source (o) User ( ) Work item field || User [ Select a user v ] || || [ Add ] |+-----------------------------------------------------------+
Message
A collapsible Message section below Recipients, collapsed by default. Its header shows a marker when the step carries its own wording.
Expanded, it shows Subject and Body filled with the global template for this step's section (approved, rejected or expired), read-only, plus a "Customize content" checkbox.
-
Unchecked: both fields are read-only and the step follows the global template, so editing the template later changes what this step sends.
-
Checked: both fields become editable and what the administrator types is stored on the step, replacing the template for this step only.
-
Unchecking it discards the step's wording and returns to following the template.
Nice to have (this can be moved to a separate ticket): Body accepts smart values, and both fields expose a way to browse the ones available in this context, in the same spirit as Jira Automation: a control next to the field opens a list of available values with a short description, and picking one inserts it at the cursor.
> Message
expanded:
v Message[ ] Customize contentSubject Approval "{{ approval.name }}" was approvedBody ...
Acceptance criteria
-
A Notify step can be added to Success, Rejection and Expiration sections, and cannot be added to the approval flow itself.
-
One step accepts a mixed list of recipients: approval creator, users, groups, email addresses and work item fields.
-
Selecting the approval creator as a recipient requires no further configuration and resolves per approval, not per definition.
-
Work item fields as a recipient source are offered in Jira only.
-
The administrator can choose whether a work item field is read at approval start or at approval completion; the default is completion.
-
Three new templates appear in Message templates, are editable, and have the same on/off toggle as the existing ones.
-
Default templates show the outcome, the decision makers, the dates and the comments.
-
A step can override the subject and body of the global template.
-
Approving an approval sends the Success step message, rejecting it sends the Rejection step message, and the two can reach different people.
-
Works in Confluence as well as Jira.
-
Works with Slack when Slack is the configured delivery channel.
-
The step form warns the administrator when watcher notifications are on, because some recipients would then receive two messages about the same decision.
Decisions
-
Subject and Body of the three templates and of a customized step are Markdown, as in the Custom reminder template; the email is built from it, and a customized Body is also the Slack message. From comes from the template.
-
Template names in Message templates: "Approval approved notification", "Approval rejected notification", "Approval expired notification". Turning "Send notification" off for one of them stops every Notify step of that outcome.
-
The templates can use a new variable
decisions: the list of decisions made in the approval (the last 100), each with the approver, the decision, the date in the time zone of the approval settings and the comment. In approvals shared with the customer portal, votes of a vote step with anonymous results appear as "Anonymous voter" without a comment. -
A step holds at most 50 recipients and the approval creator at most once; a group recipient excludes at most 50 users and 50 user fields; a definition holds at most 200 Notify recipients in total. A person reached through several recipients (for example a named user who is also in a group, or whose email address is also listed) gets one message, whatever the notification method.
-
A customized Subject and Body must be valid templates; an error names the section and position of the step (for example "Success step[0]"). Work item field recipients can't use the Description field.
-
Expiration means the end of the validity period of an approved approval with "Run validity expiration steps" as the action on expiry; a decision deadline that passes does not run Expiration steps.
-
The note about duplicate messages (an information message, as it shows on most forms) appears when adding or editing a Success or Rejection Notify step: in Jira when watcher notifications for step decisions or status comments on work items are on, and in Confluence when status comments on pages are on. Expiration steps don't show it, since validity expiration sends neither. The form also says when the template of the step's outcome has "Send notification" off.
-
A Notify step that sends nothing (template off, no recipients, the approval deleted or reopened, the message could not be prepared for anyone) completes and shows the reason as a warning in the outcome steps of the approval, like a failed Webhook or Automation step; otherwise it shows how many people it reached.
-
The Web API v2 reads and writes Notify steps in successSteps, rejectionSteps and expirationSteps, with the same rules as the definition editor.
-
Emails to plain addresses (Jira) leave out the "Check all your pending approvals" footer, since those people have no approvals to act on; links written in the template stay.
-
Customers in the portal see a Notify step and its result, but not its recipients, its message or why it sent nothing; definitions shown to them carry Notify steps without recipients or message.
-
Dates in
decisionsandstarteduse English month names, matching the English templates. -
Expiration steps are checked and saved only when validity expiration runs them ("Run validity expiration steps").
-
Path chips in the definitions list now match the Notify recipient chips: no outline, a neutral fill and an arrow between steps; outcome rows keep their colored outline. User avatars in step chips have no ring.
-
Browsing smart values from the Subject and Body fields moves to AP-2538.
Fixes included
-
Expiration steps were saved without validation (for example a Webhook step without a URL); when validity expiration runs them, they are now checked like the other steps.
-
"Duplicate" on a definition dropped its Expiration steps, parallel group settings, label conditions and several options; the copy is now complete.
-
A label condition on an Expiration step was ignored when no other step had one; it is now evaluated.
-
Web API v2: errors in Rejection and Expiration steps were reported as "Success step[n]"; they now name the right section.
-
Markdown message templates: values such as the work item summary or an approver comment containing Markdown were turned into formatting or links; they now appear as written, as in the preview. Custom reminder emails are not covered, because the reminder dialog fills in the values before the text is edited.
-
Web API v2: updating a definition checked access only to the project or space in the request body; it now also checks the definition's current one.
-
Web API v2: a work item field of the wrong type was accepted for a field step whenever any multi-value field of that type existed (for example Labels made any field pass as an email field); the field itself is now checked. This also applies to the existing work item field steps (user, group and email) and to the user field of Automation steps: a create or update request with a field of the wrong type, accepted until now, gets a 400 error naming the field. Description stays allowed for user and group field steps. The release notes mention this change.
-
A template with a
funblock and no{{ end }}made rendering run forever; it is now a template error.
Out of scope
-
Browsing and inserting smart values in Subject and Body (AP-2538).
-
Notifying when a decision deadline passes (the approval becomes incomplete and no outcome section runs).
Manual tester notes
-
Definition editor: "Notify" (with the "New" badge) is offered in Success, Rejection and Expiration, not in the approval flow. Recipients show as chips with their icons; add, edit (click a chip) and remove work; clicking outside the layer discards the edit; Approval creator disappears from the type list once added.
-
Jira: User, Group and Email offer "Work item field" with "Resolve recipients from field on" (Approval start or Approval completion); Confluence shows no source choice. Group (and group field) offer Exclude from group. A missing or duplicate recipient shows its error under the field.
-
Message: collapsed by default and opened when the step is customized; the template text in disabled fields until "Customize content" is checked; unchecking shows the template again and checking once more brings back the own text.
-
Approve an approval: Success recipients get the approved message with the decisions (approver, decision, date, comment); reject another: only Rejection recipients get the rejected message. A user who is both named and in a group gets one message; an excluded user gets none.
-
Work item field read at completion: change the field during the approval; the message reaches the new value. Read at start: it reaches the value from when the approval started.
-
Validity expiry with "Run validity expiration steps": Expiration recipients get the expired message.
-
Message templates: the three templates are listed with "New", editable, previewable ("Test rendering" shows formatted Markdown); with "Send notification" off nothing is sent and the step form says so.
-
View definition as a user who cannot edit definitions: a Notify step opens without an error and names the template it uses.
-
Delivery: check with Jira notification, Direct email and Slack (Jira), and Direct email, Comment mention and Slack (Confluence); plain email addresses always get an email.
-
The note about duplicate messages appears on Success and Rejection Notify steps with watcher step-decision notifications or status comments on, and disappears with both off; it never shows on Expiration steps or when viewing a definition without edit rights.
-
Turn the outcome's template off and complete an approval: the outcome steps dialog shows the Notify step with a warning that nothing was sent.
-
Definitions list: path chips have no outline and an arrow evenly between steps; expanded Success, Rejection and Expiration rows keep their colors.
-
Duplicate a definition with Expiration steps and parallel groups: the copy keeps them.