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 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.
The Email This Issue Mail Handler is a flexible handler with various uses for emails. In this section we detail what you need to do to support approval by email. For a step-by-step tutorial for configuring mail handlers see Setting up an Email Help Desk.
Important: When you configure the mail handler for email approval, make sure that the "Execute workflow transition" and "Initialize Fields" checkboxes are checked.
Configuring workflow transitions
Your workflow must be prepared to support decision-making. There must be a transition for each possible decisions you want to support. For example: add two transitions called "Approve" and "Decline" to a status "Approval in progress".
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. See the following example that extracts this content from the email subject:
A field rule should be added with the following attributes:
Goal: Execute workflow transition
Regular Expression: (?i)Decision: (.*)
Match in: Email Subject
Value from: Capture Group 1
Optionally, you might want to store the list of addresses who already replied in the multi-user picker field. To do that, the following field rule should be added:
Goal: Set Fields in Existing Issues
Regular Expression: .*
Match in: Sender Email Address
Value from: Capture Group : whole expression
Issue Field: select a multi user picker field, e.g. something called "Already Replied"