Sync Bridge for Jira Cloud

Smart Values and Transformations

📘 What you will learn here

On this page you will learn how to build a field value or a comment from the data of the work item being synced with smart values: the syntax, every path and function, how results are written, and how to test a template.


For example: Synced from {{key}} or {{duedate.plusDays(7).jiraDate}}. This page is for Jira administrators who configure sync rules, and is precise enough to be used by AI tools.

You can use smart values in two places on the Field mapping tab of a sync rule:

  • The Smart value transform of a field mapping. See Field Mapping.

  • The Smart value transform of the Comments card. See Comments Sync.

The other transforms (Direct copy, Value map, Static value) are described on Field Mapping.

Syntax

  • A token is a path in double curly braces: {{path}}. Everything outside tokens is literal text, including line breaks you type.

  • Path segments are separated by dots: {{assignee.displayName}}.

  • A function is a segment. Functions without arguments are written without parentheses: {{created.jiraDate}}. Functions with arguments use parentheses: {{created.format("DD/MM/YYYY")}}.

  • Functions chain from left to right, and each one works on the result of the previous one: {{summary.toLowerCase.abbreviate(50)}}.

  • Text arguments go in double or single quotes. Inside quotes, \n, \t and \r are a new line, tab and carriage return; a backslash before any other character keeps that character, for example \". Number arguments don't need quotes: {{summary.left(10)}}.

  • Spaces just inside the braces are ignored: {{ key }} works.

  • A token that isn't closed with }} is kept as literal text.

  • Field IDs are case sensitive and are the Jira field IDs, for example summary, duedate, customfield_10050.

What a template can read

A template is evaluated against one work item: the one Sync Bridge reads from. When pushing, that's the work item on This Jira site; when pulling, it's the linked work item on the other site.

Root paths

Path

What it returns

Example

{{<fieldId>}}

Any field of the work item, by field ID.

{{summary}}, {{customfield_10050}}

{{key}}

Work item key.

PROJ-123

{{id}}

Work item ID (a number).

10423

{{now}}

Current date and time. Add a date function.

{{now.plusDays(1).jiraDate}}

{{value}}

Value of the field the mapping reads from. Only in field mappings, and only when that field is selected.

{{value.toUpperCase}}

{{issue}}

Full work item data as returned by the Jira REST API (advanced).

{{issue.fields.summary}}

{{source.<fieldId>}}

A field read only when the value travels from source to target. Empty when pulling.

{{source.customfield_10098}}

{{target.<fieldId>}}

A field read only when the value travels from target to source. Empty when pushing.

{{target.customfield_10098}}

{{comment}}

The comment being synced. Only in comment templates. See Comment paths below.

{{comment.body}}

Use source. and target. in a Both directions mapping when the same custom field ID means different things on the two sites. A bare {{customfield_10098}} always reads whichever work item is being read in that direction.

Properties of common fields

Object fields have properties. The editor suggests these; the notes say which property the receiving field accepts.

Field

Properties

Notes

assignee, reporter

accountId, displayName

Use accountId when writing to a user field.

creator

accountId, displayName


priority

name, id

Use name when writing to Priority.

issuetype

name, id

Use name when writing to Work type.

status, resolution, security

name, id


statusCategory

name, key, id


project

key, name, id

The work item's space.

parent

key, fields.summary


timetracking

originalEstimate, remainingEstimate, timeSpent, originalEstimateSeconds, remainingEstimateSeconds, timeSpentSeconds

The *Seconds properties are numbers.

votes

votes, hasVoted


watches

watchCount, isWatching


progress, aggregateprogress

progress, total, percent

Jira leaves out percent when there's no estimate.

Select, radio buttons, multi-select, checkboxes

value, id

Use value when writing.

Cascading select

value, id, child.value, child.id


User, multi-user

accountId, displayName

Use accountId when writing.

Group, multi-group

name


Version, multi-version

name, id

Use name when writing.

Project picker custom field

key, name, id

Use key when writing.

Team

id, title


Comment paths

