Variables
Use variables to manage dynamic values in your templates 🚀
Contents 👇🏼
Purpose
Variables in Smart Templates allow you to dynamically insert data into Jira issues created from a template, making process of applying templates more flexible and adaptable. By using variables, you can add changeable information when applying a template, reducing manual input and improving consistency across your projects.
Variable types
Type of variable | Description | Where to use (fields or field types) |
---|---|---|
Text
| Allows to add dynamic text to the issues. | Default text fields:
Custom fields of the following types:
|
Select list (single choice) new | Allows to select a single option from the list of predefined options. | Same as for Text type of variable. |
Select list (multiple choice) new | Allows to select one or multiple options from the list of predefined options. | Same as for Text type of variable. |
User picker (single user) new | Allows to add a user mention to the Text fields AND add a user to the Assignee or to a custom User picker field. | Same as for Text type of variable. AND user picker fields such as:
|
Create variables
Navigate to your project sidebar → Smart Templates → 3-dots menu for a template you want to add variables to → select the Edit option.
Go to the Variables tab → hit the Add variable button.
3.1 Specify Variable name for Text and User picker variable types.
3.2 Enter Variable name and add Options for the Select list (single choice), Select list (multiple choice) types.
4 . Create more variables and combine different types within one tempalte.
Save changes and navigate to the Issues tab to add variables to your template fields.
Add variables to the template
Go to the Issues tab of the template.
Put variable name(s) inside double curly braces into the supported fields and save the template.
For User picker fields such as Assignee you need to click on Use variable under the corresponding field to allow entering the variable name.
☝🏼NOTE: Keep in mind, the variable name is case-sensitive, so {{MyVariable}} and {{myvariable}} are different variables.
Create issues from the template with variables
Click the Create issues(s) button for the template with variables.
Enter value for Text variable OR select item(s) from predefined lists of values for Select list or User picker - click Confirm button → enjoy power of Variables! 😎
All done! 🥳 The only one thing left is to check issues created from the template to ensure all good!
☝🏼NOTE: When you select values of Select list (multiple choice) variable they are entered in the same order pick them from the list.