Read this tutorial if you want to implement email approval, i.e. request email recipients to give you feedback or make decisions on issues (e.g. approve or unapprove orders) via email replies.

Email approval requires multiple components in Email This Issue configured properly. 

Step-by-step guide

Namely:

Configure Email Template

Email Templates are powerful means to create eye candy emails with content your like, including custom fields, issue links, comments, previous email conversation etc.

There is a dedicated step-by-step general tutorial to customize an email template: Customize the Template Used by Email Button

Here we detail what you need to support decision making or approval.

Add links to the email template to represent each decisions

  1. it must be a "mailto:" type of link
  2. To Approve and Unapprove add this:
    1. "<a href="mailto:project@emailaddress.com?subject=$!issue.key - Decision: Approved">Approve</a>"
    2. "<a href="mailto:project@emailaddress.com?subject=$!issue.key - Decision: Unapproved">Unapprove</a>"
  3. These links will be shown in the email client as part of the email
  4. Users will be able to click them, and generate a response email with subject containing the issue key and the words Approved or Unapproved respectively.

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

You can easily do this using the Email button in the issue or using the Email This Issue Workflow Postfunction to automate approval request emails when the issue goes to "Approval in progress".

Configure Mail Handler

Email This Issue Mail Handler is a flexible handler that can do lots of things with emails. A detailed step-by-step tutorial is available to configure mail handlers: Setting up an Email Help Desk.

Here we detail what you need to do to support approval by email.

When you configure the mail handler, make sure that "Execute workflow transition" and "Initialize Fields" checkboxes are checked.

Configure Workflow Transitions

Your workflow must be prepared to support decision making.

There must be a transition for each possible decisions you want to support.

e.g. add two transitions called "Approve" and "Unapprove" to a status you like e.g. "Approval in progress".

Configure Field Rules

Field Contexts and Field Rules allow you to manipulate issues and issue fields based on email content.

What you need to do is a field rule to extract the decision information from the email content. Below is an example that extracts this from Email Subject:

  1. Add a Field Rule with the following attributes:
    1. Goal: Execute workflow transition
    2. Regular Expression: (?i)Decision: (.*)
    3. Match in: Email Subject
    4. Value from: Capture Group 1
    5. Order: 1
  2. Optionally you may want to store the approvers / unapprovers who already replied in a multi user picker field, to do this add a field rule:
    1. Goal: Set Fields in Existing Issues
    2. Regular Expression: .*
    3. Match in: Sender Email Address
    4. Value from: Capture Group : whole expression
    5. Issue Field: select a multi user picker field, e.g. something called "Already Replied"
    6. Order: 1

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.