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 Apr 10, 2022

Smart defaults - introduction

This chapter provides basic information about Smart defaults and Smart expressions used in templates.

The Issue Templates for Jira app provides additional Smart defaults tab available in templates (on the right side of the Issue View, in Issue Glance). The Smart defaults tab provides a Select, where you can find all fields supported in your project.

From now on, you can edit template fields and fill them with the smart expressions. Thanks to that, you are able to easily access data within Jira.

This chapter is divided into four sections:

How to access issue fields?

There are two methods to access issue field:

  1. Type field key, e.g. fixVersions, issue.fixVersions to access issue field. By default, fields are evaluated against the current issue, therefore “issue” prefix can be omitted. If you want to access parent value add “parent” prefix.
  2. Use field("Fix Versions").
    Both field keys and field name provided to field() accessor ignore case.

Example

If the Fix Versions field is set to 1.0.2 and 1.0.3 versions:

issue.field("Fix versions")

// returns
1.0.2, 1.0.3

Returned value

If a field doesn’t exist an empty value is returned.

Example

If the customfield_10001 value doesn’t exist (is null in issue JSON):

customfield_10001

// returns

If you’d like to access the dynamic variable, use:

variable("Variable name")

// returns

variable

Syntax error

If a field can’t be found an error will be thrown.

(Different from Smart Values, which return empty value)