Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Macro signatureParametersDescriptionExample
#renderDateTime($dateTimeValue $pattern $timezone)
  • $dateTimeValue: the value to be formatted
  • $pattern: the pattern describing the date and time format. You can find description about formatting and patterns here
  • $timezone: the time zone used for formatting. You can find a list of in the Supported Time Zones Appendix
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)
  • $order: "asc" or "desc"
  • $num: an positive integer number or "all" to render all comments matching <restrictions>
  •  $restrictions: comment restrictions, values are
    • empty: render all comments regardless of the restrictions
    • "none": render comments which are not limited to groups, roles or which are not internal in Service Management
    • "public": render Service Management public comments
    • "internal": render Service Management internal comments

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
#renderIssueComments("desc" "1" "")
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)
  • $linkText: text to show for the link in html mails.
    • Default value:  "View portal"
    • in case of text email this parameter is ignored and the full URL will be generated
renders a link to the portal with a custom text.#renderLinkToPortal("View Customer Portal")
#renderLinkToPortalRequest($linkText)
  • $linkText: text to show for the link in html mails
    • Default value: "View request"
    • in case of text email this parameter is ignored and the full URL will be generated
renders a link to the request with a custom text.#renderLinkToPortalRequest("Open request")
#renderAllComments($comments)
  • $comments: The comments to render
Renders all comments (both public and internal) comments#renderAllComments($!issue.comments)

#renderChanges()


Renders the changelog in a readable structure#renderChanges()
#renderComments($comments)
  • $comments: The comments to render
Renders the public comments#renderComments($!issue.comments)
#renderCommentsInReverseOrder($comments)
  • $comments: The comments to render
Renders the public comments in reverse order#renderCommentsInReverseOrder($!issue.comments)
#renderCustomField($issue $customFieldKey)
  • $issue: the issue in the context
  • $customFieldKey
    • key of the custom field(eg. customfield_10001)
Renders the value of the custom field as displayed in jira#renderCustomField($!issue, 'customfield_10603')
#renderLastComment($issue)
  • $issue: The issue
Renders the last comment of the issue#renderLastComment($!issue)

Concatenate text to URLs

It is possible to add certain text to a URL link in a template.
For this, open the template in its raw HTML editor form and use the following code:

Code Block
#set($url = $issue.getCustomFieldValue('customfield_12345').value) <a href="$url/go" target="_blank">$url/go</a>

Make sure to use the correct customfield ID as per the below example:
Image Added

Template Operations

Templates offer a handful of operations under the ... actions menu.

...