What are smart values?

Smart values are dynamic variables that can make your rule more flexible. They can add power and complexity to your automation rules.

Formatting smart values

Each smart value is constructed using a specific syntax called dot notation inside double mustache brackets. It's written as a hierarchy, starting with a top-level object and followed by properties of that object, {{object.property.subProperty}}. This practice of connecting properties, sub-properties, and functions into a single smart value is sometimes called “chaining”.

Notice that multiword properties use camelCase capitalization.

  • {{issue}} → top‑level object

  • {{issue.summary}} → property

  • {{issue.assignee.displayName}} → sub‑property

When you’re trying to understand what a particular smart value might do, it can help to read them in reverse. For example:

{{page.title}} is "the title of the page" (that's relevant to your rule component).

{{page.parent.title}} is "the title of the parent (of the relevant) page”.

Functions and methods

In addition to chaining sub-properties, smart values can be amended with functions. Functions are operations you’re asking the system to perform on that value. Functions are easy to identify because they are always followed by parentheses ( ). The parentheses may or may not be empty. For example:

{{now.plusDays(5)}} is “add 5 days to the current time”

{{issue.summary.toLowerCase()}} is “lower case the Summary of the work item (issue)”.

Other functions might include substring() or concat().

How can I find available smart values?

The easiest way to find which smart values are available for your rule is to search and select from a list in an automation component. From the rule builder:

  1. Select an action that requires you to input your own text, such as the Send email action.

  2. Select the {} button in the text field to open a list of compatible smart values.

  3. When you find the smart value you want, select the copy icon and paste it into the text field.

You can also view lists of smart values available for automations in Jira and Confluence.

To see which functions you can use (like toLowerCase() or substring()), open the {} smart values panel in a rule, then look under Advanced formatting.

In Jira Automation, you can investigate the REST API to find available smart values for a work item. See how to find smart values for a Jira Cloud field.

Testing a smart value

This feature is only available in Jira Automation.

To test what a smart value returns:

  1. Open the automation rulebuilder.

  2. Select Manual trigger from work item as your rule’s trigger.

  3. Select Log action as your rule’s action.

  4. Manually trigger your rule by navigating to a work item, and selecting Rule executions.

  5. The result will be visible in the audit log.

Chaining smart value functions

You can apply multiple transformations in one step by simply chaining your smart functions.

In the example below, we’re chaining the toLowerCase, substring, and concat smart values to change a work item’s summary to lowercase, keep only the first 10 characters, and add !! to the end.

{{issue.summary.toLowerCase().substring(0, 10).concat("!!")}}

Using smart values with sections and lists

When working with smart values that have multiple items, you can use # with the smart value to apply your rule to every item in the list.

For example, the smart value {{issue.comments}} is used to access and return a work item's comment. However, if the work item has multiple comments, the smart value {{#issue.comments}} would make your rule iterate on each comment individually. When using #, you must close the expression with {{/}}.

For example, to print a list of comment authors on a work item:

{{#issue.comments}}Author: {{author.displayName}}{{/}}

To treat items as numbers, use {{#=}} when using a math function. For example, to add 100 to an Invoice amount custom field:

{{#=}}{{issue.Invoice Amount}} + 100{{/}}

Default values

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"}}.

Customising your smart values

In Jira Automation, you can define your own custom smart values using the Create variable action.

You can also customise smart values, functions and methods in the smart values help panel. Under the Custom fields tab, you can find customised values that are specific to the spaces or scope your rule will be running in. You can also input your own data into the functions and methods under the Advanced formatting tab, which allows you to easily customise their output.

Still need help?

The Atlassian Community is here for you.