Email This Issue
📈 Marketplace❓ Support❤️ Feedback🏠 META-INF Apps
Email This Issue - for Jira Server/Data Center
Email This Issue - for Jira Server/Data Center
  • ⬇️Start Here
  • Email This Issue - for Jira Server/DC
  • Features
  • Secure the email channel with Email This Issue
  • Comparing Email This Issue and Jira Server/DC
  • 🤓Documentation
    • Outgoing Emails
      • Sending manual emails
        • The difference between email editors
        • Enabling template categories so templates can be chosen on the Email screen
        • Mail Generation Queue (formerly called Event Queue)
        • Manual Email Default Settings
      • Sending issue filters by email
      • Email templates
        • Adding custom macro to email templates
        • Adding Email Audit Log to email templates
        • Adding fields to email templates
        • Adding issue comments to emails
        • Adding issue link information to your template
        • Adding issue operation links to the email
        • Adding a signature with a company logo to emails
        • Adding user properties to emails
        • Disabling links and avatars or icons in templates
        • Formatting Date and Time values
        • Using reply templates
        • Using Mail Body Initializer templates
        • Rendering templates within templates
        • Velocity Context in email templates
        • Formatting number values
        • Searching for issues in email templates
        • Changelog information in email templates
        • Canned responses
      • Contexts
        • Context Resolution Algorithm
      • Event Notifications
      • Distribution lists
      • Workflow post functions
      • Custom fields
    • Incoming Emails
      • Attachment Filtering
      • Next Generation Mail Handlers
        • Jira automation and Next Generation Mail Handlers
        • Using regular expressions
      • Classic Mail Handlers - Deprecated
        • Mail Handler Error Log
        • Step-by-step Classic Mail Handler to Next Generation Mail Handler migration aid
        • Field Rules
        • Phasing out the Classic Mail Handler
        • Comparing the Classic and the Next Generation Mail Handlers
    • Integrations
      • CRM for Jira
      • nFeed
      • Glass Documentation
      • API - Integration with other services
    • Administration
      • General configuration
      • Email Audit Log
      • Outgoing Mail Connections
      • Outgoing Mail Queue
      • Incoming Mail Connections
      • Incoming Mail Queue
      • Incoming Mail Log
      • Backup and restore settings
        • Backup and restore administration
          • Backup menu
          • Restore menu
        • Backup and Restore Tutorials
          • Backup and restore for empty email settings
          • Backup and restore only parts of a configuration
          • Backup and restore every setting in the same instance
      • OAuth2 Authorizations in Email This Issue
        • OAuth2 Client Credentials
        • Authorizing Email This Issue to access Gmail accounts
        • Authorizing Email This Issue to access Microsoft 365 accounts
        • Enabling OAuth2 Authorization in your Google Account
        • Enabling OAuth2 authorization in your Microsoft 365 account
        • Troubleshooting guides for Microsoft OAuth2 Connections
          • How to fix "Authorization Was Interrupted" error
          • How to fix "BAD User is authenticated but not connected" error
          • How to fix "401 Unauthorized" error
          • How to fix "key expires_in " error
          • How to fix "Need admin approval" error
      • Alerting via Webhooks
        • Webhooks
          • Configuring Slack to receive webhooks
          • Configuring OpsGenie to receive webhooks
        • Webhook execution logs
      • Email Security
    • Service management integration
    • JQL Functions
    • Top-level menu navigation
  • ☁️Server to Cloud Migration
    • Server to Cloud - Automatic Migration tool
    • Server to Cloud - Manual migration guide for Email This Issue
      • Overview of available features
      • Differences of the Server and Cloud user interface
      • Migrating Outgoing Settings
        • Migrating Templates
        • Migrating Notifications
        • Migrating Manual Email Defaults
        • Migrating Contexts
        • Migrating Canned Responses
        • Migrating Post Functions
        • Migrating Outgoing Mail Connections
      • Migrating Incoming Settings
        • Migrating Classic Mail Handlers
        • Migrating Next Generation Mail Handlers
        • Migrating Incoming Mail Connections
        • Migrating Incoming Mail Queue Settings
        • Migrating Incoming Mail Log Settings
      • Migrating Other Settings
        • Migrating OAuth2 Credentials
        • Migrating global default email settings
        • Migrating permissions for sending emails manually
        • Migrating recipient restrictions
  • ❓FAQ
    • FAQ
      • How to bypass workflow conditions
      • How to avoid email loops
      • How to control who to send emails to
      • How to customize Email From in outgoing emails
      • How to enable logging
      • How to install license keys
      • How to find out why the Email button is missing
      • How to obtain a community or non-profit license
      • How to prevent duplicate emails
      • How to remove old content from reply emails
      • How to send personalized emails to recipients
      • How to set up auto-reply or acknowledgment emails
      • How to track cases when you don't get any emails
      • How to view the log of incoming and outgoing emails
      • The iOS Mail app does not show attachments
      • How to route emails to projects
      • How to maintain email threads in Jira
      • How to fix issues with a corrupt index state
      • How to set polling interval for mail accounts manually
    • Tutorials
      • Configuring email approval
      • Customizing the email template used with manual emails
      • Enhance Jira Service Management with Email This Issue
      • Getting Started
      • Setting up an Email Help Desk
      • Setting up customized notifications
      • Setting up a Service Management with a Next-Gen Mail Handler
  • 🌪️Misc
    • Open Source Components
    • Pricing Updates
      • Pricing Update effective October 1st 2018
      • Pricing Update effective December 1, 2021
    • End of Support Policy
    • Security Advisories
      • Email This Issue Security Advisory 2020-02-18
    • Database Tables
    • Translations
  • 🆕Release Notes
    • Release notes
      • 9.x.x
        • 9.15.0 Jira 10 compatibility
        • 9.13.0 Improvements and Fixes
        • 9.11.0 Improvements and fixes
        • 9.10.0 Major improvements and fixes
        • 9.9.1 Improvements and fixes
        • 9.9.0.2 Major improvements and fixes
        • 9.8.0 Improvements and fixes
        • 9.7.0 Improvements and fixes
        • 9.6.0 Improvements and fixes
        • 9.5.0 Improvements and fixes
        • 9.4.0 Bugfixes
        • 9.3.3. Improvements and fixes
        • 9.3.2 Major improvements
        • 9.3.1 Automatic cloud migration
        • 9.2.2.1 Bugfixes
        • 9.2.2 Improvements and fixes
        • 9.2.1.3 Compatibility changes for Jira 9.0.0
        • 9.2.1 Major improvements
        • 9.2.0 Improvements and fixes
        • 9.1.1 Improvements and fixes
        • 9.1.0.1 Alerting and other major new features
        • 9.0.2 Bugfixes, next step in deprecating the Classic Mail Handler
        • 9.0.1 Minor improvement and fixes
        • 9.0.0 Major improvements
        • 9.12.0 Improvement and fixes
        • 9.17 Improvements and Fixes
        • 9.18.0 Improvements and fixes
      • 8.1.x
        • 8.1.3 Classic handler is deprecated, timezone support, bug fixes
        • 8.1.2 Important bug fixes
        • 8.1.1 Microsoft 365 OAuth2, improvements and fixes
        • 8.1.0 Microsoft 365 OAuth2, improvements and fixes
      • Up to 8.0.6
