Configure Email Approval

Summary

This guide is to show you how to set up a typical email help desk without Jira Service Desk,using only Email This Issue.

Prerequisites

This tutorial requires the following:

  • Email This Issue add-on installed in JIRA
  • A license key saved in JIRA
  • Have an SMTP server configured in Jira
  • Have a POP3/IMAP server configured in Jira

Note: You must be a Jira administrator to be able to perform the below settings.

Objectives

By following this guide you will be able to configure email approval based on:

  • Mail Handler
  • Workflow transitions
  • Field Rules

Step-by-step guide

For the basics of creating customized email templates, please see the Customize the Template Used by Email Button tutorial.

In order to support decision making or approval via email, you will need to add links to an email template to represent each decision:

  1. it must be a "mailto:" type link:
  2. To "Approve" and "Deny" 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: Denied">Deny</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 "Denied" 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".

Configuring the Mail Handler

For a step-by-step tutorial on configuring mail handlers, please see the Setting up an Email Help Desk tutorial.

In order to support decision making or approval via email, you will need to configure the mail handler, making sure that the "Execute workflow transition" and "Initialize Fields" check boxes are checked in.

Configuring Workflow Transitions

In order to support decision making or approval via email, you will need to have a transition in your workflow for each possible decision you want to support.

For example, you may add two transitions called "Approve" and "Deny" to a status you like, e.g. "Approval in progress".

Configuring Field Rules

For the basics of Field Rules, please see the Field Rules documentation.

In order to support decision making or approval via email, you will need to create a field rule to extract information from the email content.

Below is an example that extracts information from the email's subject:

  1. Add a Field Rule with the following attributes:
    1. Goal: Execute workflow transition
    2. Regular Expression: (?i)Decision:s*(.*)
    3. Match in: Subject
    4. Value from: Capture Group 1
    5. Order: 1

  2. Optionally, you may want to store the decision makers ("approvers") 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
  • Enhance Jira Service Desk with Email This Issue — This tutorial explains the steps you understand how you can enhance Jira Service Desk with Email This Issue to process incoming emails or to send customer notifications.
  • Setting up an Email Help Desk — This tutorial explains the steps you need to follow in order to set up a typical email help desk using Email This Issue without JIRA Service Desk.
  • Customize the Template Used by Email Button This tutorial explains the steps you need to take to customize the template Email This Issue uses when you send emails manually with the Email button.