Apps documentation
Issue Templates for Jira
Cloud Server/Data Center
Issue Templates for Jira

Cloud

Server/Data Center

Documentation
FAQ
Release notes
Articles & Videos
Last updated Sep 20, 2021

Static variables

This chapter provides information about static variables.

Static variables are placeholders that are filled with actual values supplied by the system. Each variable refers specific value of the Jira instance while the issue is being created.

In Issue Templates for Jira app, predefined Static variables will be evaluated when an issue is created from a template. You can use Static variables in all text fields, for example: Summary, Description, Environment.

Note
Before you start configuring Static variables, make sure you have a Project administrator permission.
Issue Templates for Jira Cloud: Static Variables
Static Variables

List of predefined variables

Variable Evaluated to Evaluation example
$ISSUE_KEY The key of the current issue DEV-1
$USER_ACCOUNT_ID Account ID of the user who created the issue. 562658:342fc226-3c34
$USER_NAME Display the name of the user who created the issue. Tom West
$USER_MAIL Address email of the user who created the issue. tom.west@domain.com
$CUSTOMFIELD_00000 String representation of value of given custom field in the current issue. Replace 00000 with correct custom field ID any value
$CURRENT_USER_ACCOUNT_ID Account ID of the currently logged in user. 562658:342fc226-3c34
$CURRENT_USER_NAME Display name of the currently logged in user. tom.west@domain.com
$CURRENT_USER_MAIL Email address of the currently logged in user. Result depends on https://id.atlassian.com/manage-profile/profile-and-visibility settings. tom.west@domain.com (restricted)
$PROJECT_KEY The key of the project DEV
$PROJECT_NAME The name of the project Development
$PROJECT_LEAD_NAME Display the name of the lead of the project Tom West
$PROJECT_LEAD_ACCOUNT_ID Account ID of the lead of the project 562658:342fc226-3c34
$TODAY Current date 10.09.21
$CURRENT_TIME Current Time 09:25
$TOMORROW Tomorrow 11.09.21
$NEXT_WEEK Next week 16.09.21
$PARENT_KEY The key of the parent issue. DEV-2
$PARENT_SUMMARY Summary of the parent issue New feature request
$PARENT_DESCRIPTION Description of the parent issue New feature description
$PARENT_ISSUETYPE Issue type name of the parent issue Task
$PARENT_STATUS Status name of the parent issue To do
$PARENT_PRIORITY Priority name of the parent issue Medium
$PARENT_DUE_DATE Due date of the parent issue 2020-01-31
$PARENT_CUSTOMFIELD String representation of value of given custom field in the parent issue. Replace 00000 with correct custom field ID. any value

Add your own static variable

You can add your own static variables to existing ones. New variable will be replaced by provided static string.

To add a new static variable:

  1. Navigate to the Templates repository > Project settings > Issue Templates > Variables.
  2. Select Static type of variable.
  3. In Custom variables section, click Add.
  4. Type the Name, and the Value into text fields.
    Note
    Do not use the prefix sign here. It will be added automatically right after creating the Variable.
  5. Click Add.
    Issue Templates for Jira Cloud: Static Variables
    Static Variables

Result

New variable has been added.

Issue Templates for Jira Cloud: Static Variables
Static Variables

Change the prefix

By default, Static variables are prefixed with $.

To change this setting:

  1. Navigate to the Templates repository > Project settings > Issue Templates > Variables.
  2. Select Static type of variable.
  3. In Custom variables section, click Change prefix.
  4. Change the prefix.
  5. Click Save.
    Issue Templates for Jira Cloud: Static Variables
    Static Variables

Result

The prefix has been changed.