Powered by GitBook
On this page
  • Template Context Objects
  • jetiFieldRenderer
  • jetiFieldFormatter
  • templateSupport
  • Template macros
  • Assets related macros

Was this helpful?

  1. Documentation
  2. Outgoing Emails
  3. Email templates

Velocity Context in email templates

Email templates are velocity macro files. When email templates are used to render email body, the following Velocity context attributes are available.

Template Context Objects

Name
Type
Description

attachmentsManager

Manager component

baseurl

String

The base url of the Jira instance, set under General Configuration.

buildutils

customfieldManager

Support for adding custom fields to outgoing emails

dateformatter

Date format support

issue

Issue extended with support for processing in velocity templates

i18n

I18n support

jirakeyutils

jirautils

remoteUser

Current user running the action or null

rendererManager

stringUtils

String helper methods

textutils

Jira's text util methods

userutils

jetiFieldRenderer

Support for field rendering in templates

jetiFieldFormatter

Support for date/time formatting in templates

templateSupport

Support for email templates, rendering, formatting

number

currentUserInfo

$!currentUserInfo.user: current user object $!currentUserInfo.roles: current user's project roles $!currentUserInfo.groups: current user's groups.

userPropertyManager

Access to Jira user properties.

Usage:

References to user properties by property name must be prefixed with "jira.meta." due to the nature of the Jira API.

E.g. If the user has a property, called "phone", the phone property may be rendered as

$!userPropertyManager.getPropertySet(<user object>).getString("jira.meta.phone")

