robotsnoindex
robotsnoindex

Smart values allow you to access issue data within Jira. For example, you can use the following smart values to send a Slack message that includes the issue key and issue summary: {{issue.key}} {{issue.summary}}

To test what a smart value returns, use the Manual trigger with Log action. The result displays in the audit log, as shown below.



The following smart values are available when setting up a rule.

issue

The active issue.

Through the dot notation you can access fields like issue type, status and other custom fields. Learn how to use these to interact with Jira’s REST API.

{{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.

issue.comments

Multiple comments on the active issue.

See What are smart values? for more information about the below example.

{{#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.reverse.body}} - the body of the comment list in reverse order
{{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. 

View more information about accessing multi-value fields.

{{issue.components.first.name}}

issue.epic

  • Added by: anytime an issue is added

If the 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 versions of an issue as a list.

View more information about accessing multi-value fields.

Properties for versions include: name, description, archived, released, and releaseDate.

{{issue.fixVersions.first.releaseDate}}

issue.latest

Re-fetches the latest state of the issue from Jira.

{{issue.latest.description}}

This smart value requires an expensive reload of issue data and should only be used in situations where subsequent actions need to have visibility of the latest state of an issue, e.g. two Edit issue actions that need to add to the value of a field, instead of overwriting it.

issue.parent

If the 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

Accesses 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.Request Type.currentStatus.status}} - Current JSD status
{{issue.Customer Request Type}} - Customer request type for older Jira instances

issue.security.name

The text of the security level.

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

issue.url

The URL to access the issue. Also provides the customer portal URL for Jira Service Desk issues.

{{issue.url}}
{{issue.url.customer}}

issue.versions

Affects version of an issue as a list.


View more information about accessing multi-value fields.


Properties for versions include: name, description, archived, released, and releaseDate.

{{issue.versions.first.releaseDate}}

issue.watchers

Accesses the current watchers of an issue.

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

triggerIssue

Refers to the original issue when you branch the chain.

{{triggerIssue.description}}

All the fields available to {{issue}} are also available on this smart value.

attachment

  • filename {{attachment.filename}}: 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: triggers that edit an issue

Any fields that were changed. Each field is a list of changes. You can access data 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

This smart value won’t work with triggers like Issue transitioned, even if a comment was added with the transition.

{{comment.body}}
{{comment.author}}
{{comment.created}}
{{comment.visibility.type}} - comment restriction type, if any e.g. role
{{comment.visibility.value}} - comment restriction label, if any  e.g. Developers 
{{comment.internal}} - for Jira Service Desk comments, returns false if the comment is visible to customers.
{{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}}
{{comment.id}} - Used by the Issue commented trigger. The comment that triggers the rule is stored in this smart value.

createdIssue

The previous issue created in this rule.

{{createdIssue.some field}}

createdIssues

A list of issues that have been created in the rule.

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

eventType

The type of event that triggered the rule, for example: 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, e.g. for a select field.

{{fieldChange}} only contains the first changed value. If multiple values are changed, for example, 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.

sprint

{{sprint.id}}
{{sprint.name}}
{{sprint.isStarted}}
{{sprint.isClosed}}
{{sprint.startDate}}
{{sprint.endDate}}
{{sprint.completeDate}}
{{sprint.originBoardId}}
{{sprint.goal}}

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

This allows access to data that was sent along with the incoming webhook, for example, the body of the webhook request.

{{webhookData.someValue.childValue}}

webhookResponse

On successful request, you will be able access webhook response data using the available smart values.

{{webhookResponse.status}} - response code e.g. 200
{{webhookResponse.headers}} - headers that can be accessed with dot nation
{{webhookResponse.headers.Content-Type}}
{{webhookResponse.body}} - body that can be accessed with dot nation
{{webhookResponse.body.name}}
{{webhookResponses}} - list of responses made when list operations
{{webhookResponses.last.body}}

Multiple responses can be accessed via the following fields:

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

worklog

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

Accesses an insight field's full name, key, or summary.

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

Tempo Account field

Accesses a Tempo Account field's properties.

{{issue.TempoAccountField}}       // Provides the name of the account
{{issue.TempoAccountField.id}}    // Provides the ID of the account
{{issue.TempoAccountField.name}}  // Provides the name of the account
{{issue.TempoAccountField.value}} // Provides the name of the account