Find the smart value for a field

 

Smart values allow you to access and manipulate issue data within Jira. They can add significant power and complexity to your rules. For the majority of cases, you can choose a smart value from the list of available functions.

If your instance is highly customized, you will need to investigate the REST API to find the right smart value.

Finding your smart value

The syntax follows the JSON representation of an issue in Jira, which can be accessed using the Jira Cloud REST API.

Consider downloading an extension or tool to format your JSON data so that it’s easier to read.

Use the following URL to view the JSON representation of your issue:

1 https://<yourinstanceurl>/rest/api/2/issue/<issuekey>?expand=names

To find the smart value for an issue field:

  1. Navigate to the field value you want to display in your rule and click on the field.

  2. Copy the ‘dot notation’ in the footer:

Screenshot of an issue's JSON. The dot notation "fields.priority.name" is highlighted to show its position in the footer.

In this example, the priority field is selected and shows the smart value as {{issue.fields.priority.name}}. The fields section is not required, however, so you can shorten this smart value to {{issue.priority.name}} or simply {{priority.name}}.

Using the expand=names parameter

Using the parameter ?expand=names when viewing the JSON of your issue provides guides at the start of the output.

In the example below, the field Cascade List is a custom field and the name of the field isn’t shown.

Screenshot of an issue's JSON, with a custom field expanded. The field's URL, value, and ID for are shown.

You can reference this field in a smart value using {{customfield_10034.value}}. To make this smart value easier to read, you can also substitute customfield_10034 for the field’s name: {{Cascade List.value}}.

Screenshot of an issue's JSON. "Names" is expanded and the custom field ID next to "Cascade List" is highlighted.

Testing smart values

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

Learn more about debugging rules and smart values.

Audit log for an automation rule in Jira Cloud. It shows a successful Log action, with output "This is the issue summary".

 

Last modified on May 12, 2021
Cached at 12:56 PM on Dec 2, 2021 |

Additional Help