# abbreviate() in Jira Automation: syntax and examples

URL: https://goingstellar.ro/reference/smart-values/abbreviate/

abbreviate() cuts a text value to a maximum length and ends it with three dots. Use it when a long summary or description has to fit a Slack line, an e-mail subject or a comment preview.

## Syntax

```
{{issue.summary.abbreviate(maxLength)}}
```

## Arguments

- `maxLength` (required: yes): The total length of the result, including the three dots. Must be at least 4.

## Works on

- Fields: any text value, such as issue.summary or issue.description.
- Returns: text of at most maxLength characters.

## Examples

```
{{issue.description.abbreviate(30)}}
```

Show a one-line preview of the description in a notification.

Result:

```
Checkout page redesign. Cus...
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.abbreviate(6)}}
```

Cut the summary to six characters in total, dots included.

Result:

```
Hel...
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.abbreviate(20)}}
```

Use one rule for every length: a summary that already fits is left alone.

Result:

```
Hello World!
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.description.abbreviate(40).toUpperCase()}}
```

Chain with toUpperCase() to build a short, capitalised label from the description.

Result:

```
CHECKOUT PAGE REDESIGN. CUSTOMER REPO...
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.abbreviate(4)}}
```

The shortest length that works: one character plus the dots.

Result:

```
H...
```

Run on Jira Cloud on 29 Nov 2026.

## Where the documentation differs

- `{{issue.summary.abbreviate(8)}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `Hello Wo...`, the actual result is `Hello...`.
- `{{issue.summary.abbreviate(4)}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `Hell...`, the actual result is `H...`.

## Pitfalls

- The three dots count towards `maxLength`. `abbreviate(8)` on `Hello World!` keeps five characters, not eight (checked on Jira Cloud, November 2026). The Atlassian examples show the dots added on top of the limit, and that is not what happens.
- A `maxLength` below 4 fails with `Failed to get value for issue.summary.abbreviate(3)`, so the rule logs an error instead of a short text.
- Text that is already within the limit comes back unchanged and without dots. Do not use the dots as a signal that the text was cut.

## Questions and answers

### Does abbreviate() cut in the middle of a word?

Yes. It counts characters only, so `abbreviate(6)` on Hello World! returns Hel... and does not look for a word boundary.

## Related

- [substring()](https://goingstellar.ro/reference/smart-values/substring/)
- [left() and right()](https://goingstellar.ro/reference/smart-values/left-right/)
- [length()](https://goingstellar.ro/reference/smart-values/length/)
- [toLowerCase() and toUpperCase()](https://goingstellar.ro/reference/smart-values/tolowercase-touppercase/)
- [concat()](https://goingstellar.ro/reference/smart-values/concat/)

## Sources

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

