Table of Contents |
---|
...
Templates come to life when they are used sending The Email Button and the Email Screen, as Email Notification Schemes or fromfrom Workflow Post Function. You can configure Manual Emails, Email Notifications and Email This Issue workflow post functions with your custom templates.
...
Category: Emails can be grouped by categories. You can enter any text for here, a category will be automatically created if not exists. There are special categories for special uses:
- Response: by default templates in this category are selectable as canned response on the Email Screen
Subject Template
Subject template part of an Email Template is used to generate the final subject of the emails sent using this template. The Subject Template may contain static text and dynamic content such as issue fields and custom fields.
...
Variable | Description | Example | Type |
---|---|---|---|
$!currentUser | The current user object who's sending the email | $!currentUser.displayName Renders the full name of the current user | User |
$!mailSubject | Email subject entered manually in the Subject field in the manual email screen, notifications or workflow post functions. | String | |
$!mailBody | Email body entered manually in the Body field in the manual email screen, notifications or workflow post functions.
| String | |
$!issue | The Issue object with all available fields. The email is being sent in relation to this issue. | $!issue.summary Renders the issue summary in the template | Issue |
$!baseUrl | Base URL of the Jira Cloud site. Useful to add links to Jira screens or operations. | It is a simple String value you can use in building links. | String |
$!issueEvent | Issue event object if the email is being sent as an event notification | IssueEvent | |
$!comment | The comment the user enters during the operation. E.g. when editing an issue or executing a workflow transition. | #renderComment() Renders the comment | Comment |
$!changeLog | Changelog object holding information about all fields changed during the operation. Old and new values are available. | #renderChanges() Renders the changelog in a readable structure | Changelog |
$!worklog | Worklog object holding details of the worklog entered or edited. | #renderWorklog() Renders the worklog details | Worklog |
$!emailCommand | Email definition object holding all recipients, subject and body, issue event and comment details. | $!emailCommand.attachments Returns the list of attachments being added to the email | EmailCommand |
sentDate | A formatted date representing when the original email was processed by Email This Issue. Available only in Reply/Reply all/Forward for an email. | $!sentDate Prints the when the email was processed by Email This Issue | String |
stringUtils | String helper methods | $!stringUtils.isBlank($!issue.summary) returns true if the issue summary is empty or null $!stringUtils.join($!issue.labels, ", ") prints the labels separated by comma | org.apache.commons.lang3.StringUtils |
templateSupport | Support object useful in templates. Constantly enhanced object, it will receive more and more methods. | TemplateSupport |
...
Macro signature | Parameters | Description | Example |
---|---|---|---|
#renderDateTime($dateTimeValue $pattern $timezone) |
| Formats a dateTime field based on the pattern and the timezone. | #renderDateTime($!issue.created "dd MMM yyyy hh:mm a" "Australia/West") |
#renderIssueComments($order $num $restrictions) |
| Generic, multi-purpose comment rendering macro. | #renderIssueComments("desc" "all" "") prints all comments starting with the latest one #renderIssueComments("asc" "all" "") prints all comments starting with the first one prints the latest comment #renderIssueComments("desc" "all" "none") prints all comments which are not restricted #renderIssueComments("desc" "all" "public") prints all public comments starting with the latest one |
#renderLinkToPortal($linkText) |
| renders a link to the portal with a custom text. | #renderLinkToPortal("View Customer Portal") |
#renderLinkToPortalRequest($linkText) |
| renders a link to the request with a custom text. | #renderLinkToPortalRequest("Open request") |
#renderAllComments($comments) |
| Renders all comments (both public and internal) comments | #renderAllComments($!issue.comments) |
#renderComments($comments) |
| Renders the public comments | #renderComments($!issue.comments) |
#renderCommentsInReverseOrder($comments) |
| Renders the public comments in reverse order | #renderCommentsInReverseOrder($!issue.comments) |
#renderCustomField($issue $customFieldKey) |
| Renders the value of the custom field as displayed in jira | #renderCustomField($!issue, 'customfield_10603') |
#renderLastComment($issue) |
| Renders the last comment of the issue | #renderLastComment($!issue) |
...
Templates offer a handful of operaitons operations under the ... actions menu.
...