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
| Argument | What it is | Required |
|---|---|---|
value | The number to compare against | yes |
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:
trueRun on Jira Cloud on .
{{issue.comments.size.lt(2)}}Fewer than 2 comments is false when there are exactly 2.
Result:
falseRun on Jira Cloud on .
{{issue.comments.size.eq(2)}}Test for an exact count.
Result:
trueRun 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 threadRun 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 labelsRun 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 fewerRun on Jira Cloud on .
Pitfalls
- Both
sizeandsize()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.
Related
- {{#if}} … {{/}}
- and(), or(), not()
- {{#=}} math expressions
- size and isEmpty on lists
- plus(), minus(), multiply(), divide() on numbers