In a comment template, {{comment}} is the comment being synced. All work item paths above work too.

Path

What it returns

{{comment.body}}

Comment text, as plain text.

{{comment.author.displayName}}

Author's name.

{{comment.author.accountId}}

Author's account ID.

{{comment.created}}, {{comment.updated}}

Dates. Add a date function, for example {{comment.created.jiraDate}}.

{{comment.id}}

Comment ID.

{{comment.visibility.type}}, {{comment.visibility.value}}

The comment's visibility restriction, if any.

{{comment.jsdPublic}}

false for an internal Jira Service Management comment.

Lists

When a path reaches a list, a property is read from every item: {{components.name}} returns the names of all components. List functions work on the list itself: {{labels.first}}.

How results are written

Result

Rendered as

Text, number

As is.

True or false

true or false.

List

Items joined with , (comma and space). Use join for another separator.

Object, for example a user or an option

Its first non-empty property of: displayName, name, value, key, id. So {{assignee}} renders the display name.

Rich text, for example description

Plain text. Formatting, images and other media aren't kept.

Empty, missing or unknown path

Nothing. See below.

When a token resolves to nothing:

  • If the template is a single token, for example {{assignee.accountId}}, the receiving field is left unchanged rather than cleared.

  • If the template mixes text and tokens, the token becomes empty text and the rest is written.

Writing into a field: the rendered text is written into the receiving field in the form that field needs. For example, text written to Priority or Work type is used as the name, text written to a user field is used as the account ID, text written to Labels becomes one label, and text written to a number field must be a number. For date fields, write dates as YYYY-MM-DD, for example with jiraDate.

Time zone and working time: date functions are evaluated in UTC, so the hour and even the day can differ from what you see in Jira. prettyDuration uses 8-hour days and 5-day weeks.

Functions

Which functions you can use depends on the value: date functions on dates, text functions on text, and so on. Dates are also text, so text functions work on dates too, for example {{created.left(4)}} returns the year. Functions that return a date can be chained with more date functions; the others end the date chain.

Examples below assume created is 21 August 2026, 10:30 UTC (a Friday), summary is Login fails on Safari, and labels is backend, urgent.

Date functions: formatting

Function

Description

Example

Result

format(pattern)

Format with a pattern. See Format patterns below.

{{created.format("DD/MM/YYYY")}}

21/08/2026

jiraDate

Date only.

{{created.jiraDate}}

2026-08-21

jiraDateTime

Date and time with time zone offset.

{{created.jiraDateTime}}

2026-08-21T10:30:00.000+0000

shortDate

Short date.

{{created.shortDate}}

21/Aug/26

shortDateTime

Short date and time.

{{created.shortDateTime}}

21/Aug/26 10:30 AM

longDate

Long date.

{{created.longDate}}

21 August 2026

longDateTime

Long date and time.

{{created.longDateTime}}

21 August 2026 10:30 AM

Date functions: arithmetic (chainable)

Function

Description

Example

Result

plusDays(n) / minusDays(n)

Add or subtract n days.

{{created.plusDays(3).jiraDate}}

2026-08-24

plusWeeks(n) / minusWeeks(n)

Add or subtract n weeks.

{{created.plusWeeks(2).jiraDate}}

2026-09-04

plusMonths(n) / minusMonths(n)

Add or subtract n months.

{{created.minusMonths(1).jiraDate}}

2026-07-21

plusYears(n) / minusYears(n)

Add or subtract n years.

{{created.plusYears(1).jiraDate}}

2027-08-21

plusHours(n) / minusHours(n)

Add or subtract n hours.

{{created.plusHours(2).hour}}

12

plusMinutes(n) / minusMinutes(n)

Add or subtract n minutes.

{{created.minusMinutes(30).hour}}

10

Date functions: boundaries and setters (chainable)

Function

Description

Example

Result

startOfMonth

Start of the month (day 1, 00:00).

{{created.startOfMonth.jiraDate}}

2026-08-01

endOfMonth

End of the month (last day, 23:59).

{{created.endOfMonth.jiraDate}}

