Issue Templates for Jira

Jira Cloud
HOSTING
Last updated Mar 20, 2018

Variables

This page provides information about static and dynamic variables.

Variables allow to create templates that contain dynamic or static information which is evaluated into current values when you use the template for creating an issue. There are two types of Variables that can be used in issue templates: Static and Dynamic.

Info

Both Static and Dynamic Variables can be used only in the String fields (summary, description, textual custom fields and other).

Static Variables

Static Variables allow to create templates that contain static information, which is evaluated into actual values when you use the template for creating an issue. Unlike dynamic variables, users can’t modify static variables while creating or applying a template because the values for static variables are supplied by the system.

Example

When you choose template that contains autocomplete values, static variables will refer to the appropriate values.

Markup for Static Variable begins with the $ sign (you can change this in app’s configuration using Change prefix button).

To use static variables you have to place the markup for them in the template text field or template sub-task where you want the resolved value to appear.

Adding a new Static Variable

In addition to the standard Static Variables, the Jira administrator can add a new Static Variable with a constant value.

Steps

To add a new Static Variable:

  1. Go to the Project settings in the Templates repository project and select Issue Templates on the bottom of the list.
  2. Click Variables tab.
  3. Select Static type of variable from the drop down list.
  4. Click Add. New modal screen appears.

    Issue Templates for Jira Cloud: Adding a new Static Variable
    Adding a new Static Variable

    Configure the following:

    • Type a name of variable. Do not use the $ sign here, it will be added automatically after creating the Variable.
    • Add a description for your variable, which is a value which will replace the custom variable.
  5. Click Add.

    Issue Templates for Jira Cloud: Adding a new Static Variable
    Adding a new Static Variable

Result

New Static Variable is added to the Custom variables list.

Issue Templates for Jira Cloud: New Static Variable is added
New Static Variable is added

Predefined Static Variables

In Issue Templates Cloud there is a set of Predefined Static Variables.

Issue Templates for Jira Cloud: Predefined Static Variables
Predefined Static Variables

Dynamic Variables

Dynamic variables are placeholders in a template which is filled with any value that is typed into the placeholder defined field when a user creates a new issue.

Warning

This feature works only when using Create from template button.

Warning

Dynamic variables cannot be used on sub-tasks.

Configuring Dynamic Variables

All configuration is located under the project settings.

Steps

To configure Dynamic Variables:

  1. Go to the Project settings in the templates repository project and select Issue Templates.
  2. Click Variables tab.
  3. Select Dynamic type of variable from the drop down list.
  4. Settings of variables displays:
    a. Start pattern: Type pattern which opens variable.
    b. End pattern: Type pattern which closes variable.
    c. Mandatory mark: Type mark which user should add after end pattern to make variable required.
    d. Replace empty option: Select to replace empty values of variables.
    Issue Templates for Jira Cloud: Configuring Dynamic Variables
    Configuring Dynamic Variables

    Note

    You can change patterns and mark, but you can also keep default ones.

    Tip

    To update any setting, click on the grey background, change the value, and click a tick icon to save change.

    Tip

    Variables can be formatted. For example: by surrounding the variable with the color tags {color:red} [date] {color}. For more information on text formatting, see official Atlassian documentation.

Types of Dynamic Variables

  • Text field

To create a text field with the specific name, set up a variable name in brackets. For example: [version]. To make a variable required, add an asterix ( * ) at the end of the variable definition. For example: [version]*.

Note

An asterix is a mandatory mark by default. It can be changed in the variables configuration.

  • Single select

To create a single selection with variables, set up a specific pattern after the variable name using the (|) as a separator. For example: [City|Warsaw|London|Berlin].

To make a variable required, add an asterix (*) at the end of the variable definition.

For example: [City|Warsaw|London|Berlin]*.

  • Multi select

To create a multi selection with variables, set up a specific pattern after the variable name using the (|) as a separator and start (*) after a variable name. For example: [City * |Warsaw|London|Berlin].

To make a variable required, add an asterix (*) at the end of the variable definition.

For example: [City * |Warsaw|London|Berlin]*.

Creating issue from template using Dynamic Variables

Steps

To create issue from template using Dynamic Variables:

  1. Click + icon on the global sidebar to create new issue.
  2. On the Create issue dialog box configure the following:

    • Project: Select your Templates Repository Project.
    • Issue Type: Select the relevant issue type.
    • Summary: Write a summary using Dynamic Variables.
    • Description: Write a description using Dynamic Variables.
  3. Click Create.

    Issue Templates for Jira Cloud: Creating issue from template using Dynamic Variables
    Creating issue from template using Dynamic Variables

  4. Click Create from template on the global sidebar. On the Create from template dialog box configure the following:

    • Project: Select the relevant project.
    • Issue Type: Select the relevant issue type.
    • Template: Select the relevant template (with Dynamic variables).

  5. Click Next.

    Issue Templates for Jira Cloud: Creating issue from template using Dynamic Variables
    Creating issue from template using Dynamic Variables

  6. Fill the form with values for variables and click Next.

    Issue Templates for Jira Cloud: Creating issue from template using Dynamic Variables
    Creating issue from template using Dynamic Variables
    Your Crate issue dialog box should complete automatically.

  7. Click Create.

    Issue Templates for Jira Cloud: Creating issue from template using Dynamic Variables
    Creating issue from template using Dynamic Variables

Result

Issue with Dynamic Variables is created.

Issue Templates for Jira Cloud: Issue with Dynamic Variables
Issue with Dynamic Variables

Info

Dynamic Variables are searched only in issues (templates), not in sub-tasks and they are replaced just in issues, not in sub-tasks.


Need help?

If you can’t find the answer you need in our documentation, raise a support request*.

*Include as much information as possible to help our support team resolve your issue faster.