Skip to main content
Skip table of contents

Variables

Variables are user-defined names within a formula, which can represent:

  • Jira issue fields

  • Calculated attributes like Progress

  • Structure-specific attributes like Item type

  • Attributes provided by other Jira apps

  • Another formula

  • Values from another Structure column

  • Flex fields

Most formulas will contain at least one variable (otherwise, the result will be the same for each row in the structure). 

Learn More

Mapping Variables

Most formulas will contain at least one variable (otherwise, the result will be the same for each row in the structure). These variables need to be mapped to a specific value source, such as an issue field, progress, another column, or even another formula.

As you write your formula, Structure attempts to map your variables to well-known fields. If Structure is unable to map a variable, it will be marked with a red warning icon, and you will need to map the variable manually.

List of variables used in a formula

List of variables used in a formula

To map a variable – or to edit an existing mapping – click the variable's name in the variable list or in the formula and select the appropriate attribute from the drop-down list.

Mapping a variable within the formula editor

Mapping a variable within the formula editor

Until all variables have been successfully mapped, Structure will use "undefined" as the value of unmapped variables when calculating the formula.

Naming Variables

Structure recognizes most standard and custom fields. The trick is to make sure you're entering their names correctly:

  • For one-word names, enter just the field name: summary or priority

  • For multiple-word names: remove all non-letters and replace any spaces with underscores: story_points

  • Variable names are case insensitive, so story_points and Story_Points will both map to the same field.

For a comprehensive list of recognized variable names, see Predefined Variables

Even if Structure successfully maps your variables, it's still a good idea to review them!

Predefined Variables

As you write your formula, Structure attempts to map your variables to well-known Jira fields:

  • Variables with the same name as a field are mapped to those fields. For multi-word fields, you can write the words without spaces, or place a _ between each word: affectsVersions or affects_Versions

  • Many commonly used variations of field names are mapped to the corresponding field.

  • In addition to Jira fields, some variable names are automatically mapped to common Structure attributes. See Structure Attributes.

When naming variables:

  • Do not include spaces. Omit spaces or use an underscore.

  • Case is ignored (AffectsVersions is the same as affectsversions)

Jira Fields

The following list contains the most commonly used variables that are automatically linked to a Jira field. This is not a complete list.

Jira Field

Standard Variable Name

Type

Notes

Affects Version/s

affectsVersions

Array<Version>

Assignee

assignee

User

Components

components

Array<Component>

Created

created

Number (Date/Time)

Creator

creator

User

Description

description

Text

Due Date

dueDate

Number (Date)

Environment

environment

Text

Epic

epic

Text

Works for company-managed and team-managed projects

Epic Link

epicLink

Text

Only works in company-managed projects

Fix Version/s

fixVersions

Array<Version>

Can also use: versions

Key

key

Text

Can also use: issueKey

Issue ID

issueid

Number

Issue Type

issueType

Issue Type

Labels

labels

Array<String>

Last Comment

lastComment

Last Comment

Original Estimate

originalEstimate

Number (Duration)

Priority

priority

Text

Project

project

Project

Remaining Estimate

remainingEstimate

Number (Duration)

Reporter

reporter

User

Resolution

resolution

Text

Resolved

resolved

Number (Date/Time)

Can also use: resolutionDate

Sprint

sprint

Sprint

Status

status

Status

Status Category

statusCategory

Text

Summary

summary

Text

Time Spent

timeSpent

Number (Duration)

Updated

updated

Number (Date/Time)

Work Logs (Jira)

jiraWorkLogs

Array<Work Logs (Jira)>

Work Logs (Tempo)

tempoWorkLogs

Array<Work Logs (Tempo)>

Structure Attributes

The following variables are automatically mapped to Structure attributes.

Variable Name

Type

Results

itemid

Text

Returns the item type plus the item ID. Ex. "issue/10800"

itemType

Text

Returns the item type: issue, project, user, folder, etc.

level

Number (Integer)

Returns the level of the item within the structure's hierarchy. Can also use: depth

done

Number (Boolean)

Returns a '1' if the issue is Done; otherwise, '0'

Item Properties

You can access item properties within formulas, using the following notation: item.property. The available properties depend on the item type.

See below for a complete list of item types and their supported properties.

IssueType

Accessible via: issueType

Property Name

Type

Comments

name

Text

id

number

sequence

Number

Used to sort issue types.

isSubtask

Number (Boolean)

True if the type is a sub-task type.

User

Accessible via: assignee, reporter, creator, author

Property Name

Type

Comments

name

Text

User's login name

account

Text

timezone

Text

isActive

Number (Boolean)

True if the user is active

Component

Accessible via: components

Property Name

Type

Comments

name

Text

id

Number

description

Text

lead

User

Field History

Accessible via: {field}History, where {field} is the name of the custom field. Ex. statusHistory

Property Name

Type

Comments

from

Variable

Previous value, which corresponds to the field’s type. May be a text value if the value of the field type is impossible to retrieve.

fromText

Text

Text representation of the previous value. This can sometimes be faster than using “from”.

to

Variable

Changed value, which corresponds to field’s type. May be a text value if the value of the field type is impossible to retrieve.

toText

Text

Text representation of the changed value.This can sometimes be faster than using “to”.

time

Number (Date/Time)

Accessible via: issueLinks

Property Name

Type

Comments

source

Issue

destination

Issue

type

IssueLinkType

Issue Link Destination

Accessible via: issueLinks.destination

Property Name

Type

Comments

key

text

url

text

summary

Text

status

Status

status.category

Status

priority

Text

issuetype

Text

Issue Link Source

Accessible via: issueLinks.source

Property Name

Type

Comments

key

text

url

text

summary

Text

status

Status

status.category

Status

priority

Text

issuetype

Text

Issue Link Type

Accessible via: issueLinks.type

Property Name

Type

Comments

name

Text

inward

Text

outward

Text

Last Comment

Accessible via: lastComment

Property Name

Type

Comments

author

User

updateAuthor

User

created

Number (Date/Time)

updated

Number (Date/Time)

body

Text

Project

Accessible via: project

Property Name

Type

Comments

name

Text

id

Number

key

Text

url

Text

Sprint

Accessible via: sprint

Property Name

Type

Comments

name

Text

id

Number

startDate

Number (Date/Time)

endDate

Number (Date/Time)

completeDate

Number (Date/Time)

state

Text

boardId

Number

goal

text

Status

Accessible via: status

Property Name

Type

Comments

name

Text

id

Number

description

Text

category

Text

Version

Accessible via: affectsVersion, fixVersion

Property Name

Type

Comments

name

Text

id

Number

description

Text

project

Text

Project name

isArchived

Number (Boolean)

isReleased

Number (Boolean)

startDate

Number (Date)

releaseDate

Number (Date)

Work Logs (Jira)

Accessible via: jiraWorkLogs

Property Name

Type

Comments

author

User

updateAuthor

User

created

Number (Date/Time)

updated

Number (Date/Time)

comment

Text

startDate

Number (Date/Time)

started

Number (Date/Time)

Alias for startDate

timeSpent

Number (Duration)

id

Number

Work Logs (Tempo)

Accessible via: tempoWorkLogs

Property Name

Type

Comments

author

User

created

Number (Date/Time)

updated

Number (Date/Time)

comment

Text

startDate

Number (Date/Time)

started

Number (Date/Time)

Alias for startDate

timeSpent

Number (Duration)

billable

Number (Duration)

id

Number

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.