2026-08-31

startOfWeek

Start of the week (Monday).

{{created.startOfWeek.jiraDate}}

2026-08-17

endOfWeek

End of the week (Sunday).

{{created.endOfWeek.jiraDate}}

2026-08-23

toStartOfDay

Start of the day (00:00).

{{created.toStartOfDay.hour}}

0

withDayOfMonth(n)

Set the day of the month.

{{created.withDayOfMonth(1).jiraDate}}

2026-08-01

withMonth(n)

Set the month (1 = January).

{{created.withMonth(12).jiraDate}}

2026-12-21

withYear(n)

Set the year.

{{created.withYear(2027).jiraDate}}

2027-08-21

Date functions: parts

Function

Description

Example

Result

dayOfMonth

Day of the month (1–31).

{{created.dayOfMonth}}

21

dayOfWeek

Day of the week (1 = Monday, 7 = Sunday).

{{created.dayOfWeek}}

5

dayOfWeekName

Day name.

{{created.dayOfWeekName}}

Friday

month

Month (1 = January).

{{created.month}}

8

year

Four-digit year.

{{created.year}}

2026

hour

Hour (0–23).

{{created.hour}}

10

minute

Minute (0–59).

{{created.minute}}

30

second

Second (0–59).

{{created.second}}

0

Date functions: comparison and difference

The argument can be another date path, for example duedate or now, or a date in quotes, for example "2026-01-01". If the argument can't be read as a date, comparisons return false, compareTo returns 0 and diff returns zeros.

Function

Description

Example

Result

isAfter(date)

True if later than the given date.

{{created.isAfter("2026-01-01")}}

true

isBefore(date)

True if earlier than the given date.

{{created.isBefore("2026-01-01")}}

false

isEquals(date)

True if it's the same date and time.

{{created.isEquals("2026-08-21T10:30:00Z")}}

true

compareTo(date)

-1 if earlier, 0 if the same, 1 if later.

{{created.compareTo("2026-01-01")}}

1

diff(date)

Time from the given date to this date. Add .millis, .seconds, .minutes, .hours, .days, .weeks, .months, .years or .prettyPrint. Add .abs first to drop the sign, for example .abs.days.

{{now.diff(created).days}}

Whole days since the work item was created

prettyPrint returns text such as 2 days 3 hours 4 minutes, with a leading - when negative, and 0 seconds for no difference.

Format patterns

format accepts these tokens. Put literal text in square brackets, for example format("[Due] DD MMM YYYY").

Token

Output for 21 August 2026, 10:30 UTC

YYYY, YY

2026, 26

MMMM, MMM, MM, M

August, Aug, 08, 8

DD, D

21, 21 (day of the month)

dddd, ddd, dd, d

Friday, Fri, Fr, 5 (day of the week, 0 = Sunday)

HH, H, hh, h

10, 10, 10, 10 (24-hour and 12-hour)

mm, m, ss, s, SSS

30, 30, 00, 0, 000

A, a

AM, am

ZZ, Z

+0000, +00:00

A pattern with letters that aren't tokens resolves to nothing. For example, the Java-style dd/MM/yyyy doesn't work: use DD/MM/YYYY.

Text functions

Function

Description

Example

Result

length

Number of characters.

{{summary.length}}

21

isEmpty

True if empty or only spaces.

{{summary.isEmpty}}

false

contains(text)

True if it contains the text.

{{summary.contains("Safari")}}

true

startsWith(text)

True if it starts with the text.

{{summary.startsWith("Login")}}

true

endsWith(text)

True if it ends with the text.

{{summary.endsWith("Chrome")}}

false

toUpperCase

Convert to uppercase.

{{summary.toUpperCase}}

LOGIN FAILS ON SAFARI

toLowerCase

Convert to lowercase.

{{summary.toLowerCase}}

login fails on safari

trim

Remove spaces at the start and end.

{{summary.trim}}

Login fails on Safari

urlEncode

Encode for use in a URL.

{{summary.urlEncode}}

Login%20fails%20on%20Safari

