Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Overview

Variables are placeholders for field default values that are fetched from the system when the issue is created. Variables are used to store information that is not known at the time the issue is created, such as the current user's name or the current date and time.

Variables can be used in to configure default values configuration. See more here.

Currently, variables are supported for the following fields:

  • Summary

  • Text field (single-line)

  • Description

  • Environment

  • Paragraph (multi-line text).

  • Single-user picker.

  • Multi-user picker.

System variables

Jira system variables are designed to encapsulate dynamic information throughout the instance. They are available across all templates and are generated automatically at the moment of issue creation.

Use case

Let’s take a look at a template with variables used by an HR team to automate team members data entry and improve workflow efficiency.

The template contains a description field with three system variables: $TODAY, $CURRENT_USER_NAME and $PROJECT_LEAD_NAME.

When the template is used, and a ‘Create issue’ dialogue is prompted, the correct values automatically replace the variable's placeholders.

Configuration

System variables are configured through the ‘Default values’ tab in the template configuration.

To insert a variable into an issue field, enter '/' into one of the supported fields. Start typing to find the required variables faster.

List of supported system variables

Variable

Description

Value Example

Context

$CURRENT_USER_ACCOUNT_ID

Account ID of the currently logged-in user

562658:342fc226-3c34

 

$CURRENT_USER_NAME

Name of the currently logged in user

Tom West

 

$PROJECT_KEY

Key of the project

DEV

 

$PROJECT_NAME

Name of the project

Development

 

$PROJECT_LEAD_NAME

Name of the project lead

Tom West

 

$PROJECT_LEAD_ACCOUNT_ID

Account ID of the lead of the project

562658:342fc226-3c34

 

$TODAY

Current date

16.09.22

 

$CURRENT_TIME

Current Time

01:16

 

$TOMORROW

Tomorrow

17.09.22

 

$NEXT_WEEK

Next week (current day + 7 days)

Today:

Next week:

 

$WEEK_OF_YEAR

Current week’s number

37

 

$PARENT_KEY

Key of the parent issue

DEV-2

subtask templates only

$PARENT_SUMMARY

Summary of the parent issue

New feature request

subtask templates only

$PARENT_ISSUETYPE

Issue type of the parent issue

Task

subtask templates only

$PARENT_STATUS

Status of the parent issue

Done

subtask templates only

$PARENT_PRIORITY

Priority of the parent issue

Medium

subtask templates only

$PARENT_DUE_DATE

Due date of the parent issue

2020-01-31

subtask templates only

$PARENT_CUSTOMFIELD 

Value of any custom field of the parent issue. Pattern to use it : $PARENT_CUSTOMFIELD_ID

any value

subtask templates only

Custom variables

Custom Unlike system variables, custom variables are created by users and not generated automatically, unlike system variables. They are most useful in use cases where the same value is required to must be entered multiple times. Populating templates with custom placeholders allows users to minimise the data entry to a single occasion, i.e., when creating an issue from the template.

(warning) Custom variables are configured per template.

Use case

Custom variables can be used to elevate an already existing onboarding use case.

For example, the new employee's name is used multiple times throughout the onboarding issue template, including sub-tasks. However, the name can not be retrieved via a system variable as it is not recorded anywhere in the instance. In this case, our app allows the creation of a custom variable - $EMPLOYEE_NAME. The variable placeholder is set as a default value in a required field. The HR team would like to have it in the summary & description fields of the new issue and a related sub-task:

When the template is used, before seeing a ‘Create issue’ dialogue, the user will see a variables form a dialogue with a list of all the custom variables configured for the template. During this step, the user is required to define the variables, and as a result, variable placeholders will be automatically replaced by the user's values.

In the next step, the user will see the familiar ‘Create issue’ screen with updated placeholders:

Configuration

To configure a custom variable, select a ‘Form variables’ tab in the template configuration. This tab lists all the variables configured for a specific template.

In the ‘Name’ field, enter the variable name. This is the name that users will see when in the form dialogue.

Click on the '+' icon to save the variable. The app will automatically generate a variable placeholder.