currentTimestamp

Date and time of rendering the template, this like "now".

jiraDurationUtils

Util class responsible for printing durations in various formats.

diffutils

Compares two string values and renders wiki markup diffs.

isJIRA610OrLater

boolean

Determines whenever the currently installed Jira version is at least 6.1.0

datetimeformatter

Date-time format support

timeSpentFieldId

String

The ID of the issue's time spent field

padSize

Integer

Default padding size for templates (20)

lfbean

Support for accessing Jira's look and feel parameters

menuTextHighlightColour

String

Jira's menu text highlight color

textHighlightColour

String

Jira's text highlight color

jiraLogoUrl

String

URL that points to Jira's logo image

topBackgroundColour

String

Jira's top bar background-color

topTxtColour

String

Jira's top bar text color

topHighlightColor

String

Jira's top bar highlight color

topTextHighlightColor

String

Jira's top bar text highlight color

topSeparatorBackgroundColor

String

Jira's top bar separator background-color

menuTxtColour

String

Jira's menu text color

menuBackgroundColour

String

Jira's menu background-color

menuSeparatorColour

String

Jira's menu separator color

textHeadingColour

String

Jira's header text color

textLinkColour

String

Jira's link text color

textActiveLinkColour

String

Jira's active link text color

textFontFamily

String

Jira's text font

textSize

String

Jira's text size

textColour

String

Jira's text color

textSubtleColour

String

Jira's subtle text color

borderColour

String

Jira's border color

auiPanelBackgroundColour

String

Atlassian User Interface's panel background color

auiPanelBorderColour

String

Atlassian User Interface's panel border color

auiInfoBackgroundColour

String

Atlassian User Interface's info panel background color

auiInfoBorderColour

String

Atlassian User Interface's info panel border color

auiSuccessBackgroundColour

String

Atlassian User Interface's success panel background color

auiSuccessBorderColour

String

Atlassian User Interface's success panel border color

auiErrorBackgroundColour

String

Atlassian User Interface's error panel background color

auiErrorBorderColour

String

Atlassian User Interface's error panel border color

auiWarningBackgroundColour

String

Atlassian User Interface's warning panel background color

auiWarningBorderColour

String

Atlassian User Interface's warning panel border color

linkstyle

String

Comment author link style

commentBackgroundl

String

Comment quotes color

jetiFieldRenderer

jetiFieldRenderer provides the following methods to render issue fields:

Method
Description
Usage

String renderCustomField(Issue issue, String fieldKey);

Renders a custom field value as a string value

$!jetiFieldRenderer.renderCustomField($!issue, "customfield_10011")

Object renderCustomFieldAsObject(Issue issue, String fieldKey);

Returns the value of the custom field as Raw value.

The Raw or Object value allows for further processing or access to methods, and attributes

$!jetiFieldRenderer.renderCustomFieldAsObject($!issue, "customfield_10011")

E.g. render the Display name attribute of a user selected in a user picker field

$!jetiFieldRenderer.renderCustomFieldAsObject($!issue, "customfield_10011").getDisplayName()

String renderVersions(Collection<Version> versions);

Renders the given versions as a comma-separated list of version names.

E.g. $!jetiFieldRenderer.renderVersions($!issue.getFixVersions())

String renderComponents(Collection<ProjectComponent> components);

Renders the given components as a comma-separated list of component names.

E.g. $!jetiFieldRenderer.renderComponents($!issue.getComponents())

String renderLabels(Collection<Label> labels);

Renders the given labels as a comma-separated list of label names.

E.g. $!jetiFieldRenderer.renderLabels($!issue.getLabels())

String renderSecurityLevel(GenericValue securityLevel);

Renders the name of the given Security Level object

$!jetiFieldRenderer.renderSecurityLevel($!issue.getSecurityLevel())

String renderIssueConstant(IssueConstant issueConstant);

Renders the name of an Issue type, Resolution, Priority or Status

$!jetiFieldRenderer.renderIssueConstant($!issue.getPriority())

String renderUser(User user);

Renders the DisplayName attribute of a User or Application User object safely, if null, returns empty string

$!jetiFieldRenderer.renderUser($!issue.getAssignee())

String renderDateTime(Timestamp ts);

Renders a Timestamp object using Jira's default date format, DateTimeFormat.format()

