# equals and exists in Jira Automation conditions: examples

URL: https://goingstellar.ro/reference/smart-values/conditional-equals-exists/

equals(a, b) compares two values and exists(value) tells you whether a field or value is present. Both are normally wrapped in {{#if()}} to print text, or in if(condition, a, b) to choose a fallback.

## Syntax

```
{{equals(value1, value2)}}
{{exists(value)}}
{{#if(equals(value1, value2))}}text{{/}}
{{#if(exists(value))}}text{{/}}
```

## Arguments

- `value1, value2` (required: yes): Smart values or quoted strings to compare
- `value` (required: yes): A smart value or quoted string to test

## Works on

- Fields: users, text and any other smart value
- Returns: true or false

## Examples

```
{{#if(equals(issue.assignee, issue.reporter))}}Assign this issue to someone else so they can review.{{/}}
```

Remind the team when the assignee and the reporter are the same person.

Result:

```
Assign this issue to someone else so they can review.
```

Run on Jira Cloud on 29 Nov 2026.

```
{{equals(issue.summary, "Hello World!")}}
```

Compare a field with a fixed text.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

```
{{equals(issue.summary, "hello world!")}}
```

The comparison is case sensitive, so a different capital gives false.

Result:

```
false
```

Run on Jira Cloud on 29 Nov 2026.

```
{{exists(issue.designer)}}
```

Test a field that this work item does not have.

Result:

```
false
```

Run on Jira Cloud on 29 Nov 2026.

```
{{if(exists(issue.duedate), issue.duedate.format("dd/MM/yyyy"), "No due date")}}
```

Print the due date in a readable format, or a fallback when it is empty.

Result:

```
15/12/2026
```

Run on Jira Cloud on 29 Nov 2026.

```
{{if(exists(issue.designer), issue.designer.displayName, "No designer")}}
```

Avoid an empty gap in a message when a user field has no value.

Result:

```
No designer
```

Run on Jira Cloud on 29 Nov 2026.

## Where the documentation differs

- `{{exists(issue.designer)}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `The docs say {{exists(smartValue)}} returns true or null.`, the actual result is `false`.

## Pitfalls

- `exists()` on a missing field gives false, not null as the docs say, so it works directly as a condition (checked on Jira Cloud, November 2026).
- `equals()` on text compares exactly: Hello World! and hello world! are different.
- Reading a property of a missing user, such as `issue.designer.displayName`, prints an empty string, so put it behind `exists()` or use the fallback form.

## Related

- [{{#if}} … {{/}}](https://goingstellar.ro/reference/smart-values/if/)
- [and(), or(), not()](https://goingstellar.ro/reference/smart-values/and-or-not/)
- [equals() and equalsIgnoreCase()](https://goingstellar.ro/reference/smart-values/equals-text/)
- [Default values {{value|default}}](https://goingstellar.ro/reference/smart-values/default-values/)
- [gt(), gte(), eq(), lt(), lte()](https://goingstellar.ro/reference/smart-values/number-comparisons/)

## Sources

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

