Going Stellar

Home/Smart values reference

Jira Automation smart value

left() and right() in Jira Automation: examples

left(n) returns the first n characters of a text and right(n) returns the last n. They are the quick way to cut a fixed-size piece, like a short preview of a description or the number at the end of a reference.

Syntax

{{issue.summary.left(5)}}
{{issue.summary.right(6)}}

Arguments

ArgumentWhat it isRequired
lengthHow many characters to keepyes

Works on

  • Fields: text smart values
  • Returns: text

Examples

{{issue.summary.left(5)}}

Show the first word of a short title. With a summary of Hello World! the first five characters are the word Hello.

Result:

Hello

Run on Jira Cloud on .

{{issue.summary.right(6)}}

Take the last six characters, for example a fixed-length suffix.

Result:

World!

Run on Jira Cloud on .

{{issue.description.left(13).concat("...")}}

Build a short preview of a description for a notification.

Result:

Checkout page...

Run on Jira Cloud on .

{{issue.summary.right(6).toUpperCase()}}

Chain with another function to shout the ending of a title.

Result:

WORLD!

Run on Jira Cloud on .

{{issue.summary.left(50)}}

Ask for more characters than the text has: you get the whole text, no error and no padding.

Result:

Hello World!

Run on Jira Cloud on .

{{issue.summary.left(9)}}

Cut in the middle of a word when the limit falls there, as in a 9 character preview.

Result:

Hello Wor

Run on Jira Cloud on .

Pitfalls

  • Both functions cut by count, so they can split a word. For a preview that ends on a word boundary use abbreviate() or cut at a separator with substringBefore().
  • A length of 0 or a negative number gives an empty text rather than an error (checked on Jira Cloud, November 2026). Do not feed it a computed length that can go negative.
  • Requesting more characters than exist returns the whole text unchanged, so a length check is not needed before calling left() or right().

Sources

  1. Jira smart values: text fields (Atlassian Support)

Markdown version · All smart values