Issue and Transition Data in Nunjucks

Cloud Migration Resources

Planning a Jira Cloud migration? These resources can help you get started:

JMWE Cloud features – Review Cloud features and understand key differences between DC and Cloud.
Migration support from Appfire – Learn how we can help you migrate smoothly.

Issue and Transition Data in Nunjucks

 

 

 

TryItButton (2).png

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 :

     Click here to see the structure of issue variable
    Structure
    {
        "expand": String, //Parts of response
        "id":String, //ID of the issue.
        "self":String, //URL of the issue.
        "key":String, //Key of the issue.
        "fields": 
        {
    		...
    		...
    	}
    }
    Example
    {
        "expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
    	"id":"30101",
    	"self":"https://jmwe-test-2.atlassian.net/rest/api/latest/issue/30101",
    	"key":"TEST-628",
    	"fields":
        {
    		...
    		...
    	}
    }

Accessing issue details using Nunjucks

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}}

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}}

Need support? Create a request with our support team.

Copyright © 2005 - 2026 Appfire | All rights reserved.