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.
...
Panel |
---|
|
SprintFlagged
Field name: Sprint Flagged Description: The Sprint Flagged field is an array of strings.of objects. Each object represents an option of the checkbox. By default, there's only one possible value: Impediment Structure: Expand |
---|
title | Click here to see the structure of the Sprint Flagged field |
---|
|
Section |
---|
Column |
---|
Code Block |
---|
title | Structure |
---|
linenumbers | true |
---|
| "issue":
{
...
...
...
...
"fields":
{
...
...
customfield_xxxxx
[
{
"self":String, //URL of the choice
"value":String, //Value of the choice
"id":String //ID of the choice
}
]
},
...
}
...
} |
|
Column |
---|
|
Code Block |
---|
title | Example |
---|
linenumbers | true |
---|
| "issue":
{
...
...
"fields":
{
....
....
"customfield_11300":
{
"self":"https://jmwe-test-2.atlassian.net/rest/api/2/customFieldOption/10600",
"value":"Impediment",
"id":"10600"
},
...
}
...
} |
|
|
|
- Accessing the Flagged field:
The value of the last option selected in the Flagged field Code Block |
---|
{{ issue.fields["Flagged"] | last | field("value") }} |
Display the values of all selected options, separated by a comma: Code Block |
---|
{{ issue.fields["Flagged"] | join(",","value") }} |
Test whether the issue has been flagged: Code Block |
---|
{{ issue.fields["Flagged"] | find({"value":"Impediment"}) != null }} |
|
Panel |
---|
|
SprintField name: Sprint Description: The Sprint field is an array of strings. Structure: Expand |
---|
title | Click here to see the structure of the Sprint field |
---|
|
Section |
---|
Column |
---|
Code Block |
---|
title | Structure |
---|
linenumbers | true |
---|
| "issue":
{
...
...
"fields":
{
...
...
"customfield_xxxxx":
[
"String"
]
...
}
...
} |
|
Column |
---|
|
Code Block |
---|
title | Example |
---|
linenumbers | true |
---|
| "issue":
{
...
...
"fields":
{
...
...
"customfield_10017":
[
"com.atlassian.greenhopper.service.sprint.Sprint@16e2448
[
id=3,
rapidViewId=3,
state=FUTURE,
name=CFLIORT Sprint 3,
goal=<null>,
startDate=<null>,
endDate=<null>,
completeDate=<null>,
sequence=3
]"
]
...
}
...
} |
|
|
|
Accessing the Sprint field: Because each string is an internal representation of a Sprint, accessing this field is not of much use.
|
...
Panel |
---|
|
ApprovalsField 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 |
---|
title | Click here to see the structure of the Approvals field |
---|
|
Section |
---|
Column |
---|
Code Block |
---|
title | Structure |
---|
linenumbers | true |
---|
| "issue":
{
...
...
"fields":
{
...
...
"customfield_xxxxx":String,
...
}
...
} |
|
Column |
---|
|
Code Block |
---|
title | Example |
---|
linenumbers | true |
---|
| "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 |
---|
|
Customer Request Type |
...
Panel |
---|
|
Request participants
|
Panel |
---|
|
SatisfactionField 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 |
---|
title | Click here to see the structure of the Satisfaction field |
---|
|
Section |
---|
Column |
---|
Code Block |
---|
title | Structure |
---|
linenumbers | true |
---|
| "issue":
{
...
...
"fields":
{
...
...
"customfield_xxxxx": String,
...
}
...
} |
|
Column |
---|
|
Code Block |
---|
title | Example |
---|
linenumbers | true |
---|
| "issue":
{
...
...
"fields":
{
...
...
"customfield_10025":"com.atlassian.servicedesk.internal.api.customfields.feedback.RequestFeedbackCFValue@d3f24"
...
}
...
} |
|
|
|
Accessing the Satisfaction field: Accessing this field is not of much use.
|
...