Automation basics
Understand the general concepts and best practices of automation in Atlassian cloud products.
Smart values allow you to access issue data within Atlassian Automation. 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}}
Check out how we use smart values in our Jira automation template library.
The issue smart values are used to access information related to the rule’s active issue, which is the issue the rule is currently acting on
The information that you can access on the issue are described in the Available properties section below. Some issue properties are more complex, and they’ve been described in their own sections on this page.
Learn how to use these to interact with Jira’s REST API.
Issue fields
{{issue.description}} - Returns the content in the issue's Description field.
{{issue.key}} - Returns the issue's key, which is a unique identifier comprised of the project key and the issue's number. For example, PROJ-123
{{issue.project}} - the project this issue is a part of.
{{issue.status}} - Returns the issue's status ID
{{issue.status.name}} - Returns the issue's status
{{issue.summary}} - Returns the issue's summary
{{issue.versions}} - Returns the issue's Affects versions
{{issue.issueType.name}} - Returns the issue's type, for example Story, Bug, or Task.
{{issue.resolution.name}} - Returns the issue's resolution, for example Fixed, Canceled.
{{issue.updated}} - Returns the date the issue was updated. Can be combined with other date and time smart values. Learn more about date and time smart values.
{{issue.Story Points}} - Returns the issue's story point estimate (company-managed JiraCloud only).
{{issue.Story point estimate}} - Returns the issue's story point estimate (team-managed Jira Cloud only).
Issue dates
These can be combined with other date and time smart values. Learn more about date and time smart values.
{{issue.created}} - Returns the issue's creation date
{{issue.duedate}} - Returns the issue's due date.
Issue users
These can be combined with other user smart values. Learn more about user smart values.
{{issue.assignee.displayName}} - Returns the issue's assignee.
{{issue.reporter.displayName}} - Returns the issue's reporter.
Similar to {{issue.[property]}}, you can also access custom field information on your issues.
{{issue.[Custom Field].id}} - Returns the unique id for the field assigned by Jira. It is better to use this than name as it cannot be changed.
{{issue.[Custom Field].description}} - Returns the text displayed below the custom field viewed in the Simple Search column.
{{issue.[Custom Field].name}} - Returns the visible label displayed on the left of the field.
In the example below, we have a custom field called Team Leader, and the value of the field is currently Alana Grant.
1
2
3
4
5
{{issue.Team Leader}}
//returns
Alana Grant
For Jira Service Management requests only
Accesses the values in an issue's Affected services field. Learn more about services in Jira Service Management.
Because this smart value deals with multiple items (i.e: issues can have many fix versions), it can be used with the # symbol to apply the rule to each individual fix version. Learn more about using smart values with sections and lists.
The smart value {{affectedServices}} is exclusively available for projects using ITSM (IT Service Management) templates. In ITSM-based Jira Service Management projects, specific configurations and fields are designed to support IT service processes, such as incident management.
For projects using other templates, you should directly reference the field name instead. Here are examples of how to do this:
{{issue.Affected services.name}}
{{issue.Affected services.tier}}
{{issue.Affected services.changeApprovers.displayName}}
{{issue.affectedServices.name}} - Returns the names of the issue's Affected services.
{{issue.affectedServices.tier}} - Returns the tiers of the issue's Affected services.
{{issue.affectedServices.changeApprovers}} - Returns the account ID of all change approvers of the issue's services. Can be combined with other user-related smart values. For example, {{issue.affectedServices.changeApprovers.displayName}} will return their names. Learn more about user smart values.
{{issue.affectedServices.dependentServices}} - Returns the list of services that this issue's services depend on. The three properties above can also be added to this, for example, {{issue.affectedServices.dependentServices.tier}} will return the dependent services' tiers.
Returns the issue's comments. Because this smart value deals with multiple items (i.e: issues usually have many comments), it can be used with the # symbol to apply the rule to each individual comment. Learn more about using smart values with sections and lists.
{{issue.comments.last.body}} - Returns the body of the last comment.
{{issue.comments.first.body}} - Returns the body of the first comment.
{{issue.comments.reverse.body}} - Returns the issue's comments, in reverse order.
{{issue.comments.size}} - Returns the number of comments on the issue.
{{issue.comments.author.displayName}} - Returns the comment authors.
In the following example, we list each comment that an issue has, and include the author and creation date/time:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{#issue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
{{/}}
//returns
Comment by: Alana at: 2019-05-30T15:36:02.3+0000
Hey team, how are we tracking on this task?
Comment by: Jose at: 2019-05-30T15:40:57.0+0000
We'll be ready to ship at the end of the week.
Comment by: Alana at: 2019-05-30T15:44:15.7+0000
Great, thanks for the update!
In this example, we return the name of the person who added the last comment on an issue:
1
2
3
4
5
{{issue.comments.last.author.displayName}} has left a comment on the issue.
//returns
Alana Grant has left a comment on the issue.
Used to access the values in an issue's Components field. Because this smart value deals with multiple items (i.e: issues can have many components), it can be used with the # symbol to apply the rule to each individual component. Learn more about using smart values with sections and lists.
{{issue.components.name}} - Returns the values in the issue's Component field.
Used to access information about an issue's epic. This smart value only works for issues that have been added to an epic.
{{issue.epic.key}} - Returns the epic's key, e.g. PROJ-213
{{issue.epic.status.name}} - Returns the epic's status, e.g. In progress
{{issue.epic.[Custom Field]}} - Returns the value in an epic's custom field. For example, if the epic has a custom field called Initiative, then {{issue.epic.Initiative}} will return the value in the Initiative field.
Used to access the values in an issue's Fix Versions field. Because this smart value deals with multiple items (i.e: issues can have many fix versions), it can be used with the # symbol to apply the rule to each individual fix version. Learn more about using smart values with sections and lists.
{{issue.fixVersions.name}} - Returns the name of the fix version.
{{issue.fixVersions.description}} - Returns the description of the fix version.
{{issue.fixVersions.archived}} - Returns true if the fix version is archived, and false if not.
{{issue.fixVersions.released}} - Returns true if the fix version is released, and false if not.
{{issue.fixVersions.releaseDate}} - Returns the fix version's release date. Can be combined with other date and time smart values. Learn more about date and time smart values.
In the below example, we list each fix version that the issue has been added to, followed by the version's release date, in bullet point form.
1
2
3
4
5
6
7
8
9
10
This issue is part of the following releases:
{{#issue.fixVersions}}
* Fix version: {{name}}, released on {{releaseDate}}
{{/}}
// returns
This issue is part of the following releases:
• Fix version: Version 1.1, released on 2019-08-10T00:00:00.0+0000
• Fix version: Version 1.5, released on 2019-08-02T00:00:00.0+0000
Prints the issue key and its status (e.g.: To do, In progress, or Done).
Available properties:
{{issue.latest.description}} - Returns the status's 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.
The Epic Link and Parent Link fields in Jira Cloud are being deprecated, which will impact how these smart values are used.
Learn more about updates to the Epic Link and Parent Link fields
Accesses the details of a subtask's parent issue. Can only be used when the active issue is a subtask, and can't be used to access a standard issue's parent issue.
{{issue.parent.key}} - Returns the issue key of the subtask's parent issue.
{{issue.parent.priority.name}} - Returns the priority of the subtasks's parent issue.
{{issue.parent.epic.summary}} - Returns the summary of the parent issue's epic.
Accesses any issue property. Properties are frequently used by add-ons and integrations to store values, e.g.: {{issue.properties.some.value}}.
Accesses information from Jira Service Management requests.
{{issue.Request Type.requestType.name}} - Returns the customer request type.
{{issue.Request Type.currentStatus.status}} - Returns the status of the current request.
{{issue.Customer Request Type}} - Returns the customer request type for older Jira instances.
The text of the security level.
{{issue.security.name}} - Returns the security level name.
{{issue.security.id}} - Returns the security level ID.
Accesses time tracking estimates. Learn more about configuring time tracking
{{issue.timetracking.timespent}} - Returns the amount of time that has been logged on the issue in the Time spent field.
{{issue.timetracking.remainingestimate}} - Returns the value in the Time remaining field.
The URL to access the issue. Also provides the customer portal URL for Jira Service Management requests.
{{issue.url}} - Returns the URL of the issue.
{{issue.url.customer}} - Returns the customer portal URL (for Jira Service Management requests)
Accesses the value in the issue's Affects versions field. Because this smart value deals with multiple items (i.e: issues can have many Affects versions), it can be used with the # symbol to apply the rule to each individual component. Learn more about using smart values with sections and lists.
{{versions.name}} - Returns the name of the affects version
{{versions.description}} - Returns the description of the affects version.
{{versions.archived}} - Returns true if the affects version is archived, and false if not.
{{versions.released}} - Returns true if the affects version is released, and false if not.
{{versions.releaseDate}} - Returns the affects version's release date. Can be combined with other date and time smart values. Learn more about date and time smart values.
In the example below, the issue's first affects version's release date is printed:
1
The bug was first discovered in the version released on {{issue.versions.first.releaseDate}}.
Accesses the current watchers of an issue. Because this smart value deals with multiple items (i.e: issues can have many watchers), it can be used with the # symbol to apply the rule to each individual component. Learn more about using smart values with sections and lists.
{{issue.watchers.displayName}} - Returns the watcher's display name.
{{issue.watchers.emailAddress}} - Returns the watcher's email address.
The example below lists each person watching the issue - both their display name and their email address - in bullet point form.
1
2
3
4
5
6
7
8
9
10
11
The following people are watching this issue:
{{#issue.watchers}}
* Name: {{displayName}}, Email: {{emailAddress}}
{{/}}
// returns
The following people are watching this issue:
• Alana, alana@acme.com
• Jose, jose@acme.com
Returns a list of issues from a JQL search caused by the Lookup issues action.
{{key}} - Returns the issue key
{{url}} - Returns the issue url
{{summary}} - Returns the issue summary
{{assignee.displayName}} - Returns the assignee
{{reporter.displayName}} - Returns the reporter
{{status}} - Returns the status
{{issueType.name}} - Returns the issue type
{{resolution}} - Returns the resolution status
{{fixVersion}} - Returns the fix version
{{created}} - Returns the date the issue was created
{{updated}} - Returns the date the issue was updated
{{Story Points}} - Returns the story points for the issue (company-managed Jira)
{{Story point estimate}} - Returns the story points for the issue (team-managed Jira)
The following example prints all the issue keys returned from the JQL search, in bullet point form.
1
2
3
4
Hey team - we've got the following issues left in this sprint:
{{#lookupIssues}}
* {{key}}
{{/}}
The following example sums all of the story points for issues returned from the JQL search.
1
There are {{lookupIssues.Story Points.sum}} story points remaining.
Refers to the original issue that triggered the rule; used when you branch the chain. Used with the Related issues condition. All properties available to {{issue}} are also available on this smart value.
Accesses information related to a file attachment on an issue. This will return a list of values, if the issue has more than one attachment. Learn more about list smart values.
{{attachment.filename}}: Returns the filename of the attachment.
{{attachment.mimeType}}: Returns the file format of the attachment.
{{attachment.created}}: Returns the date and time the attachment was added to the issue.
{{attachment.[xxx].size}}: Returns the file size of a specific attachment. Your smart value must identify a specific attachment for this to work. For example, {{attachment.first.size}} will return the file size of the first attachment. Learn more about list smart values.
{{attachment.author}}: Returns the user who added the attachment.
{{attachment.author.accountId}}: Returns the ID associated with the user name.
{{attachment.author.emailAddress}}: Returns the email address associated with the user name.
{{attachment.author.displayName}}: Returns the name displayed in your Jira instance.
{{attachment.author.active}}: Returns true if their account is active, and false if not.
{{attachment.author.timeZone}}: Returns the timezone the user is registered being in; this doesn't change dynamically based upon where the user logs in from, it is the timeZone registered in their user account.
Prints the url of the Jira instance.
Used with: any triggers that edit an issue.
This smart value accesses the changelog, and a list of changes for each field. For example, when an issue is transitioned you can see what status the issue transitioned from.
Learn more about using smart values with sections and lists.
{{changelog.summary}} - Changelog information for the Summary field.
{{changelog.issuetype}} - Changelog information for the Issue type field.
{{changelog.status}} - Changelog information for the Status field.
This example returns the new value of an issue's Summary field after it has been changed.
1
2
3
{{#changelog.summary}}
{{toString}}
{{/}}
This example returns an issue's previous type, after it has been changed.
1
2
3
{{#changelog.issuetype}}
{{fromString}}
{{/}}
This example shows the previous status for issues that are transitioned.
1
{{#changelog.status}}{{fromString}}{{/}}
This example shows the previous status id (for use in another Edit action)
1
{{#changelog.status}}{{from}}{{/}}
Used with: the Issue commented trigger.
This value won't work for any other trigger, even if a comment was added as a result (e.g. - the Issue transitioned trigger).
{{comment.body}} - Returns the body of the comment that triggered the rule.
{{comment.author}} - Returns the ID of comment's author.
{{comment.created}} - Returns the date and time of the comment.
{{comment.visibility.type}} - Returns the comment restriction type if any, e.g. role.
{{comment.visibility.value}} - Returns the comment restriction label if any, e.g. Developers.
{{comment.internal}} - for Jira Service Management comments, returns false if the comment is visible to customers.
{{comment.properties}} - Accesses any comment property. Properties are frequently used by add-ons and integrations to store values.
{{comment.properties."sd.public.comment".internal}} -
In the below example, we're sending out a notification that someone has added a comment to an issue, perhaps as a Slack message.
1
2
3
4
5
6
7
Hey team, {{comment.author.displayName}} has left the following comment on {{issue.key}}:
{{comment.body}}
// returns
Hey team, Alana Grant has left the following comment on PROJ-12:
Could I get an urgent update on this please?
Used by triggers that involve adding a comment, such as Issue commented, Issue transitioned, or Issue updated. The comment that triggers the rule is stored in this smart value.
Accesses the previous issue created in the rule.
Any property used with the {{issue}} smart value can also be used with {{createdIssue}}.
Used with: the Clone issue, Create issue, and Create sub-tasks actions
A list of issues that have been created in the rule.
Any property used with the {{issue}} smart value can also be used with {{createdIssue}}. Learn more about using smart values with sections and lists.
1
2
3
4
{{#createdIssues}}{{key}}{{/}}
The type of event that triggered the rule. For example, jira:issue_updated :issue_commented.
Available anywhere smart values are supported, to access the value of a field that has changed. For example, if the Assignee of a field changes, you could add a comment to the issue to note who the previous assignee was, and who the new assignee is.
When there are multiple fields that have changed, {{fieldChange}} only contains the first changed value. If multiple values are changed, use # to iterate over these. For example, when setting multiple Fix Versions, then you can iterate over these using {{#changelog.fixVersion}}{{toString}}. Learn more about using smart values with sections and lists.
{{fieldChange.fromString}} - Returns the previous value as displayed.
{{fieldChange.toString}} - Returns the new value as displayed.
{{fieldChange.from}} - Returns the previous raw value of a field, i.e. the JSON representation of the value.
{{fieldChange.to}} Returns the new raw value of a field, i.e. the JSON representation of the value.
{{addedfieldChange.field}} - Returns the field which has changed due to addition of a value.
{{addedFieldChange.fieldId}} - Returns the fieldId of the field that has changed due to addition of a value.
{{addedFieldChange.fieldType}} - Returns the fieldType of the field that has changed due to addition of a value.
{{addedfieldChange.valueIds}} - Returns the id/ids of new value/values added.
{{addedfieldChange.values}} - Returns the new value/values added.
{{deletedFieldChange.field}} - Returns the field that value has changed due to deletion of a value.
{{deletedFieldChange.fieldId}} - Returns the fieldId of the field that has changed due to deletion of a value.
{{deletedFieldChange.fieldType}} - Returns the fieldType of the field that has changed due to deletion of a value.
{{deletedFieldChange.valueIds}} - Returns the id/ids of value/values deleted.
{{deletedFieldChange.values}} - Returns the value/values deleted.
Accesses information for the current running rule.
{{rule.name}} - Returns the name of the rule that is currently running.
{{rule.actor}} - Accesses the rule actor user.
Used with: the Incoming webhook trigger
Allows access to data that was sent along with the incoming webhook, for example, the body of the webhook request.
Used with: the Send web request action (Wait for response enabled)
On successful request, you will be able access webhook response data using the available smart values. If you have multiple webhook responses, you can add the # symbol to apply the rule to each individual response. Learn more about using smart values with sections and lists.
{{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}}
This is how you would return multiple responses using the smart value:
1
2
3
4
{{webhookResponses.last.someValue.childValue}}
{{#webhookResponses}}
Data from response: {{someValue.childValue}}
{{/}}
Used with: the Work logged trigger
Accesses information for a worklog entry that has just been logged against an issue.
{{worklog.comment}}
{{worklog.started}}
{{worklog.timeSpentSeconds}}
{{worklog.timeSpent}}
{{worklog.visibility}} - available when the worklog is restricted
{{worklog.visibility.type}} - available when the worklog is restricted
{{worklog.visibility.value}} - available when the worklog is restricted
This applies to the legacy Insight app. For smart values related to the Insight feature in Jira Service Management, see Automation smart values - Assets.
The legacy Insight App will reach end of service on March 31, 2022.
Accesses an insight field's full name, key, or summary.
{{issue.InsightField}} - Returns the issue summary and issue key
{{issue.InsightField.key}} - Returns the issue key
{{issue.InsightField.summary}} - Returns the issue summary
Accesses a Tempo Account field's properties.
{{issue.TempoAccountField}} - Returns the name of the account
{{issue.TempoAccountField.id}} - Returns the ID of the account
{{issue.TempoAccountField.name}} - Returns the name of the account
{{issue.TempoAccountField.value}} - Returns the name of the account
Can be used with: the Approval required trigger and the Approval completed trigger
Approval required: accesses information when an issue that requires approval is created or updated, or when new approvers are added to an issue.
Approval completed: accesses information for an approval when an approval step on an issue is accepted or declined.
Can be used with both Approval required and Approval completed triggers:
{{approval.createdDate}} - Returns creation date of approval. Learn more about date smart values
{{approval}} - Returns the name of the approval.
Exclusive to the Approval required trigger:
{{approval.initiator}} - Returns account id of initiator of request. Learn more about user smart values
{{approval.addedApprovers}} - Returns the set of approvers added to issue.
Exclusive to the Approval completed trigger:
{{approval.approver}} - Returns approver’s account id. Can be combined with other user smart values. Learn more about user smart values
{{approval.completedDate}} - Returns completion date of approval. Can be combined with other date smart values. Learn more about date smart values
{{approval.decision}} - Returns the final decision of the approval.
If a field or value doesn't exist, it will return an empty value: {{invalid reference}}. You can specify a default value to prevent this.
For example, when invalid reference doesn't contain a value, you can print Hello world using {{invalid reference|"Hello world"}}.
Was this helpful?