Examples of using math expression smart values

You can use math expressions to insert values into fields or set values of a number custom field anywhere where custom fields can be edited (create, edit & transition actions). Details of operators, functions and constants are in the math reference section.

In a number custom field you can use an expression to set a value: 

1 + 4 sets the field to "5"

To use a math expression in another field, insert the value using: 

{{#=}}1 + 4{{/}}

// more verbose but more obvious
{{#math}}1 + 4{{/}}

// increase a number by 1
{{#increment}}4{{/}}

Referencing number fields

To perform calculations with number custom fields in Jira, you can simply reference the field as a smart value in your calculation:

{{#=}}3.2 * {{issue.My Number field}} + 43{{/}}

Or, if you wanted to add two custom fields you could use: 

{{#=}}{{issue.Sale Amount}} * {{issue.Discount}}{{/}}
Last modified on Jun 21, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.