Page tree
Skip to end of metadata
Go to start of metadata

See our new set a notifier for an SLA document in which we describe all steps to set a notifier and give a list of SLA notifier parameters.

As of version 9.0.0, generic SLA Notifier settings are moved to the General tab under Settings.

SLA Notifiers can be configured to notify relevant people before or after the breach. Notifier can be chosen to work with SLAs' working calendar. It also can be enabled to work as a recurring notifier.

  • Name: Give a name to remember your notifier. It is handy when you have loads of SLA Notifiers.
  • Notify before: Time string to fire notification before the SLA target. For instance if you type 4h, notification will be done four hours before the SLA target date. 
    Also you can use this box to set a notification after the SLA target date. To do so add - (minus) to the very beginning of the time string. For instance -1h means, one hour after the SLA target date
  • Enable working calendarWhen this option is enabled, notification will only be sent in the working hours of the related calendar.
  • Recurrence: Recurrent notifications will be done for every given recurring interval until the completion of SLA. For instance, if recurring interval is defined as 30m and notify before is defined as 2h, then TTS will send first email 2 hours before the deadline, and it will send emails every 30 minutes till SLA becomes completed.
  • Email subject: You can arrange the email subject here dynamically. Dynamic parameters are described below.
  • Email content: You can arrange the email content here dynamically. Dynamic parameters are described below.

Email subject and body can be fully dynamic, as described in this section.

Parameters that can be passed to SLA Notifier  are listed below.

${slaDescription}StringName of the SLA
${slaValue}StringSLA value as a time string
${slaStartDate}StringStart time of the SLA
${slaEndDate}StringEnd time of the SLA
${slaNotifyBefore}StringNotify before parameter in notification settings
${originStatus}StringOrigin status name, null if origin is not set by status
${targetStatus}StringTarget status name, null if target is not set by status

Indicates whether or not SLA is exceeded (v7.1.0+)

#if(${slaExceeded})You missed SLA deadline#end
${slaRemainingTime}StringRemaining duration of SLA (e.g. 1h 30m) (v7.1.0+)
${slaOverdue}StringOverdue duration of SLA (e.g. 1d 10h) (v7.1.0+)
${issue}IssueIssue object to retrieve various issue attributes (e.g. ${issue.summary} )

CustomFieldManager could be used to insert custom field values into email text


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

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

DateTimeFormatter could be used to format dates with pre-defined formats in JIRA. (v7.7.0+)


Handy tip for template variables

 Many times custom fields or other fields on the issue might have a null value resulting in variable names displayed in e-mail content. To prevent this simply put an ! after $ sign on variable name like this:


Formatting dates with custom time zone

You can change timezone of the dateTimeFormatter provided in notifier context. 

  1. Copy following code block into your notifier content:
#set( $tz = $dateTool.getTimeZone().getTimeZone("IST"))
#set( $zonedFormatter = $dateTimeFormatter.withZone($tz))	
#set( $date = $issue.created) 
Created Date: ${zonedFormatter.format($date)}<br>

2. Change IST with any timezone you would like to apply. Find list of all available time zones here.

3. Change $date with any date you would like to format. 

4. You can also apply custom time formats with zonedFormatter as usual.

In the following part, recipients (assignee, reporter, component leads, project lead, project role members, group members or even email addresses) can be configured. 

  • Assignee: Enable to send notification to assignee (by the time of notification) of the issue.
  • Reporter: Enable to send notification to reporter (by the time of notification) of the issue.
  • Component leads: Enable to send notification to the component leads (by the time of notification) of the issue.
  • Project lead: Enable to send notification to the project lead.
  • Emails: You can type any email here. For multiple emails use comma (,) e.g.:, 
  • Project roles: Pick project role(s) to send notification to users who have that roles for the project of the issue
  • User field: The user(s) in this selected custom field will be notified.
  • Group: The user(s) in this group will be notified
  • Event: If you want to fire an event you can simply select here. By the time of notification, selected event will be fired for the issue.

There is a 'Preview' button to test the email template, type sample issue key and press the button.

You can define multiple SLA notifiers per SLA.

Advanced Tip

In Time to SLA notifier templates you can use many powerful features of Velocity templating engine such as loops, if/else conditions etc. Refer to official Velocity guide for more details.

Here is an example of how you can iterate over the selected users in a multiple user picker custom field and displaying 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

  • No labels