All the custom variables created in ARN are global in nature. It means, irrespective of the projects they are created from, all non-deleted custom variables will be visible across all the projects. However, they can be edited only from the project where they are created. (Similar to global templates).
Add custom variables
Click on the Custom variable tab >> Click on Create.
This opens up the pop-up that shows up below the fields.
Below fields are available in the Add variable popup
Name of the custom variable. cv_will be the prefix to the custom variable. The variable name does not accept any spaces.
Type of the custom variable. Available types are Single list, Number, Date picker, short text
This field will appear for Single list type field
Edit custom variable
As shown in the below image click on the pencil icon to edit the variable.
On Edit custom variable pop-up except for the Variable type other fields can be edited(only if the variable is not used).
If the variable is already used in one or more templates/release pages/widgets then the system does not allow updating the variable name.
If the variable is not created from the current project, then custom variable is not editable the following info message is displayed.
Delete custom variable
On the custom variable listing tab, Delete icon is displayed. Clicking on the Delete icon against that custom variable allows the deletion of custom variables only if it is currently not being used by any of the templates, release pages & widgets. In this case below message is displayed. Popup shows the list of templates, release pages & widgets where the custom variable is used.
System allows to create maximum 5 custom variables per project.
Using custom variables
Custom variables can be used globally despite on the projects there are created. These custom variables can be used in templates, release pages and widgets.
Use custom variables in templates
On the template builder, notice +Custom variables option. This opens up below pop-up. select the variable and click on Insert. The value for these custom variables will be added on the template preview page.
Use custom variables in release pages
In release pages, these custom variables can be added within the JQL, Title, and Subtitle. Please note, within release pages, custom variables can be used when you are using manual and webhook triggers. For automated triggers, custom variables cannot be used.
Use custom variables in widgets
In widgets, these custom variables can be added within the JQL, Title, and Subtitle. Please note, in widgets, custom variables can be used when you are using manual triggers and webhook. For automated triggers, custom variables cannot be used.
Use custom variables in Webhook
When in any rule. the webhook trigger is used, one can add the custom variable and pass the value within the webhook so system fetches relevant issues with the given value within the associated Jira custom field/s. Below is an example of a webhook URL with custom variables.
Let us assume, within Jira there is a custom field called Customer. Within Jira, certain issues are created for customers, and the Customer name feild is updated accrodingly. When the issue is completed/done, the respective customer/s should be informed about the same by sending them release notes.
In this case, below are the steps -
Create a custom variable called cv_customerName
Create a release notes template (any relevant type). Add above custom variable in the template/other relevant content like JQL sections.
Now Create a rule and add relevant trigger. For this example, let us assume that the manual trigger is used.
Now manually run the rule, while running the rule, system asks for the value to be added in cv_customerName. Select the customer name (as the custom vriabale field type is a single select field). And click on publish.
This replaces the customer variable within template with selected customer name. Also, since it it used in JQL, it fetches issues that are associated with selected customer name within Jira’s custom field.
Below image is a preview of the email template that shows the custom variable got replaced with selected customer name.
Few more use cases in brief
Component/Feature-wise release notes - pass value of component field in the JQL via custom variable. So, one template for all the components.
Date-wise reports - Features released in last one quarter. Pass value of date related fields in the JQL via custom variable.
Priority wise report - generate separate reports for high/medium/low priority issues using a single template
Estimate wise reports - generate report for issues having story point estimate higher than certain limit