Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page explains how to access the value of Predefined custom 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.

...

In this page: 

Table of Contents

Capture for JIRA fields

Panel
borderStylesolid

Capture for JIRA Browser

  • Field name: Capture for JIRA Browser

  • Description: The Capture for JIRA Browser field is a string representation of a multi-line text describing the browser of the page captured.

  • Structure:

    Expand
    titleClick here to see the structure of the Capture for JIRA Browser field


    Section


    Column


    Code Block
    titleStructure
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_xxxxx":String, //Capture for JIRA Browser. Browser of the page captured.
    		...
    	}
    	...
    }



    Column
    width700px


    Code Block
    titleExample
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_10008":"Chrome 53.0.2785.143",
    		...
    	}
    	...
    }





  • Accessing the Capture for JIRA Browser field
    • Capture for JIRA Browser field of the issue: {{ issue.fields['Capture for JIRA Browser'] }}

...

Panel
borderStylesolid

Approvals

  • Field name: Approvals

  • Description: The Approvals field is a string representation of a multi-line text describing the search options for Jira Service Desk approvals information.

  • Structure:

    Expand
    titleClick here to see the structure of the Approvals field


    Section


    Column


    Code Block
    titleStructure
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_xxxxx":String,
    		...
    	}
    	...
    }



    Column
    width700px


    Code Block
    titleExample
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_10002":"com.atlassian.servicedesk.plugins.approvals.internal.customfield.ApprovalsCFValue@195c4e9",
    		...
    	}
    	...
    }





  • Accessing the Approvals field: Accessing this field is not of much use.

...

Panel
borderStylesolid

Customer Request Type

  • Field name: Customer Request Type

  • Description: The Customer request type field represents an object describing the information about the Service Desk used to create the ticket.

  • Structure:

    Expand
    titleClick here to see the structure of the Customer request type fields


    Section


    Column


    Code Block
    titleStructure
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_xxxxx":
    		{
    			"_links":
    			{
    				"jiraRest": String, // URL of the rest api
    				"web": String, //URL of the ticket
    				"self": String //URL of the request
    			},
    			"requestType":
    			{
    				"id": String, //ID of the request type
    				"_links":
    				{
    					"self": String //URL of the request type
    				},
    				"name": String, //Name of the request type
    				"description": String, //Description of the request type
    				"helpText": String, //Help text of the request type
    				"serviceDeskId": String, //Service desk ID
    				"groupIds":[String], //Array of group ID's
    				"icon":
    				{
    					"id": String, //ID of the icon
    					"_links":
    					{
    						"iconUrls":
    						{
    							"48x48": String, //URL of the icon avatar
    							"24x24": String, //URL of the icon avatar
    							"16x16": String, //URL of the icon avatar
    							"32x32": String //URL of the icon avatar
    						}
    					}
    				}
    			},
    		},
    		...
    	},
    }



    Column
    width700px


    Code Block
    titleExample
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_10023":
    		{
    			"_links":
    			{
    				"jiraRest":"https://jmwe-test-2.atlassian.net/rest/api/2/issue/30333",
    				"web":"https://jmwe-test-2.atlassian.net/servicedesk/customer/portal/3/PSDF-25",
    				"self":"https://jmwe-test-2.atlassian.net/rest/servicedeskapi/request/30333"
    			},
    			"requestType":
    			{
    				"id":"18",
    				"_links":
    				{
    					"self":"https://jmwe-test-2.atlassian.net/rest/servicedeskapi/servicedesk/3/requesttype/18"
    				},
    				"name":"Get IT help",
    				"description":"Get assistance for general IT problems and questions [example]",
    				"helpText":"Get assistance for general IT problems and questions [example]",
    				"serviceDeskId":"3",
    				"groupIds":["7"],
    				"icon":
    				{
    					"id":"10527",
    					"_links":
    					{
    						"iconUrls":
    						{
    							"48x48":"https://jmwe-test-2.atlassian.net/secure/viewavatar?avatarType=SD_REQTYPE&size=large&avatarId=10527",
    							"24x24":"https://jmwe-test-2.atlassian.net/secure/viewavatar?avatarType=SD_REQTYPE&size=small&avatarId=10527",
    							"16x16":"https://jmwe-test-2.atlassian.net/secure/viewavatar?vatarType=SD_REQTYPE&size=xsmall&avatarId=10527",
    							"32x32":"https://jmwe-test-2.atlassian.net/secure/viewavatar?	
    							avatarType=SD_REQTYPE&size=medium&avatarId=10527"
    						}
    					}
    				}
    			},
    		},
    		...
    	},
    }





  • Accessing the Customer request type field
    • Name of the Customer request type: {{ issue.fields['Customer Request Type'].requestType.name }}

    • Description of the Customer request type: {{ issue.fields['Customer Request Type'].requestType.description }}

...

Panel
borderStylesolid

Satisfaction

  • Field name: Satisfaction

  • Description: The Satisfaction field is a string representation of a multi-line text describing the request feedback in Service Desk requests.

  • Structure:

    Expand
    titleClick here to see the structure of the Satisfaction field


    Section


    Column


    Code Block
    titleStructure
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_xxxxx": String,
    		...
    	}
    	...
    }



    Column
    width700px


    Code Block
    titleExample
    linenumberstrue
    "issue":
    {
    	...
    	...
    	"fields":
    	{
    		...
    		...
    		"customfield_10025":"com.atlassian.servicedesk.internal.api.customfields.feedback.RequestFeedbackCFValue@d3f24"
    	...
    	}
    	...
    }





  • Accessing the Satisfaction fieldAccessing this field is not of much use.

...