Jira Automation smart value
substring() in Jira Automation: syntax and examples
substring(start) returns everything from a zero-based position to the end, and substring(start, end) returns the characters from start up to, but not including, end. Use it when you know where the part you need sits.
Syntax
{{issue.summary.substring(7)}}
{{issue.summary.substring(1,3)}}
Arguments
| Argument | What it is | Required |
|---|---|---|
start | Zero-based position of the first character to keep | yes |
end | Position where the cut stops; the character at this position is not included | no |
Works on
- Fields: text smart values
- Returns: text
Examples
{{issue.summary.substring(6)}}Drop the first word of a title. With a summary of Hello World! position 6 is the W.
Result:
World!Run on Jira Cloud on .
{{issue.summary.substring(0,5)}}Keep the first five characters. The end position is not part of the result.
Result:
HelloRun on Jira Cloud on .
{{issue.description.substring(0,13)}}Take the opening words of a description for a short notification.
Result:
Checkout pageRun on Jira Cloud on .
{{issue.summary.substring(-6)}}A negative start counts from the end of the text, so this returns the last six characters.
Result:
World!Run on Jira Cloud on .
{{issue.summary.substring(6,-1)}}A negative end counts from the end too, which drops the final character.
Result:
WorldRun on Jira Cloud on .
{{issue.summary.substring(0,100)}}An end past the length of the text is accepted and the whole text comes back.
Result:
Hello World!Run on Jira Cloud on .
Pitfalls
- Positions start at 0, and the end position is excluded.
substring(1,3)returns two characters (el), not three. - Out-of-range input does not raise an error. A start beyond the end of the text, or an end before the start, produces an empty text (checked on Jira Cloud, November 2026), so a typo in a number shows up as an empty field.
- When the position depends on the content, such as everything after a dash,
substringAfter()is more reliable than counting characters.
Related
- left() and right()
- substringAfter(), substringBefore(), substringBetween()
- charAt()
- indexOf() and lastIndexOf()
- length()
- abbreviate()