Going Stellar

Home/Smart values reference

Jira Automation smart value

gt, gte, eq, lt, lte in Jira Automation: syntax and examples

The five comparison functions check a number against a value and give true or false. Put them inside {{#if()}} to print text only when the check passes, for example a note on busy threads or a work item with few labels.

Syntax

{{number.gt(value)}}
{{number.gte(value)}}
{{number.eq(value)}}
{{number.lt(value)}}
{{number.lte(value)}}

Arguments

ArgumentWhat it isRequired
valueThe number to compare againstyes

Works on

  • Numbers: number fields and results such as size or length()
  • Returns: true or false

Examples

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

Check the raw result: with 2 comments, more than 1 is true.

Result:

true

Run on Jira Cloud on .

{{issue.comments.size.lt(2)}}

Fewer than 2 comments is false when there are exactly 2.

Result:

false

Run on Jira Cloud on .

{{issue.comments.size.eq(2)}}

Test for an exact count.

Result:

true

Run on Jira Cloud on .

{{#if(issue.comments.size.gt(1))}}Busy thread{{/}}

Print a label only when the comment count passes a limit.

Result:

Busy thread

Run on Jira Cloud on .

{{#if(issue.labels.size().eq(2))}}Two labels{{/}}

Use size() with brackets and eq() for an exact label count.

Result:

Two labels

Run on Jira Cloud on .

{{#if(issue.labels.size.lte(2))}}Two labels or fewer{{/}}

Print a note when a work item has at most two labels.

Result:

Two labels or fewer

Run on Jira Cloud on .

Pitfalls

  • Both size and size() work in front of a comparison (checked on Jira Cloud, November 2026).
  • The functions answer true or false as text, while the operators inside {{#=}} answer 1 or 0.
  • A comparison on a field without a value, such as the doc example issue.Votes.gt(100) on a site without that field, produces no error and no output, so the text inside {{#if}} is simply not printed.
  • When the condition is false, {{#if}} prints an empty string: {{#if(issue.comments.size.gte(3))}}Busy thread{{/}} on a work item with 2 comments printed nothing.

Sources

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

Markdown version · All smart values