# Jira Automation smart values reference

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

Smart values are the {{...}} placeholders that Jira Automation fills in when a rule runs: the summary of a work item, a due date in a readable format, a list of labels, the result of a calculation. This reference has one page per smart value or small family: 22 text functions, 16 date and time functions, 7 list functions, 6 math pages, 3 conditional pages, 2 JSON pages and 7 pages on issue, user, project and general values.

Every example was evaluated in a real Jira Cloud rule with a manual trigger, and the result shown is the text the rule logged, character for character. The work item behind the examples has the summary Hello World!, the same text Atlassian uses in its own examples, so the results can be compared with the documentation line by line.

On 20 pages an example from the Atlassian documentation returned something different on 29 Nov 2026. Each of those pages lists the example, what the documentation says and the actual result. All 33 are collected on Smart values that differ from the documentation.

- [Smart values that differ from the Jira Automation docs](https://goingstellar.ro/reference/smart-values/documentation-differences.md)

## Text functions

- [abbreviate()](https://goingstellar.ro/reference/smart-values/abbreviate.md): Shorten a summary or description to a fixed length with abbreviate() in Jira Automation. Syntax, real output, and where the docs examples are wrong.
- [asNumber](https://goingstellar.ro/reference/smart-values/asnumber.md): Turn text into a number with asNumber in Jira Automation and use it in math. Examples from real rule runs, and what non-numeric text gives.
- [capitalize()](https://goingstellar.ro/reference/smart-values/capitalize.md): Capitalize the first letter of a text with capitalize() in Jira Automation. It leaves the rest as is, so pair it with toLowerCase(). Real output included.
- [charAt()](https://goingstellar.ro/reference/smart-values/charat.md): Read one character of a text value with charAt() in Jira Automation. Zero-based positions, initials from a title, and the error you get past the end.
- [concat()](https://goingstellar.ro/reference/smart-values/concat.md): Join text with concat() in Jira Automation: add a suffix, chain several pieces, or append another smart value. Real output and the one-argument rule.
- [equals() and equalsIgnoreCase()](https://goingstellar.ro/reference/smart-values/equals-text.md): Compare a text smart value with a fixed string in Jira Automation. equals() is case sensitive, equalsIgnoreCase() is not. Includes a curly-quote trap.
- [htmlEncode, xmlEncode, jsonEncode and quote()](https://goingstellar.ro/reference/smart-values/htmlencode-xmlencode-jsonencode.md): Escape text for HTML mail, XML webhooks, JSON bodies and regular expressions with htmlEncode, xmlEncode, jsonEncode and quote(), with real results.
- [indexOf() and lastIndexOf()](https://goingstellar.ro/reference/smart-values/indexof.md): Find where a text appears in a Jira Automation text value with indexOf() and lastIndexOf(). Real positions, -1 for no match, and wrong Atlassian examples.
- [isAlpha(), isAlphanumeric(), isNumeric()](https://goingstellar.ro/reference/smart-values/isalpha-isnumeric.md): Check whether a text smart value holds only letters, letters and digits, or digits in Jira Automation. Syntax, examples and why spaces break the check.
- [isEmpty() and isNotEmpty()](https://goingstellar.ro/reference/smart-values/isempty-isnotempty.md): Test whether a text smart value is empty in Jira Automation. Syntax, examples, and what an unset field does when you call isEmpty() on it.
- [left() and right()](https://goingstellar.ro/reference/smart-values/left-right.md): Take the first or last characters of a text smart value in Jira Automation with left() and right(). Syntax, examples, and what happens past the end.
- [leftPad() and rightPad()](https://goingstellar.ro/reference/smart-values/leftpad-rightpad.md): Pad a text smart value to a fixed width in Jira Automation with leftPad() and rightPad(). Examples, plus a typo in the Atlassian docs.
- [length()](https://goingstellar.ro/reference/smart-values/length.md): Count the characters in a text smart value with length(): syntax, results for summaries and descriptions, and what an empty field gives you.
- [match()](https://goingstellar.ro/reference/smart-values/match.md): Pull a value out of text with match() and a regular expression group: build numbers, names after a keyword, and what comes back when nothing matches.
- [replace(), replaceAll() and remove()](https://goingstellar.ro/reference/smart-values/replace.md): Swap or delete text in Jira Automation smart values: literal replace(), regex replaceAll() with group references, and remove(), with real results.
- [split()](https://goingstellar.ro/reference/smart-values/split.md): Break a text value into a list with split(): pick words with first, last and get, count the parts, and avoid the regex trap with dots and pipes.
- [startsWith() and endsWith()](https://goingstellar.ro/reference/smart-values/startswith-endswith.md): Test how a text begins or ends with startsWith() and endsWith() in Jira Automation. True or false results, case rules, and use inside if().
- [substring()](https://goingstellar.ro/reference/smart-values/substring.md): Cut a piece out of a text smart value in Jira Automation with substring(start) and substring(start, end), including negative and out-of-range values.
- [substringAfter(), substringBefore(), substringBetween()](https://goingstellar.ro/reference/smart-values/substringafter-substringbefore.md): Cut text before, after or between separators in Jira Automation with substringAfter, substringBefore, their Last variants and substringBetween.
- [toLowerCase() and toUpperCase()](https://goingstellar.ro/reference/smart-values/tolowercase-touppercase.md): Change the case of text in Jira Automation with toLowerCase() and toUpperCase(). Examples for keys, statuses and labels, plus a slug-style chain.
- [trim()](https://goingstellar.ro/reference/smart-values/trim.md): Remove leading and trailing whitespace with trim() in smart values: before and after results, the length check, and why inner spaces stay.
- [urlEncode](https://goingstellar.ro/reference/smart-values/urlencode.md): Make text safe for a URL parameter with urlEncode: inline, function and block forms, how spaces, ampersands and accents come out, with real results.

## Dates and times

- [Date formats (jiraDate, format(), shortTime…)](https://goingstellar.ro/reference/smart-values/date-format.md): Format any date smart value with jiraDate, mediumDate, fullDateTime or format("dd/MM/yyyy"), and see what each one prints and where the patterns go wrong.
- [dayOfMonth, dayOfWeekName and other date attributes](https://goingstellar.ro/reference/smart-values/date-attributes.md): Read single parts of a date in Jira Automation: dayOfMonth, dayOfWeek, dayOfWeekName, monthOfYear, year, dayOfYear, lengthOfMonth and zone values.
- [diff()](https://goingstellar.ro/reference/smart-values/date-diff.md): diff() measures the time between two dates in days, hours, business days and more. The sign rule, prettyPrint, and why the same gap gives 15 or 16 days.
- [firstOfTheMonth(), lastOfTheMonth(), ofTheMonth()](https://goingstellar.ro/reference/smart-values/firstofthemonth-lastofthemonth.md): Find the first Monday, last Friday or nth weekday of a month with firstOfTheMonth, lastOfTheMonth and ofTheMonth in Jira Automation.
- [isAfter(), isBefore(), isEquals(), compareTo()](https://goingstellar.ro/reference/smart-values/date-compare.md): isAfter(), isBefore() and compareTo() compare two dates. isEquals() renders empty and compareTo() gives 16 for equal date-times, unlike the docs.
- [locale() and withLocale()](https://goingstellar.ro/reference/smart-values/date-locale.md): locale() and withLocale() print month and day names in another language, such as German full dates or French weekdays. Examples and typo behaviour.
- [plusDays() / minusDays() and other units](https://goingstellar.ro/reference/smart-values/date-plus-minus.md): plusDays(), minusMonths(), plusHours() and the other plus and minus units move a date. Checked behaviour for month ends and date-only fields.
- [setTimeZone() and convertToTimeZone()](https://goingstellar.ro/reference/smart-values/date-timezone.md): convertToTimeZone() shifts the clock to another zone; setTimeZone() keeps the clock and only changes the offset. Examples and checked behaviour.
- [startOfMonth and endOfMonth](https://goingstellar.ro/reference/smart-values/startofmonth-endofmonth.md): Get the first or last day of a month from any date with startOfMonth and endOfMonth, and see why the time of day is kept in Jira Automation.
- [toBusinessDay(), plusBusinessDays() and business-day helpers](https://goingstellar.ro/reference/smart-values/business-days.md): toBusinessDay, plusBusinessDays, minusBusinessDays and diff().businessDays skip weekends only. Checked behaviour with holidays and weekends.
- [toDate (text to date)](https://goingstellar.ro/reference/smart-values/todate.md): Convert text such as 2026-12-24 or 24/12/2026 into a date with toDate and toDate(format) in Jira Automation, with tested outputs and failures.
- [toStartOfDay, toCurrentTime and toDateTimeAt…](https://goingstellar.ro/reference/smart-values/tostartofday.md): Reset a date to midnight or to the current time with toStartOfDay, toCurrentTime and toDateTimeAtStartOfDay in Jira Automation, with tested outputs.
- [weekOfYear and weekOfYearIso](https://goingstellar.ro/reference/smart-values/weekofyear.md): Read the week number of a date in Jira Automation with weekOfYear and weekOfYearIso, and see how the two differ around the New Year.
- [withDayOfMonth(), withMonth() and other with… setters](https://goingstellar.ro/reference/smart-values/date-with.md): Set one part of a date with withDayOfMonth, withMonth, withYear, withHour and similar setters in Jira Automation, with tested outputs and limits.
- [withNextDayOfWeek()](https://goingstellar.ro/reference/smart-values/withnextdayofweek.md): Jump to the next Monday, Friday or any weekday with withNextDayOfWeek in Jira Automation. Accepted day codes, same-day behaviour and tested outputs.
- [{{now}}](https://goingstellar.ro/reference/smart-values/now.md): {{now}} returns the current date and time in UTC. Chain plusDays(), format() and other date functions onto it for time stamps, due dates and cut-offs.

## Math

- [abs, round, floor, ceil](https://goingstellar.ro/reference/smart-values/abs-round-floor-ceil.md): Make a number positive or round it down, up or to the nearest whole number in Jira Automation, with the matching ABS, ROUND, FLOOR and CEILING functions.
- [asPercentage and asCurrency](https://goingstellar.ro/reference/smart-values/aspercentage-ascurrency.md): Print a number as a percentage or as money in Jira Automation with asPercentage and asCurrency, in the US locale or another locale such as fr_FR or de_DE.
- [format() and formatWithLocale()](https://goingstellar.ro/reference/smart-values/number-format.md): Format numbers in Jira Automation with format, format(pattern) and formatWithLocale(locale): thousands separators, decimals and locale-specific output.
- [gt(), gte(), eq(), lt(), lte()](https://goingstellar.ro/reference/smart-values/number-comparisons.md): Compare a number smart value with another number in Jira Automation using gt(), gte(), eq(), lt() and lte(), and combine them with #if.
- [plus(), minus(), multiply(), divide() on numbers](https://goingstellar.ro/reference/smart-values/plus-minus-multiply-divide.md): Add, subtract, multiply and divide number smart values in Jira Automation with plus(), minus(), multiply() and divide(), and the whole-number trap.
- [{{#=}} math expressions](https://goingstellar.ro/reference/smart-values/math-expressions.md): Calculate with {{#=}} in Jira Automation: operators, boolean results of 1 or 0, MIN, MAX, ROUND, IF and constants, with outputs from real rule runs.

## Lists

- [distinct](https://goingstellar.ro/reference/smart-values/list-distinct.md): Remove duplicates from a list with distinct in Jira Automation. Real output for repeated values and comment authors, order and counting behaviour.
- [first, last, get(), getFromEnd()](https://goingstellar.ro/reference/smart-values/list-first-last-get.md): Pick one item from a list with first, last, get() and getFromEnd() in Jira Automation. Real output for comments and labels, and what out-of-range gives.
- [flatten()](https://goingstellar.ro/reference/smart-values/list-flatten.md): Turn a list of lists into one flat list with flatten() in Jira Automation. Real output for split comment bodies, with size and join() on the result.
- [join()](https://goingstellar.ro/reference/smart-values/list-join.md): Join a list into one line with join() in Jira Automation: labels, comment bodies or split words. Real output, empty lists and the no-argument trap.
- [size and isEmpty on lists](https://goingstellar.ro/reference/smart-values/list-size-isempty.md): Count list items with size and test for an empty list with isEmpty in Jira Automation. Real output for labels, comments, links and empty lists.
- [sum, average, max, min](https://goingstellar.ro/reference/smart-values/list-sum-average-max-min.md): Add, average and find the highest or lowest value of a list in Jira Automation with sum, average, max and min. Real output, dates and empty lists.
- [{{#list}}…{{/}} iteration](https://goingstellar.ro/reference/smart-values/list-iteration.md): Loop over labels, comments or any list with {{#list}}...{{/}} in Jira Automation. Real output for first, last and index, plus the docs mistake.

## Conditional logic

- [and(), or(), not()](https://goingstellar.ro/reference/smart-values/and-or-not.md): Combine conditions in Jira Automation with and(), or() and not(): print text when several checks pass, when one passes, or when a check fails.
- [equals() and exists() in conditions](https://goingstellar.ro/reference/smart-values/conditional-equals-exists.md): Check that two smart values are equal or that a field has a value in Jira Automation with equals() and exists(), inside {{#if()}} or on their own.
- [{{#if}} … {{/}}](https://goingstellar.ro/reference/smart-values/if.md): Print text only when a condition is true in Jira Automation with {{#if()}} and {{/}}, the if() function with an else value, and the traps with the docs.

## JSON

- [asJsonObject(), xmlToJson(), jsonStringToObject()](https://goingstellar.ro/reference/smart-values/asjsonobject.md): Build JSON objects with asJsonObject() and asJsonObjectArray(), and read JSON or XML with jsonStringToObject() and xmlToJson() in Jira Automation.
- [asJsonString, asJsonStringArray, asJsonArray](https://goingstellar.ro/reference/smart-values/asjsonstring.md): Write text and lists as valid JSON with asJsonString, asJsonStringArray and asJsonArray in Jira Automation. Escaped quotes, numbers and empty fields.

## Issue fields

- [{{issue.comments}}](https://goingstellar.ro/reference/smart-values/issue-comments.md): Read, count and loop over the comments of a work item with {{issue.comments}}: first, last, body, author and a joined list, with checked output.
- [{{issue.key}}, {{issue.summary}} and other issue fields](https://goingstellar.ro/reference/smart-values/issue-fields.md): Read the key, summary, status, type, priority, labels and due date of the active work item with {{issue.field}} smart values, with checked output.
- [{{issue.url}} and {{baseUrl}}](https://goingstellar.ro/reference/smart-values/issue-url-baseurl.md): Build links to a work item or to your Jira site with {{issue.url}} and {{baseUrl}}, with checked output for Slack and e-mail lines.
- [{{triggerIssue}}, {{lookupIssues}}, {{createdIssue}}](https://goingstellar.ro/reference/smart-values/triggerissue-lookupissues.md): Refer to the work item that started a rule, the result of a Lookup issues action or the last created work item, with {{triggerIssue}} and friends.

## Users

- [{{assignee}}, {{reporter}}, {{creator}}, {{initiator}}](https://goingstellar.ro/reference/smart-values/user-smart-values.md): Read display name, e-mail, account ID and time zone of the assignee, reporter, creator or initiator, and mention a user, with checked output.

## Projects

- [{{project.key}}, {{project.name}} and other project values](https://goingstellar.ro/reference/smart-values/project-smart-values.md): Read the project key, name, ID, type, lead, description and avatar in a rule with {{project.key}} and related values, with checked output.

## General

- [Default values {{value|default}}](https://goingstellar.ro/reference/smart-values/default-values.md): Add a fallback text to a smart value with {{value|"default"}} so empty fields print Unassigned or None instead of a blank, with checked output.

