Variables
Variables push the automation process of Jira Issue creation with Smart Issue Templates even further.
Variables are the 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 create variables when creating a Hierarchy or in the Manage Hierarchies page 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.
Variable types inside the Hierarchy
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 Assignee 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 - NOT allowed.)
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.
In case, you don’t want to enter the default value for the variable of the TEXT type you can tap the space in the current field on the ‘Add variables’ dialog. After the apply no value will be shown.
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 that is why there is a space in the place where the variable was, however, it is not 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.
The default value is required on the ‘Add variables’ dialog shown right after clicking the ‘Apply’ button below the hierarchy name on the ‘Manage Hierarchies’ page.
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.
For any questions or feature requests contact us via the Customer Portal
Or drop us an email at support@appsdelivered.atlassian.net. If you are using this option, please check your junk folder regularly, as our reply can be placed there by your email service.
Before submitting a bug report or support ticket, please update to the latest version of the add-on.
Please add information about the version of Jira and the add-on.