/
Notification parameters

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

Parameter

Type

Description

${slaDescription}

String

The name of the SLA.

${dateTool}

DateTool

Used to format dates (Available from v7.7.0+).

Example:

$dateTool.format('d-M-yyyy H:m:s', ${issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11201'))})

${dateTimeFormatter}

DateTimeFormatter

Formats dates with predefined Jira formats (Available from v7.7.0+).

Example:

$dateTimeFormatter.formatDMYHMS(${issue.getCustomFieldValue($customFieldManager.getCustomFieldObject

('customfield_11201'))})$dateTimeFormatter.format(${issue.getCustomFieldValue(

$customFieldManager.getCustomFieldObject('customfield_11201'))})

${slaValue}

String

The SLA value as a time string.

${slaStartDate}

String

The start time of the SLA.

${slaEndDate}

String

The end time of the SLA.

${slaNotifyBefore}

String

Notify before the parameter in notification settings

${originStatus}

String

Origin status name, null if origin is not set by status

${targetStatus}

String

Target status name, null if target is not set by status

${slaExceeded}

Boolean

Indicates whether or not SLA is exceeded (Available from v7.7.0+).

${slaRemainingTime}

String

The remaining duration of SLA (for example, 1h 30m) (Available from v7.1.0+).

${slaOverdue}

String

Overdue duration of SLA (for example, 1h 30m) (Available from v7.1.0+).

${issue}

Issue

Issue object to retrieve various issue attributes (for example, ${issue.summary}).

${customFieldManager}

CustomFieldManager

Used to insert custom field values into emails.

${issue.priority.name}

String

Get priority information.

${baseUrl}/browse/${issue.key}

String

Get a link to the issue.

${issue.getAssigneeUser().getDisplayName()}

String

The display name of the assigned user.

${issue.getDueDate()}

Date

The due date of the issue (if set).

${issue.created}

Date

The date and time when the issue was created.

${issue.fields.project.name}

String

The name of the project associated with the issue.

${issue.status.getName().toString()}

String

The current status of the issue.

${issue.description.toString()}

String

The issue description.

${issue.fields.summary}

String

The issue summary.

${issue.fields.reporter.displayName}

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

Related articles