# isEmpty() and isNotEmpty() in Jira Automation

URL: https://goingstellar.ro/reference/smart-values/isempty-isnotempty/

isEmpty() returns true for a zero-length text and isNotEmpty() returns true for anything else. They are meant for guarding a step, for example only posting a comment when a piece of text was found.

## Syntax

```
{{issue.description.isEmpty()}}
{{issue.description.isNotEmpty()}}
```

## Works on

- Fields: text smart values, including the result of another text function
- Returns: true or false

## Examples

```
{{issue.summary.isEmpty()}}
```

A quick sanity check that the title is filled in.

Result:

```
false
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.description.isNotEmpty()}}
```

Decide whether a description exists before you quote it in a message.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.substringAfter("zzz").isEmpty()}}
```

Detect that a separator was not found: substringAfter() gives an empty text, so the check is true.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.substringAfter("zzz").isNotEmpty()}}
```

The opposite check, true only when the separator exists and something follows it.

Result:

```
false
```

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- On a field that has no value, such as the environment of an issue that never had one, both calls render nothing at all instead of true or false (checked on Jira Cloud, November 2026). Test such a field with an exists check or a default value first.
- Use these on text. For a list, the list functions have their own size and empty checks.

## Related

- [trim()](https://goingstellar.ro/reference/smart-values/trim/)
- [Default values {{value|default}}](https://goingstellar.ro/reference/smart-values/default-values/)
- [equals() and exists() in conditions](https://goingstellar.ro/reference/smart-values/conditional-equals-exists/)
- [length()](https://goingstellar.ro/reference/smart-values/length/)
- [size and isEmpty on lists](https://goingstellar.ro/reference/smart-values/list-size-isempty/)

## Sources

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

