Smart values 1
To test what your smart value returns, use the manual trigger with log action and the result displays 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.project}} - the project this issue is a part of.
{{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
A list of issues generated by a trigger that runs a JQL search (Incoming Webhook trigger or Scheduled trigger when set to process in bulk). All of the issues found by the trigger are then treated as a single bundle of issues. You could then use this to count the number of issues returned. For example, you might count how many issues have a priority of 'highest' and then send an alert. Or you could count how many issues have the same label, same fixVersion, etc. You can also use this with lists. For more information on when issues is available, see Bulk handling of issues 1.
{{#issues}}{{key}}{{/}} - the key for each issue
{{issues.size}} - count of the issues
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 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.project
This smart-value allows you to access project specific attributes:
{{issue.project.key}}
{{issue.project.name}}
issue.Request Type
Jira Service Management 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
The "Request Type" prefix may be
"Customer Request Type" in older instances of Jira. You can check this by navigating to the "Custom fields" page in the
global admin section. There should be a locked field named either "Request Type" or "Customer Request Type" there.
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 Management issues.
{{issue.url}}
{{issue.url.customer}}
issue.versions
Affects version of an issue as a list. See accesing multi-value fields.
Properties for versions include: name, description, archived, released, releaseDate
{{issue.versions.first.releaseDate}}
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)
- accountId
- 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. Issue commented
{{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 Management 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}}
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.fix Version}}{{toString}}{{/changelog.fix Version}}
expression.
Jira Service Management’s customer satisfaction
rate
Returns the value of the Jira Service Management’s rate custom field.
{{issue.Satisfaction.rate}}
scale
Returns the value of the Jira Service Management’s scale custom field.
{{issue.Satisfaction.scale}}
rule
{{rule.name}} - Prints out the name of the running rule
{{rule.actor}} - Accesses the rule actor user.
sprint
Added by: Sprint created, started or completed triggers
{{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
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}}
webhookResponse
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}} - 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 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
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
You can access a Tempo Account field's properties through the following smart values:
{{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.key}} // Provides the key of the account