- 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
This chapter provides information about dynamic variables.
Dynamic variables are placeholders which you can define in your primary template in text fields (for example summary, description). Before an issue is created from a template, dynamic variables are collected from the primary template and an additional form is displayed. It’s the place where you provide values.
While placeholders are collected only in the primary template, they are replaced with provided values both in primary and secondary templates.
For example, you can configure a template like this: Which results in:
One definition, many usages
It’s sufficient to define a variable only once in any field. It can then be referenced only by a name. The order doesn’t matter.
Description:
Equipment for a new employee [equipment*| laptop| monitor| headset]*
Summary:
An order of equipment for a new employee: [equipment]
Dynamic variables format
To configure the format of your dynamic placeholders:
- Go to Apps > Manage your Apps > Issue Templates for Jira > Configuration > Variables and select Issue Templates.
- Click the Variables tab.
- Select the Dynamic type of variable from the drop-down list.
- Settings of variables displays:
a. Start pattern: Type pattern which opens a variable.
b. End pattern: Type pattern which closes a variable.
c. Mandatory mark: Type mark which a user should add after the end pattern to make the variable required.
d. Replace empty option: When switched on, if a variable is optional, and the value is not provided, replace the variable placeholder with an empty string (for example: text: “City {{ cityVariable }} is optional” becomes “City is optional“)
Dynamic variables in Automation
Dynamic variables are supported while creating issues via issue.templates.automation property.