Email This Issue contains a powerful workflow post function to send fully customizable emails as part of the workflow transitions. Sending emails from transitions may be a better alternative to event notifications. As specific operations (e.g. Request Approved) may not be precisely represented by generic event types like Issue Updated.
The list of currently added post functions is available from the Emails / Workflow Post Functions menu.
Add a Post Function to the Workflow
The email post functions must be added or edited in the workflow editor in JIRA.
It is perfectly valid to add multiple Email This Issue post functions to the same transition, they will be called one after the other.
It is important to note that the post functions must be moved down before or after the function firing the event. This is needed because Email This Issue expects the issue to be updated and fully indexed before rendering issue fields in the email.
Post Function Details
The post function details include the following:
- WHEN or JQL criteria
- WHO or recipients.
- WHAT or content settings
Post Functions are part of the workflows and hence will be mapped to issues via the Workflow Schemes in Jira. However, the Email This Issue Post Function's JQL criteria makes it easy to better target the issues and send emails conditionally depending on the issue fields.
The below example will make sure that emails will be sent only when the issue is of Highest priority.
To enter a JQL which involves a user name (such as defining the assignee of an issue), follow the below steps:
- Under the JQL field, click Edit
- Enter the JQL as usual
- When it comes to entering a username, search for it, then click on Insert user
- Click Save to use the JQL or click Cancel to delete it
Recipients selected in the post function will receive the emails.
Emails may have To, Cc and Bcc recipients. For all of these recipient types you can enter or select:
- users from Jira
- email addresses
- Persons related to the issue or project: Assignee, Reporter, Watchers, Project Lead, Current User
- Project Roles
- User Groups
- Custom Fields that may hold email addresses or users or groups
Content settings in Email This Issue Post Functions specify the email template to use, and additional content that will be added to the email.
Content Settings attributes include:
|Template||An Email This Issue Template||The template selected here will be used to render the subject and body of the final email.|
|Subject||Text to be added to the email subject|
Text entered here will be combined into the final email's subject using the template above.
The template's $!mailSubject variable renders the entered value in the email subject
|Message||Text to be added to the email body|
Text entered here will be combined into the final email's Body using the template above.
The template's $!mailBody variable renders the entered value in the email body
The value selected in this field determines which issue attachments should be attached to the email.
- all: all attachments added
- none: none of the attachments added
- added in the last operation: attachments added as part of the operation that fired the event (e.g. Edit Issue)
- newest versions of all: newest version of all attachments. Attachments having the same name are considered versions of the same attachment.
- added recently: latest added attachments (Actually since we don't get any list about the added attachments, we have to figure out the latest added attachment. For this we ask for all the attachments of the issue and send only added in the last minute from the latest one.)
Additionally, you can configure the policy to filter internal attachments. When this option is enabled and the issue is in a Service Management project, then the attachments that were added via internal comments will not be included in the email.
|Email Format||HTML or TEXT||The format of the email to be sent.|