Going Stellar

Home/Smart values reference

Jira Automation · checked on Jira Cloud

Smart values that differ from the Jira Automation docs

The Atlassian pages on smart values show an example and the result it should give. Most of them return exactly that. This page lists the ones that did not, when each example was run in a Jira Cloud rule on 29 Nov 2026 against a work item with the summary Hello World!.

Some differences are small (a capital letter, a space), others change what a rule does (a test that returns false instead of true, a date that keeps the time of day). Each row links to the page with working examples.

Positions and lengths

indexOf() and lastIndexOf() count from 0 and match case exactly, so several documented positions differ by one or come back as -1. abbreviate() counts the three dots inside the width you give, and substringBefore() keeps the space before the cut.

  • indexOf() and lastIndexOf()
    {{issue.summary.indexOf("ello")}}

    Run on Jira Cloud, : the documentation says 2, the actual result is 1.

  • indexOf() and lastIndexOf()
    {{issue.summary.indexOf("d!")}}

    Run on Jira Cloud, : the documentation says 11, the actual result is 10.

  • indexOf() and lastIndexOf()
    {{issue.summary.lastIndexOf("wo")}}

    Run on Jira Cloud, : the documentation says 7, the actual result is -1.

  • indexOf() and lastIndexOf()
    {{issue.summary.lastIndexOf("ll")}}

    Run on Jira Cloud, : the documentation says 4, the actual result is 2.

  • indexOf() and lastIndexOf()
    {{issue.summary.lastIndexOf("rl")}}

    Run on Jira Cloud, : the documentation says 9, the actual result is 8.

  • abbreviate()
    {{issue.summary.abbreviate(8)}}

    Run on Jira Cloud, : the documentation says Hello Wo..., the actual result is Hello....

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

    Run on Jira Cloud, : the documentation says Hell..., the actual result is H....

  • substringAfter(), substringBefore(), substringBetween()
    {{issue.summary.substringBefore("W")}}

    Run on Jira Cloud, : the documentation says Hello, the actual result is Hello .

Text tests

isAlpha() and isAlphanumeric() return false for Hello World!, and the equals() examples written with curly quotes return false. capitalize() leaves the rest of the text as it is, and match() with one group returned a single value instead of a list.

  • isAlpha(), isAlphanumeric(), isNumeric()
    {{issue.summary.isAlpha()}}

    Run on Jira Cloud, : the documentation says true, the actual result is false.

  • isAlpha(), isAlphanumeric(), isNumeric()
    {{issue.summary.isAlphanumeric()}}

    Run on Jira Cloud, : the documentation says true, the actual result is false.

  • equals() and equalsIgnoreCase()
    {{issue.summary.equals(“Hello world!”)}}

    Run on Jira Cloud, : the documentation says true, the actual result is false.

  • equals() and equalsIgnoreCase()
    {{issue.summary.equals(“hello world!”)}}

    Run on Jira Cloud, : the documentation says true (shown under equalsIgnoreCase), the actual result is false.

  • capitalize()
    {{issue.summary.capitalize()}}

    Run on Jira Cloud, : the documentation says Hello world!, the actual result is Hello World!.

  • match()
    {{issue.summary.match(".*(o).*")}}

    Run on Jira Cloud, : the documentation says [o, o], the actual result is o.

Empty instead of null

