- Get started
- About
- Quick guide
- Use cases
- Glossary
- Migration
- Configuration
- Global configuration
- Project configuration
- Repository
- Template configuration
- Template scope
- Manage templates
- Supported fields
- Permissions
- Using templates
- Create issue from template
- Create issue structures
- Apply template to existing issue
- Recreate issue
- Use template custom field on issue create screen
- Default templates
- Direct link
- JQL searchers
- Variables
- Static variables
- Dynamic variables
- App Integrations
- Team-managed projects
- Jira Software
- Jira Service Management
- Advanced Roadmaps
- Issue Checklist for Jira
- Advanced
- Automation
- Legacy automation action
- REST API
- Create issue and apply template with Jira REST API
- Security
- Security statement
- App permissions
Smart defaults - introduction
This chapter provides basic information about Smart defaults and Smart expressions used in templates.
The Issue Templates for Jira app provides additional Smart defaults tab available in templates (on the right side of the Issue View, in Issue Glance). The Smart defaults tab provides a Select, where you can find all fields supported in your project.
You can edit template fields and fill them with Smart expressions.
With smart defaults you can calculate the field’s value at the time when an issue is created from the template.
You can, for instance, configure a template that would automate the process of:
- filling the starting date.
- setting a deadline.
- setting a reporter and assigning an issue to a specific role or person.
- creating a label.
- setting a version.
You can also prepare a timeline for complex tasks with multiple steps or link an epic with smart defaults.
Try live demo:
See How to use smart defaults for details and examples.
Advanced
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.
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.
You can set a reporter to the project lead using - project.lead