...
...
...
...
...
...
Redirect | ||||||
---|---|---|---|---|---|---|
|
Note | ||
---|---|---|
| ||
Thank you for visiting our old product documentation site. Note that we are in the process of migrating our product documentation and soon we will not store or update our documentation here.Please navigate to our new documentation site and update your bookmarks accordingly. If you're looking for the former content of this page, click here. |
Table of Contents |
---|
Email templates define the content and layout of the emails that may be sent using Email This Issue.
...
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 | |
triggerType | Provides information about what type of event triggered the email sending.
| #if("$!triggerType" == "OPERATION") prints 'This is a manual email' when the email was sent manually | enum |
...
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) |
#renderChanges() | Renders the changelog in a readable structure | #renderChanges() | |
#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) |
#renderVersions($versions) |
| Renders the versions. | #renderVersions($!issue.fixVersions) |
#renderComment() | Renders the body of a comment. | #set($comment = $!issue.lastComment) | |
#renderComponents($components) |
| Renders the components. | #renderComponents($!issue.components) |
#renderDate($dateValue $pattern $timezone) |
| Formats a date field based on the pattern and the timezone. | #renderDate($!issue.created "dd MMM yyyy" "Australia/West") |
#renderLabels($labels) |
| Renders the lables. | #renderLabels($!issue.labels) |
#renderList($listitems) |
| Renders the items into a bullet list. | #renderList($!issue.affectedVersions) |
#renderIssueType($issue) |
| Renders the type of the issue. | #renderIssueType($!issue) |
#renderStatus($issue) |
| Renders the status of the issue. | #renderStatus($!issue) |
#renderPriority($issue) |
| Renders the priority of the issue. | #renderPriority($!issue) |
#renderUser($user) |
| Renders the user. | #renderUser($!issue.assignee) |
#renderAllCustomFields($issue) |
| Renders the value of all custom fields on an issue. | #renderAllCustomFields($!issue) |
#renderCustomFieldValue($fieldValue) |
| Renders the value of a custom field. | #renderCustomFieldValue($!issue.getCustomFieldValue('customfield_10603')) |
#renderWorklog() | Renders the worklog in details. | #renderWorklog() | |
#footer() | Renders the Email This Issue footer. | #footer() |
...