Where the documentation says null, the rule logs an empty string, false or an error, which matters when the value goes into a condition.

  • charAt()
    {{issue.summary.charAt(12)}}

    Run on Jira Cloud, : the documentation says Null, the actual result is Failed to get value for issue.summary.charAt(12).

  • asNumber
    {{issue.summary.asNumber}}

    Run on Jira Cloud, : the documentation says Null, the actual result is .

  • {{#if}} … {{/}}
    {{if(issue.summary)}}

    Run on Jira Cloud, : the documentation says The docs say {{if(smartValue)}} returns true or null., the actual result is .

  • {{#if}} … {{/}}
    {{if(issue.summary, "Hello")}}

    Run on Jira Cloud, : the documentation says The docs say {{if(smartValue, "Hello")}} returns Hello or null., the actual result is .

  • {{#if}} … {{/}}
    {{if(issue.summary)}}Hello{{/}}

    Run on Jira Cloud, : the documentation says The docs say {{if(smartValue)}}Hello{{/}} returns Hello or null., the actual result is Error parsing template: Mismatched start/end tags: null != in template-f5b1359e-924b-4e4d-be3b-d48fd44aaf2e:1.

  • equals() and exists() in conditions
    {{exists(issue.designer)}}

    Run on Jira Cloud, : the documentation says The docs say {{exists(smartValue)}} returns true or null., the actual result is false.

Dates and times

startOfMonth and endOfMonth keep the time of the run, compareTo() on two equal date-times returned 16, isEquals() logged nothing, and time formats put a narrow no-break space (U+202F) before AM and PM.

  • startOfMonth and endOfMonth
    {{now.startOfMonth}}

    Run on Jira Cloud, : the documentation says Returns the date and time of the start of the month., the actual result is 2026-11-01T16:02:39.1+0000.

  • startOfMonth and endOfMonth
    {{now.endOfMonth}}

    Run on Jira Cloud, : the documentation says Returns the date and time of the end of the month., the actual result is 2026-11-30T16:02:39.1+0000.

  • isAfter(), isBefore(), isEquals(), compareTo()
    {{issue.updated.isEquals(issue.created)}}

    Run on Jira Cloud, : the documentation says false, the actual result is .

  • isAfter(), isBefore(), isEquals(), compareTo()
    {{now.compareTo(now)}}

    Run on Jira Cloud, : the documentation says 0, the actual result is 16.

  • Date formats (jiraDate, format(), shortTime…)
    This issue was updated at {{issue.updated.shortTime}}.

    Run on Jira Cloud, : the documentation says This issue was updated at 2:40 AM. (with a normal space before AM), the actual result is This issue was updated at 4:00 PM..

Typos and copied text

A few examples carry a typo or an extra character that changes the result: a doubled function name, a lowercase letter in the expected output, a default value without quotes.

  • leftPad() and rightPad()
    {{issue.summary.<br/>rightPadPad(14,"-")}}

    Run on Jira Cloud, : the documentation says Hello World!--, the actual result is .

  • htmlEncode, xmlEncode, jsonEncode and quote()
    {{htmlEncode(issue.summary)}}

    Run on Jira Cloud, : the documentation says Hello world!, the actual result is Hello World!.

  • htmlEncode, xmlEncode, jsonEncode and quote()
    {{issue.summary.quote()}}

    Run on Jira Cloud, : the documentation says \QHello(.*)World!\E<, the actual result is \QHello World!\E.

  • Default values {{value|default}}
    {{invalid reference|Hello world}}

    Run on Jira Cloud, : the documentation says Hello world (the page on formatting smart values shows the default without quotes), the actual result is .

Lists, math and projects

The {{#last}} section prints before the last comment, PI has 16 digits, and the project type key is lowercase.

  • {{#list}}…{{/}} iteration
    {{#issue.comments}}{{#last}}Last: {{/}}{{body}}{{/}}

    Run on Jira Cloud, : the documentation says Places "Last:" in front of the first comment., the actual result is First comment from QALast: Second comment: fixed in build 42.

  • {{#=}} math expressions
    {{#=}}PI{{/}}

    Run on Jira Cloud, : the documentation says The docs say PI is precise to 100 digits., the actual result is 3.141592653589793.

  • {{project.key}}, {{project.name}} and other project values
    {{project.projectTypeKey}}

    Run on Jira Cloud, : the documentation says Software (type names such as Business, Software, Service management, Discovery), the actual result is software.

  • {{project.key}}, {{project.name}} and other project values
    {{project.avatarUrls}}

    Run on Jira Cloud, : the documentation says 48x48=https://acme.atlassian.net/secure/projectavatar?pid=11200&avatarId=10404, 24x24=..., 16x16=..., 32x32=... (no braces, projectavatar URLs), the actual result is {48x48=https://your-site.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10406, 24x24=https://your-site.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10406?size=small, 16x16=https://your-site.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10406?size=xsmall, 32x32=https://your-site.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10406?size=medium}.

Questions and answers

Does this mean the documentation is wrong?

Not always. Some rows are typos, others are behaviour that may have changed since the page was written. The rows only record what the same example returned in a Jira Cloud rule on one date.

Why does the same smart value give a different time for me?

Date values render at the moment the rule runs, in UTC unless a time zone is set. Only the format and the parts that do not depend on the clock can be compared.

Sources

  1. Jira smart values: text fields (Atlassian Support)
  2. Jira smart values: date and time (Atlassian Support)
  3. Jira smart values: math expressions (Atlassian Support)
  4. Jira smart values: lists (Atlassian Support)
  5. Jira smart values: conditional logic (Atlassian Support)
  6. Jira smart values: projects (Atlassian Support)
  7. What are smart values? (Atlassian Support)

Markdown version · All smart values