Going Stellar

Home/Smart values reference

Jira Automation smart value

plus, minus, multiply, divide in Jira Automation: examples

These functions do arithmetic on a number smart value and take another number or number smart value as the argument. They chain, so one value can pass through several steps before it is printed or used in a field.

Syntax

{{number.plus(value)}}
{{number.minus(value)}}
{{number.multiply(value)}}
{{number.divide(value)}}

Arguments

ArgumentWhat it isRequired
valueA number or a smart value that returns a numberyes

Works on

  • Numbers: number fields and results such as length() or a list size
  • Returns: a number

Examples

{{issue.comments.size.plus(issue.labels.size)}}

Add the number of labels to the number of comments.

Result:

4

Run on Jira Cloud on .

{{issue.summary.length().minus(issue.comments.size)}}

Subtract one count from another.

Result:

10

Run on Jira Cloud on .

{{issue.comments.size.multiply(3)}}

Scale a count, for example three days per comment.

Result:

6

Run on Jira Cloud on .

{{issue.summary.length().divide(4)}}

Divide a count by a fixed number.

Result:

3

Run on Jira Cloud on .

{{now.plusBusinessDays(issue.comments.size.multiply(3))}}

Feed a calculated number into a date function: add three business days for each comment.

Result:

2026-12-07T16:15:14.4+0000

Run on Jira Cloud on .

{{issue.comments.size.plus(1)}}

Number the next comment by adding one to the current count.

Result:

3

Run on Jira Cloud on .

Pitfalls

  • divide() works on whole numbers: with a summary of Hello World! (12 characters), length().divide(5) gives 2 and length().divide(4) gives 3 (checked on Jira Cloud, November 2026). Use {{#=}}{{issue.summary.length()}} / 5{{/}} when you need decimals.
  • Dividing by zero does not raise an error: issue.comments.size.divide(0) printed 2, the original number, on a work item with 2 comments (checked on Jira Cloud, November 2026). A silent wrong number is harder to spot than a stopped rule.
  • If the number field is empty the whole chain prints nothing, for example issue.Story Points.plus(issue.subtasks.size) on a work item without story points gave an empty string.

Sources

  1. Jira smart values: math expressions (Atlassian Support)

Markdown version · All smart values