concat(text)

Add text to the end.

{{summary.concat(" [synced]")}}

Login fails on Safari [synced]

substring(start, end)

Characters from position start (counting from 0) up to, not including, end. Without end, to the end of the text.

{{summary.substring(0, 5)}}

Login

left(n)

First n characters.

{{summary.left(5)}}

Login

right(n)

Last n characters.

{{summary.right(6)}}

Safari

replaceAll(find, replace)

Replace every match. The text to find is literal, not a regular expression.

{{summary.replaceAll("Safari", "Chrome")}}

Login fails on Chrome

abbreviate(n)

Shorten to n characters and add … when something was cut.

{{summary.abbreviate(10)}}

Login fail…

split(separator)

Split into a list (default separator: a space). Add list functions after it.

{{summary.split(" ").first}}

Login

List functions

The sum, average, max and min examples assume a text custom field customfield_10060 holding 1,2,3.

Function

Description

Example

Result

first

First item.

{{labels.first}}

backend

last

Last item.

{{labels.last}}

urgent

get(n)

Item at a position, counting from 0.

{{labels.get(1)}}

urgent

size

Number of items.

{{labels.size}}

2

distinct

Remove duplicates.

{{summary.split(" ").distinct}}

Each word once

join(separator)

Join into text. Default separator: comma and space.

{{labels.join(" | ")}}

backend | urgent

sum

Sum of the numbers in the list. Items that aren't numbers are ignored.

{{customfield_10060.split(",").sum}}

6

average

Average of the numbers in the list. 0 when there are no numbers.

{{customfield_10060.split(",").average}}

2

max

Largest item. Compares as numbers when all items are numbers, otherwise as text, which also works for dates.

{{customfield_10060.split(",").max}}

3

min

Smallest item, compared the same way as max.

{{customfield_10060.split(",").min}}

1

Number functions

Function

Description

Example

Result

prettyDuration

Seconds as a Jira duration (8-hour days, 5-day weeks). 0m for zero or less.

{{timetracking.originalEstimateSeconds.prettyDuration}} with 388800 seconds

2w, 3d, 4h

abs

Absolute value.

{{now.diff(duedate).days.abs}}

Days between now and the due date, without sign

round

Round to a whole number.

{{customfield_10016.round}} with 2.6

3

Common examples

Goal

Receiving field

Template

Prefix the summary with the source key

Summary

[{{key}}] {{summary}}

Set a due date one week from now

Due date

{{now.plusDays(7).jiraDate}}

Copy the assignee as a user

Assignee

{{assignee.accountId}}

Keep the reporter's name in a text field

Short text custom field

Reported by {{reporter.displayName}} on {{created.longDate}}

Add a note to the description

Description

{{description}}, a new line, then Synced from {{key}}. The description is written as plain text.

Copy component names as one label

Labels

{{components.name.join("_")}}

Shorten a long summary

Summary

{{summary.abbreviate(100)}}

Write the priority as text

Short text custom field

{{priority.name}}

Header for synced comments

Comment template

{{comment.author.displayName}} wrote on {{comment.created.jiraDate}}: {{comment.body}}

Write and test a template

  1. On the Field mapping tab, click the transform chip of a row and pick Smart value, or open the transform of the Comments card.

  2. In Smart value template, type {{. A list of suggestions opens: fields, built-in paths, properties and functions that fit the value at the cursor. Use the arrow keys to move, Enter or Tab to insert, and Esc to close.

  3. Click Test template.

  4. Enter a work item key in Source work item key or Target work item key. For a Both directions mapping, first choose the side in Preview on, then enter the key in Work item key.

  5. Click Run preview. The output is shown under Result, or (Empty result) when the template renders nothing.

image-20261013-095828.png


The preview reads the real work item: on This Jira site directly, on the other site through the rule's connector. Nothing is written. For a comment template, the preview uses the latest comment on the work item; if there's none, you see "This work item has no comments, so comment smart values are empty. Try a work item that has at least one comment." The Smart value help link above the template opens this documentation.