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 Dec 9, 2024

How to use smart defaults

The smart defaults feature is a very powerful tool provided by Issue Templates Cloud. In this chapter you can find examples showing how to use smart defaults in your project.

Try live demo:

Note

Smart defaults overwrite Template scope.

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
Tip

See Smart expressions for the full list of commands.

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
  • Select List
  • User Picker
  • Version Picker

Use cases

See how to use this feature on real life examples: