# equals() in Jira Automation: syntax and examples

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

equals() returns true when the text is identical to the string you pass in, and equalsIgnoreCase() does the same without looking at upper or lower case. Use them in advanced compare conditions, in {{#if}} blocks, or to build a flag you write into a field.

## Syntax

```
{{issue.summary.equals("text")}}
{{issue.summary.equalsIgnoreCase("text")}}
```

## Arguments

- `string` (required: yes): The text to compare with, in straight double quotes

## Works on

- Fields: any text smart value, such as summary, description or a piece cut out with substringBefore()
- Returns: true or false

## Examples

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

Check that a title matches a known value exactly before a rule continues. With a summary of Hello World! the match is exact.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

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

The same comparison with different capitals is not a match, which matters when only one spelling is allowed.

Result:

```
false
```

Run on Jira Cloud on 29 Nov 2026.

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

Accept any capitalisation of a keyword that people type by hand.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

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

Normalise the text first (trim, lower case) and compare with the strict version. Handy when you want one exact spelling after cleanup.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.key.substringBefore("-").equalsIgnoreCase("web")}}
```

Cut the project part off an issue key and compare it, for a rule that only continues for one project.

Result:

```
true
```

Run on Jira Cloud on 29 Nov 2026.

## Where the documentation differs

- `{{issue.summary.equals(“Hello world!”)}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `true`, the actual result is `false`.
- `{{issue.summary.equals(“hello world!”)}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `true (shown under equalsIgnoreCase)`, the actual result is `false`.

## Pitfalls

- The Atlassian examples are written with curly quotes (“Hello world!”). Pasted as they are, they compare against the quote characters too and always return false, even for equalsIgnoreCase(). Use straight double quotes (checked on Jira Cloud, November 2026).
- The documentation shows `equals()` in the equalsIgnoreCase examples as well. To ignore case you have to call `equalsIgnoreCase()` itself.
- `Hello world!` and `Hello World!` differ in one capital letter, so equals() returns false for them. When the result surprises you, print the field in a Log action and compare character by character.

## Questions and answers

### How do I compare text without caring about capitals in Jira Automation?

Use `equalsIgnoreCase()`, or convert both sides with toLowerCase() first.

## Related

- [startsWith() and endsWith()](https://goingstellar.ro/reference/smart-values/startswith-endswith/)
- [trim()](https://goingstellar.ro/reference/smart-values/trim/)
- [toLowerCase() and toUpperCase()](https://goingstellar.ro/reference/smart-values/tolowercase-touppercase/)
- [equals() and exists() in conditions](https://goingstellar.ro/reference/smart-values/conditional-equals-exists/)
- [isEmpty() and isNotEmpty()](https://goingstellar.ro/reference/smart-values/isempty-isnotempty/)

## Sources

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

