Page tree

Versions Compared

Key

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

...

ParameterTypeDescription
${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
${slaExceeded}Boolean

Indicates whether or not SLA is exceeded (

e

v7.

g.

1.0+)

Code Block
languagejava
titleExample
#if(${slaExceeded})You missed SLA
deadline#end) (v7.1.0+)
 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}CustomFieldManager

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

(e.g ${

Code Block
languagejava
titleExample
${issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11100'))
${dateTool}DateTool

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

Code Block
languagejava
titleExample
$dateTool.format('d-M-yyyy H:m:s', ${issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_
11100
11201'))})
${dateTimeFormatter}DateTimeFormatter

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

 

Code Block
languagejava
titleExample
$dateTimeFormatter.formatDMYHMS(${issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11201'))})
$dateTimeFormatter.format(${issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11201'))})

 

 

Info
titleHandy 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:

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

...