App page
Issue Templates for Jira
Cloud Server/Data Center
Issue Templates for Jira

Cloud

Server/Data Center

Documentation
FAQ
Release notes
Migration to Cloud
Last updated May 26, 2025

Smart defaults - Advanced method

Smart Defaults offer an advanced method of configuring this functionality.

  1. To switch to this method simply click the Advanced method tab in the configuration process of your template.
  2. Select fields you want to configure.
  3. Selected fields are added below with an input window that you can configure. See the list of Smart expressions below.
Example

Values used in Labels and Fix versions in this example refer to previously configured Static variables, so you can combine these two features together.

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
Info

To set a parent with smart defaults you need to leave the field empty on the create screen.

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

How to access issue fields?

You can use the following methods to access issue fields:

issue - will access a field for which it is configured

issue.fix_versions - provide short form of field name with _ instead of space in case you want to configure it for other field e.g. Affects Versions

issue.field("Fix versions") - use field expression with an exact name if your field contains special characters

issue.customfield_10330 - use custom field key in case you have more than 1 field with the same name

Example

If the Fix Versions field is set to 1.0.2 and 1.0.3 versions:

issue.field("Fix versions")

// returns
1.0.2, 1.0.3

Set relative dates

With a now + 5d expression you can set a relative date in date type fields. +5d or -5d is a shortcut for .plusBusinessDays(5) or .minusBusinessDays(5).

As a source of the date you can use now, issue properties like issue.created, other date fields or inherited fields, for example, parent.due_date.

Supported syntax:

  • [date] [+-] [dw] d - business days, w - business weeks
  • [date].plus[unit]
  • [date].miunus[unit]

Supported units:

  • Days
  • BusinessDays
  • Weeks
  • Months
  • Quarters
  • Years
  • Millis
  • Seconds
  • Minutes
  • Hours

Supported actions:

  • Set a date relative to current time, for example: now + 5d now.plusDays(3)
  • Set a date relative to other issue field or property, for example: issue.created + 5d issue.due_date.minusDays(2)
  • Set relative dates based on parent date field, for example: parent.due_date + 5d
  • Set a date relative to :date variable, for example: variable("Launch date") + 5d

Multiselect

Smart defaults support multiselect. You can define more than one value for multiselect fields. Simply separate values with a comma (,).

Example

Components = Backlog, Roadmap

The following fields are supported:

  • Checkboxes
  • Components
  • Fix versions, Affects versions
  • Group Picker
  • Labels
  • Labels (custom field)
  • Select List
  • User Picker
  • Version Picker

Other

Inherit Values

By using the parent expression, you can easily configure nested (child) templates to inherit values provided in the parent. This can be useful when you need to set the same component, version or labels in all epic’s issues and want to use the same template in different scenarios. Just enter a field value in the Create issue dialog. All children created from the primary template inherit the given value.

Pass the values to linked issues

To use the parent accessor issues need to be in a parent-child relation, for example children of an epic or subtasks. Linked issues don’t have such a relation. If you want to pass down values from your primary issue (issue from which the templating process starts), you can use the primaryIssue accessor.

Example

primaryIssue - will access a field for which it is configured

primaryIssue.fix_versions - provides a short form of a field name with _ instead of space in case you want to configure it for other field, for example, Affects Versions

primaryIssue.field("Fix versions") - use a field expression with an exact name if your field contains special characters

primaryIssue.customfield_10330 - use a custom field key in case you have more than 1 field with the same name

Fill in the field using dynamic variable

With the expression variable("variable name") you can use values provided with Dynamic variables in custom/system fields. You can refer variables in all children and linked issues.

This can be useful when you want to set the same value across the whole structure, and at the same time you want to use variables for the same value in different fields, for example as a part of a summary or description. This approach is much more flexible than using a simple parent expression.

Supported actions:

  • assigning a user provided with :user type dynamic variable, all user type fields are supported, for example, assignee, reporter, user pickers
  • passing a :date or :datetime variable to a date or a datetime field type, for example, Due date, Start date, Date Picker, Date Time Picker, etc.
  • setting priority, components, versions, custom selects (single & multi) from select variables

Compute the field value when using templates

Value of any field can be computed using vast Smart expressions. Expressions that can be used depend on the type of field against which you are calculating the value, for example, a user field, like reporter, can be set to project lead by the project.lead expression.

Example

You can set a reporter to the project lead using - project.lead