Smart values

To test what your smart value returns, use the manual trigger with log action and the result displays in the audit log.

display smart value result in the audit log

issue

The active issue. Through the dot notation you can access fields like issue type, status and custom fields (details on how you can use these to interact with Jira's REST api are here)

{{issue.components.name}}
{{issue.created.format("dd/MM/yyyy")}} - this is the date the issue was created
displayed in the format 21/03/2019
{{issue.description}} - the content in the description field
{{issue.duedate}} - this is the due date for scheduled issue
{{issue.issuetype.name}} - the name of the type of issue
{{issue.key}} - the issue's unique identifier, comprised the project key and the
issue's number
{{issue.status.name}} - the name of the status the issue is at in its workflow.
{{issue.toUrl}} - use this to display a url
{{issue.CustomField.property}} - some of these are:
  * {{issue.CustomField.id}} - the unique id for the field assigned by Jira. It is
    better to use this than name as it cannot be changed.
  * {{issue.CustomField.name}} - the visible label displayed on the left of the
    field
  * {{issue.CustomField.description}} - the text displayed below the custom field
    viewed in the Simple Search column.
  * {{issue.CustomField.defaultValue}} - the value displayed on first view of the
    field

issues

WARNING

Server only and must have the bulk flag ticked
bulk flag

A list of issues generated by a trigger that runs a JQL search (Field Value Changed, Incoming Webhook, or Scheduled). All of the issues generated are then treated as a single bulk of issues. You could use this to count the number of issues found in the search. For example, you might count how many issues have a priority of 'highest' and then send an alert or count how many issues have the same label, same fixVersion, etc. You can also use this with lists.

example of using issues

{{issues}}{{key}}{{/}} - the key for each issue
{{#issues.size}} - count of the issues
{{#issues.fixVersion.size}} - the number of issues with the same fixVersion

issue.comments

Multiple comments on the active issue (this example is explained in detail in how to use smart values)

{{#issue.comments}}
Comment by: {{author}} at: {{created}}
{{body}}
{{/}}
{{issue.comments.last.body}}
{{issue.comments.first.body}} - the body of the first of many comments
{{issue.comments.size}} - count of comments for the issue
{{#issue.comments}}{{#first}}First:{{author.key}}{{/}}{{body}}{{/}} - prints all of the comments and only prints the first author's key

issue.components

Components of an issue as a list. See accesing multi-value fields

{{issue.components.first.name}}

issue.epic

Added by: This is added any time an issue is added

If this issue is in an Epic, then epic refers to the Epic issue. You can access all fields of the Epic.

{{issue.epic.key}}
{{issue.epic.status.name}}
{{issue.epic.My Custom Field}}

issue.fixVersions

Fix/affects versions of an issue as a list. See accesing multi-value fields.
Properties for versions include: name, description, archived, released, releaseDate

{{issue.fixVersions.first.releaseDate}}

issue.latest

This re-fetches the latest state of the issue from Jira.

{{issue.latest.description}}

TIP

This should not be used since it requires an expensive reload of issue data. The only situation where this is necessary, is where subsequent actions need to have visibility of the latest state of the issue (e.g. 2 edit issue actions that need to 'add' to the value of a field instead of overwriting it).

issue.parent

If this issue is a sub-task, then parent refers to the parent issue. You can access all fields of the parent.

{{issue.parent.key}}
{{issue.parent.priority.name}}
{{issue.parent.Epic Link}}
{{issue.parent.epic.summary}}

issue.properties

Here you can access any issue property. Properties are frequently used by add-ons and integrations to store values.

{{issue.properties.some.value}}

issue.Request Type

Service Desk specific request type object that you can grab information from.

{{issue.Request Type}}
{{issue.Request Type.requestType.name}} - Customer request type
{{issue.Customer Request Type}} - Customer request type for older Jira instances
{{issue.Request Type.currentStatus.status}} - Current JSD status

issue.security.name

The text of the security level.

{{issue.security.name}}
{{issue.security.id}}

issue.watchers

You can access the current watchers of an issue.

{{issue.watchers.displayName}}
{{issue.watchers.emailAddress}}

triggerIssue

Added by: The Related Issues Action.

Refers to the original issue when you branch the chain.

{{triggerIssue.description}}

... all fields available to {{issue}} are available here as well.

attachment

  • filename {{attachment.filetype}}: the filename of the attachment
  • mimeType {{attachment.mimeType}}: the file format of the attachment
  • author {{attachment.author}}: the user who added the attachment
    • accountId {{attachment.author.accountId}}: the ID associated with the user name
    • emailAddress {{attachment.author.emailAddress}}: the email address associated with the user name
    • displayName {{attachment.author.displayName}}: the name displayed in your Jira instance
    • active {{attachment.author.active}}: Is the user an active user or has their account been deactivated
    • timeZone {{attachment.author.timeZone}}: what timezone the user is registered being in (this does not change dynamically based upon where the user logs in from, it is the timeZone registered in their user account)
  • created {{attachment.created}}: the date and time the attachment was added to the issue
  • size {{attachment.size}}: the attachment file size in bytes

baseUrl

Prints the url of the Jira instance

changelog

Added by: Jira Triggers that edit an issue

All the fields that were changed. Each field is a list of changes. You can access useful things like the previous status during a transition

  • this is only available for some triggers.
{{#changelog.summary}}
  {{toString}}
{{/}}
{{#changelog.issuetype}}
  {{fromString}}
{{/}}
// Previous status name
{{#changelog.status}}{{fromString}}{{/}}
// Previous status id (for using in another Edit action
{{#changelog.status}}{{from}}{{/}}

comment

Added by: Jira Triggers that contain a comment. E.g. Transition issue.
The comment associated with a trigger

{{comment.body}}
{{comment.author}}
{{comment.created}}
{{comment.internal}} - returns true or false for service desk comments.
{{comment.properties}} - Way to access any comment property. Properties are frequently used by add-ons and integrations to store values.
{{comment.properties."sd.public.comment".internal}}

createdIssue

The previous issue created in this rule

{{createdIssue.some field}}

createdIssues

Added by: Clone Issue Action, Create Issue Action, Create Sub-tasks Action

A list of issues that have been created in the rule

{{#createdIssues}}{{key}}{{/}}

eventType

The type of event that triggered the rule such as: jira:issue_updated :issue_commented

{{eventType}}

fieldChange

The changed field value is available anywhere smart values are supported using the {{fieldChange}} substitution. Use {{fieldChange.fromString}} and {{fieldChange.toString}} to access display values and {{fieldChange.from}} and {{fieldChange.to}} to access raw values (for a select field for example).

{{fieldChange}} only contains the first changed value. If multiple values are changed (e.g. when setting multiple Fix Versions) then you can iterate over these using the {{#changelog.fixVersion}}{{toString}}{{/changelog.fixVersion}} expression.

rule

{{rule.name}} - Prints out the name of the running rule
{{rule.actor}} - Accesses the rule actor user.

version

A representation of a release/version in Jira.

{{version.name}}
{{version.id}}
{{version.description}}
{{version.archived}}
{{version.startDate}}
{{version.released}}
{{version.releaseDate}}
{{version.project.key}}
{{issue.versions.first.name}}

webhookData

Added by: Webhook Trigger
This allows access to data that was sent along with the incoming webhook
The body of the Webhook request

{{webhookData.someValue.childValue}}

webhookData

Added by: Send web request with "Wait for response" checked
On successful request, you will be able access webhook response data using the following smart values:

{{webhookResponse.status}}
{{webhookResponse.headers.someHeader}}
{{webhookResponse.someValue.childValue}}

Multiple responses can be access via the following fields:

{{webhookResponses.last.someValue.childValue}}
{{#webhookResponses}}
    Data from response: {{someValue.childValue}}
{{/}}

worklog

Added by: Worklogged Trigger
The worklog entry that has just been logged against an issue.

{{worklog.comment}}
{{worklog.started}}
{{worklog.timeSpentSeconds}}
// Cloud only
{{worklog.timeSpent}}
// Visibility is available when the worklog is restricted
{{worklog.visibility}}
{{worklog.visibility.type}}
{{worklog.visibility.value}}

Insight fields

TIP

We do not currently support accessing fields within insight objects (see AUT-1118)

You can access an insight field's full name, key, or summary through the following smart values:

{{issue.insightField}}          // returns Some Client Name (ABC-123)
{{issue.insightField.key}}      // returns ABC-123
{{issue.insightField.summary}}  // returns Some Client Name

Tempo Account field

Tempo account fields have a number of properties supported through smart values

{{issue.account.id}}    // Provides the ID of the account in both Cloud & Server
{{issue.account.key}}   // Provides the key of the account in Server only
{{issue.account.name}}  // Provides the name of the account in both Cloud & Server
{{issue.account.value}} // Provides the name of the account in Cloud only
{{issue.account}}       // Provides the name of the account in Cloud & Server