Versions Compared

Key

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

...

Button handy

...

idk6bthk4se78
titleTTS
alignmentleft

...

blankfalse
color#0052CC

...

name

...

On-Prem
linkhttps://appfire.atlassian.net/wiki/spaces/TTS/pages/46727214/Notification+Parameters

...

width

...

85

...

Button handy

...

blank

...

false

...

color

...

#EBECF0

...

name

...

Cloud

...

linkhttps://appfire.atlassian.net/wiki/spaces/TTSC/pages/35881100/Notification+Parameters
width84

Panel
panelIconIdatlassian-info
panelIcon:info:
bgColor#F4F5F7

This page is about Time to SLA for Jira ServerOn-Prem. Using Jira Cloud? Click the Cloud button above.

TTS offers a flexible way of creating dynamic email content. On this page, we will list the potential parameters you can use, and give you some handy tips.

Parameter

Type

Description

${slaDescription}

String

Name of the SLA

${dateTool}

DateTool

DateTool can be used to format dates. (v7.7.0+)

Example:

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

${dateTimeFormatter}

DateTimeFormatter

DateTimeFormatter can be used to format dates with predefined formats in Jira. (v7.7.0+)

Example

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

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

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

${slaValue}

String

SLA value as a time string

${slaStartDate}

String

Start time of the SLA

${slaEndDate}

String

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 (v7.1.0+)

Example:

#if(${slaExceeded})You missed SLA deadline#end

${slaRemainingTime}

String

Remaining duration of SLA (i.e. 1h 30m) (v7.1.0+)

${slaOverdue}

String

Overdue duration of SLA (i.e. 1d 10h) (v7.1.0+)

${issue}

Issue

Issue object to retrieve various issue attributes (e.g. ${issue.summary} )

${customFieldManager}

CustomFieldManager

CustomFieldManager could be used to insert custom field values into e-mail text

Example:

${issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11100'))}

${

http://

issue.priority.name}

String

Get priority information

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

String

Get link information

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

String

The display name of the user assigned to the issue

${issue.getDueDate()}

Date

The due date assigned to the issue, if any.

${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 name of the current status of the issue

${issue.description.toString()}

String

The description of the issue

${issue.fields.summary}

String

The summary of the issue

${issue.fields.reporter.displayName}

String

The display name of the user who reported the issue

Panel
panelIconId2b50
panelIcon:star:
panelIconText
bgColor#FFFAE6

Tip for Template Variables:

In some cases, custom fields or other fields on the issue may have a null value, resulting in variable names being displayed in email content.To prevent this, put an ! after $ sign on a variable name like this:

$!{issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11100'))}

...

Panel
panelIconId2b50
panelIcon:star:
panelIconText
bgColor#FFFAE6

Advanced Tip:

You can use loops, if/else conditions, and other Velocity templating engine features in Time to SLA notifier templates. More information can be found in the official Velocity guide.

Here is an example of how you can iterate over the selected users in a multiple user picker custom field and display their real names:

#set( $users = $!{issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_10300'))})
 
Custom Field (Multiple user picker):
#foreach( $user in $users )
  $user.displayName#if( $velocityHasNext ),#end
#end

Panel
panelIconId1f441-fe0f-200d-1f5e8-fe0f
panelIcon:eye_in_speech_bubble:
panelIconText👁️‍🗨️
bgColor#DEEBFF#F4F5F7

Creating SLA Notifications

...