E.g.

  • $!jetiFieldRenderer.renderDateTime($!issue.getCreated())

  • render the value of a date or date time picker field: $!jetiFieldRenderer.renderDateTime($!jetiFieldRenderer.renderCustomFieldAsObject($!issue, "customfield_10011"))

String renderEstimate(TemplateIssue ti, I18nHelper i18n);

Renders the issue's Original estimate in nicely readable format, like 3d 4h 5m

$!jetiFieldRenderer.renderEstimate($!issue, $i18n)

String renderRemainingEstimate(TemplateIssue ti, I18nHelper i18n);

Renders the issue's Remaining estimate in nicely readable format, like 3d 4h 5m

$!jetiFieldRenderer.renderOriginalEstimate($!issue, $i18n)

String renderWorklog(TemplateIssue ti, I18nHelper i18n);

Renders the issue's Logged Work Time in nicely readable format, like 3d 4h 5m

$!jetiFieldRenderer.renderWorklog($!issue, $i18n)

I18nHelper getI18nBean(String locale);

E.g. get the language resources for French: $!jetiFieldRenderer.getI18nBean("fr")

String getLinkToCustomerPortal(Issue issue);

Returns an absolute link to the customer portal belonging to the service management project of the issue.

If the issue is not from a Service Management project, it returns null

$!jetiFieldRenderer.getLinkToCustomerPortal($!issue)

String getLinkToIssueInCustomerPortal(Issue issue);

Returns an absolute link to the issue in the customer portal belonging to the service management project of the issue.

If the issue is not from a Service Management project, it returns null

$!jetiFieldRenderer.getLinkToIssueInCustomerPortal ($!issue)

jetiFieldFormatter

jetiFieldFormatter is an object in the template context that may be used to format date or date time values.

It provides the following methods:

Method
Description
Usage

DateTimeFormatter getJiraDateTimeFormatter()

#set ($formatter = $jetiFieldFormatter.getJiraDateTimeFormatter())

DateTimeFormatter getJiraDateTimeFormatter(String style)

#set ($formatter = $jetiFieldFormatter.getJiraDateTimeFormatter("COMPLETE"))

DateFormat getJavaDateFormat()

#set ($formatter = $jetiFieldFormatter.getJavaDateFormat())

DateFormat getJavaDateFormat(int style)

DateFormat getJavaDateFormat(int style, String locale)

DateFormat getJavaDateTimeFormat()

DateFormat getJavaDateTimeFormat(int dateStyle, int timeStyle)

DateFormat getJavaDateTimeFormat(int dateStyle, int timeStyle, String locale)

DateFormat getJavaDateTimeFormat(String pattern)

#set($formatter = $jetiFieldFormatter.getJavaDateTimeFormat("dd/MM/yyyy HH:mm"))

String formatSafely(DateFormat formatter, Date value)

Formats a date value using the formatter created using either of the above methods

$!jetiFieldFormatter.formatSafely($!formatter, $issue.updated)

or

$!jetiFieldFormatter.formatSafely($!formatter, $issue.getCustomFieldValue("customfield_12345"))

TimeZone getTimeZone(String tzID)

$!formatter.setTimeZone($jetiFieldFormatter.getTimeZone("America/Los_Angeles"))

TimeZone getDefaultTimeZone()

String[] getAvailableTimeZoneIDs()

Returns all time zone IDs available in Jira.

templateSupport

Method
Description
Usage

String encodeUrl(String url);

$!templateSupport.encodeUrl($urlVariable)

String encodeUrl(String url, String encoding);

$!templateSupport.encodeUrl($urlVariable, <desired encoding>)

boolean issueMatchesJQL(String jqlQuery, Issue issue);

Checks if the given issue matches the JQL query

#if($!templateSupport.issueMatchesJQL("mycustomfield = somevalue AND component=ImportantComponent", $!issue)

## do something...

#end

I18nHelper getI18nHelper(String localeName);

Create an I18nHelper object for the locale

Local name is composed of language code and country code.

e.g. "fr" is for french language, while "fr_FR" is the french spoken in France.

#set($i18nFrench = $!templateSupport.getI18nHelper("fr_FR")

I18nHelper getI18nHelper(Locale locale);

Create an I18nHelper object for the locale

Local name is composed of language code and country code.

e.g. "fr" is for french language, while "fr_FR" is the french spoken in France.

#set($frenchLocale = $!templateSupport.getLocale("fr_FR")

#set($i18nFrench = $!templateSupport.getI18nHelper($frenchLocale)

