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:
Smart defaults overwrite Template scope.
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
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
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:
Supported actions:
now + 5d now.plusDays(3)
issue.created + 5d issue.due_date.minusDays(2)
parent.due_date + 5d
variable("Launch date") + 5d
See Smart expressions for the full list of commands.
Smart defaults support multiselect. You can define more than one value for multiselect fields.
Simply separate values with a comma (,
).
Components = Backlog, Roadmap
The following fields are supported:
See how to use this feature on real life examples: