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
- can be edited using the buildbuilt-in Rich Text Editor or directly as HTML
- can be fully customized as their layout and look-and-feel is not wrapped in Jira Velocity Macros
- dedicated Themes are available for Service Desk Management Customer Notifications
Email Template Themes
- Themes are based on Email This Issue's macro library
- Templates made of Themes can be edited in the Rich Text Template Editor
- Templates made of Themes are better tailored for Service Desk Service Management
The following Themes are available in Email This Issue:
|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 Desk Management Customer Invitation||Prepared for Service deskManagement, when customers are created automatically by Email This Issue|
|Service Desk Management Auto Acknowledge||Prepared for Service desk Management to send auto-response emails|
|Service Desk Management Request Participant Added||Prepared for Service deskManagement, when participants are adde added to a request|
|Service Desk Management Request Created||Prepared for Service desk Management customer notifications, when requests are created|
|Service Desk Service Management Request Updated||Prepared for Service desk Management customer notifications, when requests are modifedmodified|
|Service Desk Management Request Resolved||Prepared for Service desk Management customer notifications, when requests are resolved|
|Service Desk Service Management Request Reopened||Prepared for Service desk Management customer notifications, when requests are reopened|
|Service Desk Service Management Request Commented||Prepared for Service desk 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 Templates have five major attributes:
- name Name (mandatory): The name of the template.
- Description (optional): The description of the template.
- Category (optional)
- subject template: Template Categories are used to group templates and associate them with Contexts.
- Subject template (optional): This defines your email's subject. This field is supported by Velocity markup.
- HTML body template (mandatory): This defines the body of your email if the email is in HTML format.
- Text body template (mandatory): This defines the body of your emails if the email is in TEXT format.
The subject and body templates are developed using Velocity Macro syntax and HTML tags. They may include values of issue fields and custom fields.
Rich Text Editor
Email templates based on Themes may be edited using the buildbuilt-in Rich Text Editor. The Rich Text Editors comes with
- a WYSIWYG front end making basic formatting, tables etc easy to add, and with features like
- full-screen editing,
- preview and
- HTML Source editing.
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:
- Email Fields: mail body the user enters and mail subject the user enters manually
- Issue Fields: all standard issue attributes
- Custom Fields: all custom fields
Notification opt-out link: insert this into your template to provide a link for the customer to opt-out from customer notifications.
- Please note that this feature is only available for Service Management projects and a pre-requisite of this function is to have the Send Individual Emails option enabled in the Contexts settings.
- Clicking on the link will result in switching off both Jira and Email This Issue customer notifications. It will not affect Issue Notifications in Email this issue e.g. An Issue commented notification will not be affected, while a Public comment added notification will be affected.
Preview Templates in the Editor
Previewing templates right You can now preview your template in the template editor is now available. This simple addition accelerates template development by an order of magnitude.While developing your template bodyby using the preview tab on top of the page.
If you want to preview the template while creating it, simple press F9. This is a keyboard shortcut you can always type while editing your template. The keyboard shortcut will either open the preview detail tab of the editor and request you to enter an issue key (only needed once per editing) or open the preview result immediately .To enter the issue key once is necessary. 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. The issue key needs to be entered only once and it is preserved in the screen.
If the issue key has been entered, subsequently pressing press the F9 key , will to immediately open the preview dialog:
To close the dialog simply press again the F9 key again or the press Esc key.
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 open to show the Html HTML format of the template, while pressing F9 editing the Text body , will generate the Text output of the template to preview.
Once you developed your template, it is wise to test it before you start to use it in you 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:
- Select them as default templates for manual emails within a Contexts
- Add them to Event Notifications
- Select them in Workflow Post Function
- Select them to auto acknowledgment acknowledgement emails by the Mail Handlers