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
Most formulas will contain at least one variable (otherwise, the result will be the same for each row in the structure).
Learn More
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.
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.
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!
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
oraffects_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 |
| Array<Version> | |
Assignee |
| ||
Components |
| Array<Component> | |
Created |
| Number (Date/Time) | |
Creator |
| ||
Description |
| Text | |
Due Date |
| Number (Date) | |
Environment |
| Text | |
Epic |
| Text | Works for company-managed and team-managed projects |
Epic Link |
| Text | Only works in company-managed projects |
Fix Version/s |
| Array<Version> | Can also use: versions |
Key |
| Text | Can also use: issueKey |
Issue ID |
| Number | |
Issue Type |
| ||
Labels |
| Array<String> | |
Last Comment |
| ||
Original Estimate |
| Number (Duration) | |
Priority |
| Text | |
Project |
| ||
Remaining Estimate |
| Number (Duration) | |
Reporter |
| ||
Resolution |
| Text | |
Resolved |
| Number (Date/Time) | Can also use: resolutionDate |
Sprint |
| ||
Status |
| ||
Status Category |
| Text | |
Summary |
| Text | |
Time Spent |
| Number (Duration) | |
Updated |
| Number (Date/Time) | |
Work Logs (Jira) |
| Array<Work Logs (Jira)> | |
Work Logs (Tempo) |
| Array<Work Logs (Tempo)> |
Structure Attributes
The following variables are automatically mapped to Structure attributes.
Variable Name | Type | Results |
---|---|---|
| Text | Returns the item type plus the item ID. Ex. "issue/10800" |
| Text | Returns the item type: issue, project, user, folder, etc. |
| Number (Integer) | Returns the level of the item within the structure's hierarchy. Can also use: depth |
| Number (Boolean) | Returns a '1' if the issue is Done; otherwise, '0' |
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 |
---|---|---|
| Text | |
| number | |
| Number | Used to sort issue types. |
| Number (Boolean) | True if the type is a sub-task type. |
User
Accessible via: assignee, reporter, creator, author
Property Name | Type | Comments |
---|---|---|
| Text | User's login name |
account | Text | |
| Text | |
| Number (Boolean) | True if the user is active |
Component
Accessible via: components
Property Name | Type | Comments |
---|---|---|
| Text | |
| Number | |
| Text | |
| User |
Field History
Accessible via: {field}History, where {field} is the name of the custom field. Ex. statusHistory
Property Name | Type | Comments |
---|---|---|
| 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. |
| Text | Text representation of the previous value. This can sometimes be faster than using “from”. |
| 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. |
| Text | Text representation of the changed value.This can sometimes be faster than using “to”. |
| Number (Date/Time) |
Issue Link
Accessible via: issueLinks
Property Name | Type | Comments |
---|---|---|
| Issue | |
| Issue | |
| IssueLinkType |
Issue Link Destination
Accessible via: issueLinks.destination
Property Name | Type | Comments |
---|---|---|
| text | |
| text | |
| Text | |
| Status | |
| Status | |
| Text | |
| Text |
Issue Link Source
Accessible via: issueLinks.source
Property Name | Type | Comments |
---|---|---|
| text | |
| text | |
| Text | |
| Status | |
| Status | |
| Text | |
| Text |
Issue Link Type
Accessible via: issueLinks.type
Property Name | Type | Comments |
---|---|---|
| Text | |
| Text | |
| Text |
Last Comment
Accessible via: lastComment
Property Name | Type | Comments |
---|---|---|
| User | |
| User | |
| Number (Date/Time) | |
| Number (Date/Time) | |
| Text |
Project
Accessible via: project
Property Name | Type | Comments |
---|---|---|
| Text | |
| Number | |
| Text | |
| Text |
Sprint
Accessible via: sprint
Property Name | Type | Comments |
---|---|---|
| Text | |
| Number | |
| Number (Date/Time) | |
| Number (Date/Time) | |
| Number (Date/Time) | |
| Text | |
| Number | |
| text |
Status
Accessible via: status
Property Name | Type | Comments |
---|---|---|
| Text | |
| Number | |
| Text | |
| Text |
Version
Accessible via: affectsVersion, fixVersion
Property Name | Type | Comments |
---|---|---|
| Text | |
| Number | |
| Text | |
| Text | Project name |
| Number (Boolean) | |
| Number (Boolean) | |
| Number (Date) | |
| Number (Date) |
Work Logs (Jira)
Accessible via: jiraWorkLogs
Property Name | Type | Comments |
---|---|---|
| User | |
| User | |
| Number (Date/Time) | |
| Number (Date/Time) | |
| Text | |
| Number (Date/Time) | |
| Number (Date/Time) | Alias for startDate |
| Number (Duration) | |
| Number |
Work Logs (Tempo)
Accessible via: tempoWorkLogs
Property Name | Type | Comments |
---|---|---|
| User | |
| Number (Date/Time) | |
| Number (Date/Time) | |
| Text | |
| Number (Date/Time) | |
| Number (Date/Time) | Alias for startDate |
| Number (Duration) | |
| Number (Duration) | |
| Number |