Standard JIRA Fields

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.

Standard JIRA Fields

This page explains how to access the value of Standard Jira fields using Nunjucks. Each field's structure is explained with examples. To understand how to write values into these fields see, Text input for fields and JSON input for fields.

It is now possible to access the standard fields of an issue by its Field name or Key.

Example:

{{ issue.fields.watches.watchCount }} and {{ issue.fields.Watchers.watchCount }}, both return the number of watchers.

When the field name contains a space or any special character, you need to use the array syntax to access the field :

Example:

{{ issue.fields['Issue Type'].name }}

{{ issue.fields['Component/s'][0].name }}

 

Affects Version/s

  • Field name : Affects Version/s

  • Key: versions

  • Description : The Affects Version/s field is an array of objects. Each object represents a single version.

  • Structure :

     Click here to see the structure of Affect Version/s
    Structure
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		....
    		....
    		"versions": 
    		[
    			{
    				"self":String, //URL of the versions
    				"id":String, //ID of the version
    				"description": String, //Description of the version
    				"name":String, //Name of the version
    				"archived":Boolean, //True when archived
    				"released":Boolean, //True when released
    				"releaseDate":String //Release date of the version
    			},
    			{
    				//Second version and so on.
    			}
    			...
    		],
    		...
    	}
    }
    Example
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		....
    		....
    		"versions": 
    		[
    			{
    				"self":"https://jmwe-test-2.atlassian.net/rest/api/2/version/10601",
    				"id":"10601",
    				"description":"Trial Version",
    				"name":"2",
    				"archived":false,
    				"released":true,
    				"releaseDate":"2016-10-06"
    			},
    			{
    					...
    			}
    		...
    		],
    	}
    }

  • Accessing the Affects version/s field

    • First Affects Version name : {{issue.fields.versions[0].name}}

    • Last Affects Version name:

      {{ issue.fields.versions | last | field("name")}}

      where '|' is the pipe operator, 'last' and 'field' are filters. See Nunjucks annotations for more filters.

    • Join the names of the Affects Version/s, separated by commas: {{issue.fields.versions | join("," , "name")}}

    • Return all the Affects Version/s, in a format that can be used to set the Fix Version/s field : {{issue.fields.versions | dump(2)}}

    • Test whether "1.0" is in the Affects Version/s: {{ issue.fields.versions | find({name:"1.0"}) }}

 

Assignee

  • Field name : Assignee

  • Key: assignee

  • Description : The Assignee field is an object that represents the user who this issue is assigned to.

  • Structure :

     Click here to see the structure of Assignee field
    Structure
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		....
    		....
    		"assignee": 
    		{
    			"self":String, //URL of the user
    			"accountId": String,
    			"emailAddress":String, //Email ID of the user
    			"avatarUrls": //URLs of assignee avatar
    			{
    				"48x48":String,
    				"24x24":String,
    				"16x16":String,
    				"32x32":String,
    			},
    			"displayName":String, //Display name of the user
    			"active":Boolean, //True when the user is active
    			"timeZone":String, //Time zone of the user
    			"accountType": String //Account type 
    		},
    	}
    }
    Example
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		....
    		....
    		"assignee":
    		{
    			"self": "https://validationenvironment.atlassian.net/rest/api/2/user?accountId=5ca5b1469a000c1180956957",
    			"accountId": "accountId:5ca5b1469a000c1180956957",
    			"emailAddress":"rvijji@innovalog.com",
    			"avatarUrls":
    			{
    				"48x48":"https://jmwe-test-2.atlassian.net/secure/useravatar?avatarId=10337",
    				"24x24":"https://jmwe-test-2.atlassian.net/secure/useravatar?size=small&avatarId=10337",
    				"16x16":"https://jmwe-test-2.atlassian.net/secure/useravatar?size=xsmall&avatarId=10337",
    				"32x32":"https://jmwe-test-2.atlassian.net/secure/useravatar?size=medium&avatarId=10337"
    			},
    			"displayName":"Radhika Vijji",
    			"active":true,
    			"timeZone":"Europe/Berlin",
    			"accountType": "atlassian"
    		},
    	}
    }

  • Accessing the Assignee field

    • AccountId of the Assignee : {{issue.fields.assignee.accountId}}

    • Timezone of the assignee : {{issue.fields.assignee.timeZone}}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Need support? Create a request with our support team.

Copyright © 2005 - 2026 Appfire | All rights reserved.