Locale getLocale(String localeName);

Creates a Java Locale object to be used in date / number formatting or language support.

Local name is composed of language code and country code.

e.g. "fr" is for the French language, while "fr_FR" is the French spoken in France.

#set($frenchLocale = $!templateSupport.getLocale("fr_FR")

boolean isAgent(ApplicationUser applicationUser, Project project);

Determines if the given use is an Service Management Agent in the given project.

#if($!templateSupport.isAgent($!issue.reporter, $!issue.projectObject)

...

#end

boolean isInternalComment(Comment comment);

Determines if the give comment is an Service Management Internal comment in the current issue.

#if($!templateSupport.isInternalComment($!comment))

...

#end

TemplateIssueSearchResults searchForIssuesByJQL(String jql);

Returns a list of issues matching the given JQL query.

#set($searchResults = $!templateSupport.searchForIssuesByJQL("project=IT AND resolution=Unresolved", 10))

#foreach($result in $searchResults.getResults())

$velocityCount - $!result.key (comments: $!result.comments.size())

#end

String getCustomerVisibleStatus(Issue issue);

Returns the Customer Visible Status name of the issue in a Service Management project.

#set($!customerVisibleStatus = $!templateSupport.getCustomerVisibleStatus($!issue)

Issue firstIssueMatchingJQL(String jql);

Returns the first issue that matches the given JQL query.

#set($firtstIssue = $!templateSupport.firstIssueMatchingJQL("project = $issue.projectObject.key AND assignee=$!currentUser.name AND priority = Highest"))

$!firstIssue.summary

String getParentValueFromCascadingSelectFieldValue(Map cascadeSelectFieldValue); String getChildValueFromCascadingSelectFieldValue(Map cascadeSelectFieldValue);

Returns the parent or child value of a Cascade Select custom field.

#set($parentValue = $!templateSupport.getParentValueFromCascadingSelectFieldValue($!issue.getCustomFieldValue("customfield_12345"))

#set($childValue = $!templateSupport.getChildValueFromCascadingSelectFieldValue($!issue.getCustomFieldValue("customfield_12345"))

customfield_12345 is the key of a cascade select field

String getCurrentUsersTimeZoneId()

Returns the time zone id set in the current user’s profile.

The issue was updated at #renderDateTime($!issue.updated "yyyy-MM-dd'T'HH:mmZ'['z']'" $!templateSupport.currentUsersTimeZoneId) Please note that the capital letter T in the above code is just a placeholder, an example to mark that after the date, the time value comes next.

TemplateIssueSearchResults searchForIssuesByJQL(String jql, int maxresults);

Same as above, but limits the results to the given number of issues.

Template macros

Macro signature

Parameters

Description

Example

#escapeHtml($value)

  • $value: the value with HTML that should be escaped

Escapes the HTML in a given value, therefore it will be displayed as text.

#escapeHtml("<p>Sample html</p>")

#renderVersions($versions)

  • $versions: the list of versions to render

Renders the versions.

#renderVersions($!issue.fixVersions)

#renderComments($issue)

  • $issue: the issue whose comments are to be rendered

Renders the public comments of the issue.

#renderComments($!issue)

#renderCommentsInReverseOrder($issue)

  • $comments: the issue whose comments are to be rendered

Renders the public comments os the issue in reverse order.

#renderCommentsInReverseOrder($!issue)

#renderCurrentCommentIfPublic()

Renders the current comment if it is public.

#renderCurrentCommentIfPublic()

#renderServiceDeskPublicComments($issue)

  • $issue: the issue whose comments are to be rendered

Renders the public comments of the issue.

#renderServiceDeskPublicComments($!issue)

#renderServiceDeskInternalComments($issue)

  • $issue: the issue whose comments are to be rendered

Renders the internal comments of the issue.

#renderServiceDeskInternalComments($!issue)

#renderAllComments($issue)

  • $issue: the issue whose comments are to be rendered

Renders both public and internal comments of the issue.

#renderAllComments($!issue)

#renderLastComment($issue)

  • $issue: the issue whose last comment is to be rendered

Renders the last comment of the issue.

#renderLastComment($!issue)

#renderCurrentComment()

Renders the current comment.

#renderCurrentComment()

#renderComment()

Renders the current comment.

#renderComment()

#renderComponents($issue)

  • $issue: the issue whose components are to be rendered

Renders the components of the issue.

#renderComponents($!issue)

