Notification parameters
This page is about Time to SLA for Jira Data Center. Using Jira Cloud? Click here.
TTS provides a flexible way to create dynamic email content by using predefined parameters. This guide outlines the available parameters, their descriptions, and examples to help you format your email templates effectively.
Available parameters
Parameter | Type | Description |
---|---|---|
| String | The name of the SLA. |
| Used to format dates (Available from v7.7.0+). Example:
| |
| Formats dates with predefined Jira formats (Available from v7.7.0+). Example:
| |
| String | The SLA value as a time string. |
| String | The start time of the SLA. |
| String | The end time of the SLA. |
| String | Notify before the parameter in notification settings |
| String | Origin status name, null if origin is not set by status |
| String | Target status name, null if target is not set by status |
| Boolean | Indicates whether or not SLA is exceeded (Available from v7.7.0+). |
| String | The remaining duration of SLA (for example, |
| String | Overdue duration of SLA (for example, |
| Issue object to retrieve various issue attributes (for example, | |
| Used to insert custom field values into emails. | |
| String | Get priority information. |
| String | Get a link to the issue. |
| String | The display name of the assigned user. |
| Date | The due date of the issue (if set). |
| Date | The date and time when the issue was created. |
| String | The name of the project associated with the issue. |
| String | The current status of the issue. |
| String | The issue description. |
| String | The issue summary. |
| String | The display name of the issue reporter. |
How to handle null values
If a field has no value, the variable name may be displayed in the email content. To avoid this, use the !
character after the $
sign:
$!{issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11100'))}
How to format dates with a custom time zone
You can change the time zone of the dateTimeFormatter provided in the notification context. Copy the following code block into your notification content:
#set( $tz = $dateTool.getTimeZone().getTimeZone("IST"))
#set( $zonedFormatter = $dateTimeFormatter.withZone($tz))
#set( $date = $issue.created)
Created Date: ${zonedFormatter.format($date)}<br>
Replace
IST
with your preferred time zone. Find a list of all available time zones here.Replace
$date
with the desired date variable.Apply custom time formats as needed using
zonedFormatter
.
Advanced usage
You can use loops, if/else conditions, and other Velocity templating engine features in Time to SLA notification templates. For further details, please refer to the official Velocity guide.
Example: Iterating over a multi-user picker field
To display selected users from a custom field:
#set( $users = $!{issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_10300'))})
Custom Field (Multiple user picker):
#foreach( $user in $users )
$user.displayName#if( $velocityHasNext ),#end
#end