Issue and Transition Data in Nunjucks
This document explains how to access the details of issue and transition objects, such as those available through the issue and transition variables. To see an example of the structure of an issue go to <base_URL_of_Jira>/rest/api/latest/issue/{issueKey}. The fields displayed through this REST API actually depend on the fields set on the issue.
Structure of an issue object
An issue object consists of the issue key and a collection of fields. The structure of the issue object (such as those available through the issue
, sourceIssue
and linkedIssue
variables) is the same as that returned by the /rest/api/latest/issue REST resource documented here.Â
issue object
Description:Â The issue object is an object with the following fields.
Structure :
Accessing issue details using Nunjucks:Â
- Key of the issue :
{{issue.key}}
- ID of the issue :
{{issue.id}}
- Standard Jira fields
Structure of the transition
variable
The transition
variable describes the current workflow transition. You might want to look at the log entries of a post-function execution to see the structure. The transition of an issue consists of the following fields :
transitionName
Description : The name of the current transition.
Structure :
Access the transitionName field :
- Name of the transition -
{{transition.transitionName}}
- Name of the transition -
transitionId
Description : The ID of the current transition.
Structure :
Accessing the transitionId field :
{{transition.transitionId}}
from_status
Description : The status from which the current transition starts.
Structure :
Accessing the from_status field :
{{transition.from_status}}
to_status
Description : The status to which the current transition leads
Structure :
Accessing the to_status field :
{{transition.to_status}}
workflowName
Description : The name of the workflow the transition belongs to.
Structure :
Accessing the workflowName field :
{{transition.workflowName}}
workflowId
Description : The ID of the workflow the transition belongs to.
Structure :
Accessing the workflowID field :
{{transition.workflowId}}