- 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
Dynamic variables from Jira fields
You can define a dynamic variable using a Jira field key. A variable defined this way has the same name and options as the field on the issue crate screen of the target project.
You can optionally name a variable, otherwise it’s going to have the same name as the name of the Jira field.
You can find all the keys here - https://{yourjira}.atlassian.net/rest/api/2/field
.
Examples
Components=[:components]
Fix versions=[:fixVersions]
Priority=[:priority]
Checkboxes=[:customfield_11602]
Labels=[:labels]
Assignee=[:assignee]
Due date=[:duedate]
Date Picker=[:customfield_11692]
Date Time Picker=[:customfield_11620]
Description:[:description]
Text Field (multi-line)=[My custom name:customfield_11606]
You can create Jira fields with a [:customfield_Id]
placeholder. Such a placeholder is converted into a variable of the same type as the field. The field needs to be visible.
This variable isn’t generated on the Create from template screen if a field:
- has limited context.
- isn’t added to the Create screen.
- is hidden in a project.
Supported types
Most common fields are supported, including system and custom fields.
If a field type is a supported dynamic variable type, it’s displayed using a dedicated component, for example, the Due date field (:duedate)
has the same type as the :date
variable, so it’s displayed as a Date Picker.
Otherwise, it’ll be displayed as a simple text field.
Exceptions:
The labels field is displayed as a text field. You can pass values separated by comas to create new labels.
How to pass values selected in variables to Jira fields
Use Smart defaults. Use a variable accessor with the name of a variable, or the name of the field if it’s not given.
Variable defined as | Use |
---|---|
[Release versions:fixVersions] | variable("Release versions") |
[:duedate] | variable("Due date") |