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

URL: https://goingstellar.ro/reference/smart-values/number-comparisons/

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

- `value` (required: yes): The number to compare against

## 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 29 Nov 2026.

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

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

Result:

```
false
```

Run on Jira Cloud on 29 Nov 2026.

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

Test for an exact count.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

```
{{#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 29 Nov 2026.

```
{{#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 29 Nov 2026.

```
{{#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 29 Nov 2026.

## 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.

## Related

- [{{#if}} … {{/}}](https://goingstellar.ro/reference/smart-values/if/)
- [and(), or(), not()](https://goingstellar.ro/reference/smart-values/and-or-not/)
- [{{#=}} math expressions](https://goingstellar.ro/reference/smart-values/math-expressions/)
- [size and isEmpty on lists](https://goingstellar.ro/reference/smart-values/list-size-isempty/)
- [plus(), minus(), multiply(), divide() on numbers](https://goingstellar.ro/reference/smart-values/plus-minus-multiply-divide/)

## Sources

- [Jira smart values: math expressions (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/)

