Apps documentation
Issue Templates for Jira
Cloud Server/Data Center
Issue Templates for Jira

Cloud

Server/Data Center

Documentation
FAQ
Release notes
Articles & Videos
Last updated Aug 11, 2024

Smart expressions

This chapter provides a complete list of smart expressions for Issue Templates for Jira.

Smart expressions are formulas used to trigger certain actions within an issue.

Smart issues

Smart defaults can refer to an active issue and its fields. Here’s the list of available smart expressions:

Smart expression Description
issue.epic Returns the epic name
issue.epic.key Returns the epic key
issue.epic.status and issue.epic.status.name Displays the epic status
issue.issueType.name Displays the issue type name
issue.parent Returns subtask’s parent issue key
issue.reporter.displayName Returns the name and surname of the reporter of current issue
issue.customfield_id Displays the id of a custom field
issue.field Displays the id of a field

Fix version, labels, subtasks

Smart expression Description
issue.fixVersions Used to access the values in an issue’s Fix Versions field (*)
labels Returns Labels property
subtasks.key Returns subtasks key
subtasks.priority Returns subtasks priority

(*) other ways to access the Fix Versions field:

  • issue.fixVersions.name
  • fixVersions.name.max()
  • fixVersions.name.max
  • fixVersions.max
  • fixVersions.min
  • fixVersions.average
  • fixVersions[0].name

Smart users

Smart defaults can help you with defining users: initiator, reporter, assignee, creator. You can use the following properties as smart expressions:

Smart expression Description
[user].displayName Returns user’s name and surname
[user].emailAddress Returns user’s email
[user].timeZone Returns user’s timeZone
[user].accountId Returns user’s account ID
Tip

The [user] placeholder can be replaced with a user, for example project.lead.displayName, which will show the project leader’s name.

Smart dates

With smart defaults you can receive information about date and time. You can use the following smart expressions:

Smart expression Description
now + 5d or now.plusBusinessDays(5) Adds a given number of days omitting weekends. Math operations are calculated in UTC.
now - 5d or now.minusBusinessDays(5) Subtracts a given number of days omitting weekends.
toBusinessDay Takes the given date, and returns the next business date
now Displays current date and time
now.format("yyyy-MM-dd") Returns current date and time with given format

Smart project

Smart expressions allows you to gain information about project, especially:

Smart expression Description
project.lead Returns the project lead
project.lead.displayname Displays the project lead
project.lead.accountId Returns the lead’s account ID
project.id Displays the project ID
project.key Returns the key of the current project
project.name Returns the project name
project.projectTypeKey Returns the project key
project.avatarUrls Returns project’s avatar URL