#renderDateTime($dateTimeValue $pattern $timezoneId)

  • $dateTimeValue: the value to be formatted

Formats a date-time field based on the pattern and the timezone.

#renderDateTime($!issue.created "dd MMM yyyy hh:mm a" "Australia/West")

#renderDate($dateValue $pattern $timezoneId)

  • $dateValue: the value to be formatted

Formats a date field based on the pattern and the timezone.

#renderDate($!issue.created "dd MMM yyyy" "Australia/West")

#renderLabels($issue)

  • $issue: the issue whose labels are to be rendered

Renders the labels of the issue.

#renderLabels($!issue)

#renderList($listitems)

  • $listitems: the list of items to be rendered

Renders the items into a bullet list.

#renderList($!issue.affectedVersions)

#renderFlatList($listitems)

  • $listitems: the list of items to be rendered

Renders the items into a comma-separated list.

#renderFlatList($!issue.affectedVersions)

#renderProject($issue)

  • $issue: the issue whose project name is to be rendered

Renders the project name of the issue.

#renderProject($!issue)

#renderDescription($issue)

  • $issue: the issue whose description is to be rendered

Renders the description of the issue.

#renderDescription($!issue)

#renderEnvironment($issue)

  • $issue: the issue whose Environment field is to be rendered

Renders the value of the Environment field from the issue.

#renderEnvironment($!issue)

#renderIssueType($issue)

  • $issue: the issue whose type is to be rendered

Renders the type of the issue.

#renderIssueType($!issue)

#renderCustomerVisibleStatus($issue)

  • $issue: the issue whose status is to be rendered

Renders the status of the issue that is visible to the customer.

#renderCustomerVisibleStatus($!issue)

#renderStatus($issue)

  • $issue: the issue whose status is to be rendered

Renders the status of the issue.

#renderStatus($!issue)

#renderPriority($issue)

  • $issue: the issue whose priority is to be rendered

Renders the priority of the issue.

#renderPriority($!issue)

#renderResolution($issue)

  • $issue: the issue whose resolution is to be rendered

Renders the resolution of the issue.

#renderResolution($!issue)

#renderIssueConstant($issueConstant)

  • $issueConstant: the value of an issue system field

Renders the value of the issue system field.

#renderIssueConstant($!issue.status)

#renderOriginalEstimate($issue)

  • $issue: the issue whose original estimate is to be rendered

Renders the original estimate of the issue.

#renderOriginalEstimate($!issue)

#renderRemainingEstimate($issue)

  • $issue: the issue whose remaining estimate is to be rendered

Renders the remaining estimate of the issue.

#renderOriginalEstimate($!issue)

#renderTimeSpent($issue)

  • $issue: the issue whose time spent is to be rendered

Renders the time spent field value.

#renderOriginalEstimate($!issue)

#renderSummary($issue)

  • $issue: the issue whose summary is to be rendered

Renders the summary of the issue.

#renderSummary($!issue)

#renderUser($user)

  • $user: the user to be rendered

Renders the user.

#renderUser($!issue.assignee)

#renderCommentBody($commentObject)

  • $commentObject: the comment whose body is to be rendered

Renders the body of a comment.

#renderCommentBody($!comment)

#renderTextWithCommentRenderer($textToRender)

  • $textToRender: the text that should be rendered

Renders the given text with the comment renderer.

#renderTextWithCommentRenderer($!worklog.comment)

#renderCustomField($issue $customFieldKey)

  • $issue: the issue whose custom field is to be rendered

  • $customFieldKey: the key of the custom field

Renders the value of a custom field.

#renderCustomField($!issue "customfield_10006")

#renderAllCustomFields($issue)

  • $issue: the issue whose custom fields are to be rendered

Renders the value of all custom fields on an issue.

#renderAllCustomFields($!issue)

#renderWorklog($worklog)

  • $worklog: the worklog entry to be rendered

Renders a worklog entry.

#renderWorklog($!issue.worklogs.get(0))

#renderWorklogs($issue)

  • $issue: the issue whose worklog entries are to be rendered

Renders all worklog entries of an issue.

#renderWorklogs($!issue)

#renderUserProperty($user $propertyName)

  • $user: the user whose property is to be rendered

  • $propertyName: the name of the property to be rendered

Renders one of the user's property.

#renderUserProperty($!issue.assignee "phone")

#footer()

Renders the Email This Issue footer.

#footer()

