Email templates have always been at the core of JETI. The ability to customize email templates and use different templates per project and/or issue type was part of 1.0 version.
Version 5.1 has made the development of custom email templates easier than ever by introducing the built-in template editor feature. Using the template editor, you can easily add new templates, tailor them to your needs, test and publish them for use.
Start from the Templates tab of the configuration page.
Templates are created from a base Jira template or a theme so that they are preloaded with content and the default look and layout.
Template Themes are a new concept in Email This Issue. Templates based on themes are more powerful and
Themes are templates for the Email Templates. Creating a template from a Theme has a few advantages:
The following Themes are available in Email This Issue:
Theme | Purpose |
---|---|
All Details | Renders all issue fields including all custom fields defined for the issue and all issue comments |
Issue Commented | Prepared for Issue Commented notifications |
Issue Modified | Prepared for Issue Updated notifications, renders the changelog and comment entered |
Work Logged | Prepared for Worklog related notifications, renders the workflog and comment |
Service Management Customer Invitation | Prepared for Service Management, when customers are created automatically by Email This Issue |
Service Management Auto Acknowledge | Prepared for Service Management to send auto-response emails |
Service Management Request Participant Added | Prepared for Service Management, when participants are added to a request |
Service Management Request Created | Prepared for Service Management customer notifications, when requests are created |
Service Management Request Updated | Prepared for Service Management customer notifications, when requests are modified |
Service Management Request Resolved | Prepared for Service Management customer notifications, when requests are resolved |
Service Management Request Reopened | Prepared for Service Management customer notifications, when requests are reopened |
Service Management Request Commented | Prepared for Service Management customer notifications, when requests are commented with a public comment |
Empty | General-purpose minimal template, only rendering the mail body variable. |
Issue List | Prepared to send issue lists in a single email from the Issue Navigator. |
Bounce Email | Templates created from this theme may be used to bounce back incoming emails. |
Templates have five major attributes:
The subject and body templates are developed using Velocity Macro syntax and HTML tags. They may include values of issue fields and custom fields.
Email templates based on Themes may be edited using the built-in Rich Text Editor. The Rich Text Editors comes with
To add fields to your subject or mail body templates, you can use the "Field Picker" control. Pick a field from the list then copy and paste the velocity code to the template to have the value of the field rendered in the email. You can add issue or custom fields directly to the template using $customFieldManager and $issue in the Velocity Context. The Field Picker just makes this a lot easier.
The "Field Picker" drop-down contains:
Notification opt-out link: insert this into your template to provide a link for the customer to opt-out from customer notifications.
|
You can now preview your template in the editor by using the preview tab on top of the page.
If you want to preview the template while creating it, simple press F9. This keyboard shortcut will either open the preview tab of the editor and request you to enter an issue key (only needed once per editing) or open the preview result immediately if an issue key has been previously entered.
The template preview result will be generated using the fields and details of the issue you specify.
If the issue key has been entered, press the F9 key to immediately open the preview dialog:
To close the dialog simply press the F9 key again or press Esc.
To further improve efficiency, the preview automatically detects which part of the template you are editing. If you are editing the Html body, the preview will show the HTML format of the template, while pressing F9 editing the Text body will generate the Text output of the template.
Once you developed your template, it is wise to test it before you start to use it in your projects. Select the "Test" operation from the template list (see first screenshot above).
Enter the key of the issue you want to test the template with. Enter some subject text and mail body then click Send or Preview. Either an email will be sent to your email address or a Preview Dialog is shown.
Once the templates are complete, they are available to be used for sending emails in various ways:
Enhance your template with complex content, email signature etc.