Variables push the automation process of Jira Issue creation with Smart Issue Templates even further. Variables are placeholders that are automatically filled with pre-configured data you need issues to contain.
For easy access to the documentation click the info link next to the Manage Variables page name
To use this feature you need to either set variables when creating a Hierarchy or in the “Manage Hierarchies” section of the Smart Issue Templates. In this guide, we will cover both of the options and will start from the very beginning - creating a Hierarchy. This guide is on using variables, so in case you are struggling with creating Hierarchies, please refer to this user guide.
You can create variables of two types.
Text type - you can use it with any text fields inside the node. This type contains any text value.
User type - allows choosing user. You can use this variable with Assigne or reporter to set this user to the field. Use only those users who have access to the project for which the hierarchy is used. Otherwise, you will receive a message that this user cannot be used in the fields Assignee or Reporter. Also, you can use it with any text field, in this case, it will input the Display name of the user.
How to create Variables
On the “Create Hierarchy” screen of the SIT, you will see a dedicated to the variables setting section. This section, by default, contains a single “Add” button. Click this button to create your first variable.
By clicking on the “Add” button you will be creating variables. At first, both of the fields that a variable has will be empty. The first field is “Name” and it is pretty much self-explanatory. The Name must not contain spaces or a “$” symbol, i.e. (my variable - NOT allowed; myVariable - OK; $uperVariable - NOTallowed.) The second - is the “Default value”. It is important to understand that the default value is the value that will be used when creating an issue in case the variable is not given any other value. Also, it is not necessary to fill this field right now.
Here, we created three variables: person, day, and year. We will be using this issue to remind us that Mikhail’s birthday is on 21 of January. Since Mikhail didn’t provide his year of birth, we will leave this field empty. Now, we should add a Node to this Hierarchy. Click on the Add Node -> Ready -> Edit Fields buttons to proceed further.
How to use Variables
On this screen, we need to fill in all of the required fields and use the variables that we just created. To do that we simply need to write a dollar sign followed by the name of the variable we want to use. It is important to use the $ otherwise, the SIT will not understand what you are trying to achieve. Click on the “Apply button” in the lower right corner of the window to finish editing the Node and save the Hierarchy. This will transfer you to the “Manage Hierarchies” page.
How to create Issues with Variables
Here you will be able to see the Hierarchy that you have just created. To create the issues your Hierarchy contains, click on the “Apply” button right under the name of your Hierarchy. The next screen you see will contain information on the variables this Hierarchy Node contains.
As you can see, we can create an issue with the data we provided to the variables when creating the Hierarchy or we can bring changes to the variables and create a reminder on the other person’s birthday.
Now, we can see that we used a single Hierarchy, however, we created absolutely different issues.
We didn’t know Mikhail’s year of birth which is why there is a space in the place where the variable was, however, this is not the case for Oleg’s birthday reminder.
Variables are an extremely powerful tool that can make the repetitive issue creation process way easier. We also have a set of system variables that will be filled in automatically.
Compatibility with Scheduler
Variables are also compatible with the Scheduler which makes it even easier to create repetitive data entries. To do that, you just need to set a scheduler in the Hierarchy that you were using. Please, refer to this guide to get a better understanding of how to achieve that.
Please note, that we highly recommend using Scheduler with default values of your variables, otherwise Scheduler may ignore the variable.