#renderLinkToCustomerPortal($issue $linkText)

  • $issue: the issue whose customer portal link is to be rendered

  • $linkText the text of the link

Renders a link to the main page of the issue's customer portal.

#renderLinkToCustomerPortal($!issue "Customer Portal")

#renderLinkToIssueCustomerPortal($issue $linkText)

  • $issue: the issue whose customer portal link is to be rendered

  • $linkText the text of the link

Renders a link that points to the issue in its customer portal.

#renderLinkToIssueCustomerPortal($!issue "Customer Portal")

#renderTemplate($templateId)

  • $templateId: the ID of the template to be rendered

Renders a template.

#renderTemplate(1)

#renderIssueComments($order $num $restriction)

  • $order: the order in which the comments should be displayed Possible values:

    • empty or 'asc': the comments will be ordered by their creation date, ascending

    • 'desc': the comments will be ordered by their creation date, descending

  • $num: limit the number of comments that should be rendered Possible values:

    • 'all': every comment will be rendered

    • any integer: maximum the indicated number of comments will be rendered

  • $restriction: comment rendering can be restricted by the comment's visibility

  • Possible values:

    • empty or 'none': both public and internal comments will be rendered

    • 'public': only public comments will be rendered

    • 'internal': only internal comments will be rendered

Renders the comments of an issue.

#renderIssueComments("desc" 10 "all")

#renderOptOutLink($linkText)

  • $linkText: the text of the link

Renders a link that customers can use to unsubscribe from notifications.

#renderOptOutLink("Unsubscribe")

Assets related macros

It is possible to render only the object names from an Assets field by using the #renderCustomField($issue $customFieldKey) macro.

PreviousRendering templates within templatesNextFormatting number values

Last updated 2 months ago

Was this helpful?

See details .

See details .

See details .

Support for Number formatting in templates. See the API

Returns a I18nBean for the given locale, locale string follows

Returns a native Jira object

Returns a native Jira object configured with provided

Returns a Java object for date formatting

Returns a Java object configured with the value of the style constants (see java )

Returns a Java object configured with the value of the style constants (see java ) and a locale.

Example for locales: en, en_US, fr, de, see more examples in the

Returns a Java object for date time formatting

Returns a Java object for date time formatting configured with the value of the style constants (see java )

Returns a Java object for date time formatting configured with the value of the style constants (see java ) and a locale.

Returns a Java object for date time formatting configured with a pattern

Returns the matching the id. TimeZone can be set in the Java date time formatters created above

Returns the default in Jira.

is part of the Jira API

is a standard way to format dates in Java

Calls to encode rendered URLs in email templates using UTF-8 encoding

Calls to encode rendered URLs in email templates using the encoding specified

$pattern: the pattern describing the date and time format. You can find description about formatting and patterns

$timezoneId: the time zone used for formatting. You can find a list in the Appendix

$pattern: the pattern describing the date format. You can find description about formatting and patterns

$timezoneId: the time zone used for formatting. You can find a list in the Appendix

🤓
DateTimeFormatter
DateFormat
com.atlassian.jira.mail.util.MailAttachmentsManager
com.atlassian.jira.util.BuildUtils
com.atlassian.jira.issue.CustomFieldManager
com.atlassian.jira.web.util.OutlookDate
com.atlassian.jira.mail.TemplateIssue
com.atlassian.jira.util.I18nHelper
com.atlassian.jira.util.JiraKeyUtils
com.atlassian.jira.util.JiraUtils
com.atlassian.jira.user.ApplicationUser
com.atlassian.jira.issue.RendererManager
org.apache.commons.lang.StringUtils
com.opensymphony.util.TextUtils
com.atlassian.core.user.UserUtils
com.atlassian.jira.util.velocity.Numbertool
documentation
com.atlassian.jira.user.UserPropertyManager
java.util.Date
com.atlassian.jira.util.JiraDurationUtils
com.atlassian.jira.mail.DiffUtils
com.atlassian.jira.datetime.DateTimeFormatter
com.atlassian.jira.config.properties.LookAndFeelBean
java syntax
DateTimeFormatter
DateTimeFormatter
DateTimeStyle
DateFormat
DateFormat
documentation
DateFormat
documentation
documentation
DateFormat
DateFormat
documentation
DateFormat
documentation
SimpleDateFormat
TimeZone
TimeZone
URLEncoder.encode(url)
URLEncoder.encode(url, encoding)
here
Supported Time Zones
here
Supported Time Zones
here
here
here