Configuring email approval

As of now, Email This Issue does not support Jira's built-in email approval method. Below, you may find our suggested workaround for this requirement.

With email approval you can request email recipients to give you feedback or make decisions on issues (e.g. approve or decline orders) via email replies.

Note: Email approval requires multiple components in Email This Issue configured properly, so be sure to closely follow the following steps.

How this approach works

From a user perspective, this is what happens during the approval process:

  1. You send an email using our application from Jira prompting the recipients to approve or decline a decision.

  2. They open your email in their inbox and within the email they click "Approve" or "Decline".

  3. This, in turn, will create a reply email with subjects such as: SD-12345 - Decision: Approved or SD-12345 Decision: Declinedthat will be sent to your mail handler

  4. Your mail handler processes the incoming email and runs a transition depending on the approver's (reply email sender's) decision

Configuration steps:

1. Configure an email template to send out a request asking recipients to approve or decline. Jump to this procedure.

2. Configure Workflow transitions (and optionally workflow-post function emails) for each decision type. Jump to this procedure.

3. Configure the next-gen mail handler to process the replies, parse email content and find the decision tag to run the appropriate workflow transition. Jump to this procedure.

Configuring an email template

Email templates enable users to create emails with a desired content, including custom fields, issue links, comments, previous email conversations, and so on.

In this section we detail what you need to do to configure email templates for approval. For a dedicated, step-by-step tutorial for customizing an email template, see Customizing the email template used with manual emails.

1. Add the following links to the email template to represent each decision:

  • "<a href="mailto:project@emailaddress.com?subject=$!issue.key - Decision: Approved">Approve</a>"

  • "<a href="mailto:project@emailaddress.com?subject=$!issue.key - Decision: Declined">Decline</a>"

Note: Links must be "mailto:" type and the email address must be the one that will be used by the next-gen handler that processes the incoming emails of the respective project.

Result: These links will be shown in the email client as part of the email. Users will be able to click them, and generate a response email with a subject containing the issue key and the words Approved or Declined, respectively.

Use this template to send the approval request email to the approvers. It is good practice to select the approvers (e.g. decision makers) in a multi-user custom field, then send the email with this custom field as a recipient.

We recommend sending the approval email manually or as a workflow post-function email.

For more information on how to send these emails, refer to our documentation on Sending manual emails and Workflow post functions.

Configuring workflow transitions

As a part of this solution, your workflow must be prepared to support the decision making process. You must create a transition in Jira for each possible decision you want to support.

For example: you can add two transitions called "Approve" and "Decline" to a status "Approval in progress".

Based on the incoming email's subject, one of these transitions will be carried out.

Configuring the mail handler

The Next-Gen Mail Handler is a flexible handler with various uses for incoming mail handling. In this section we'll detail the steps to support email approvals.

Apart from adding any extra actions depending on your requirements (such as adding a comment), you will need to add the Execute Transitions action to the section of your choice.

In our example below, we've added the Execute Transitions action to the "If issue found" section with the following settings:

  • Select transition: By email content

  • Regular Expression: (?i)Decision:\s*(.*)

  • Email Field: Subject

  • Transition: $!group1

As a result, the following is expected to happen:

  • an incoming reply email references an issue key in its subject

  • our mail handler finds the issue based on the issue key in the subject

  • we check what the decision is based on the subject (this is what the regular expression is used for)

  • we carry out the transition that is referenced after the word "decision" in the subject

Last updated