This page explains how to access the value of Pre-defined custom fields using Groovy. You can access them using the getters of the Issue interface.
Note |
---|
'xxxxx ' in the custom fields detailed below is the ID of the custom field. Click here to know how to find the ID of the custom fields. |
...
Panel |
---|
|
Capture for JIRA Browser |
...
Panel |
---|
|
Capture for JIRA Document Mode |
...
Panel |
---|
|
Capture for JIRA jQuery Version |
...
Panel |
---|
|
Capture for JIRA Operating System |
...
Panel |
---|
|
Capture for JIRA Screen Resolution |
...
Panel |
---|
|
Capture for JIRA URL |
...
Panel |
---|
|
Capture for JIRA User Agent |
...
...
...
...
...
...
...
...
Panel |
---|
|
RankField name: Rank Description: The Rank field is a string representing the priority of the issue at a more granular level than issue priorities in Jira. Accessing the Rank field: You can access the Rank field using any of the following getters of the Issue interface:
|
...
Panel |
---|
|
SprintField name: Sprint Description: The Sprint field is a collection of objects. Each object represents a Sprint. Accessing the Sprint field: You can access the Sprint field using any of the following getters of the Issue interface:
|
...
...
...
...
Panel |
---|
|
Customer Request TypeTo get the Customer Request Type name as displayed on the issue view, you can use the following snippet: Code Block |
---|
language | groovy |
---|
linenumbers | true |
---|
| import com.atlassian.servicedesk.api.requesttype.RequestTypeService
def requestTypeService = getComponent(RequestTypeService)
def sourceIssueRequestTypeQuery = requestTypeService.newQueryBuilder().issue(issue.id).build()
def requestTypeEither = requestTypeService.getRequestTypes(currentUser, sourceIssueRequestTypeQuery)
if (requestTypeEither.isLeft()) {
log.warn "${requestTypeEither.left().get()}"
return false
}
return requestTypeEither.right.results[0].name |
|
...
...
Panel |
---|
|
Request participants
|
...
Panel |
---|
|
SatisfactionField name: Satisfaction Description: The Satisfaction field is an object describing the request feedback in Service Desk requests. Accessing the Satisfaction field: You can access the Satisfaction field using any of the following getters of the Issue interface:
|
...
Panel |
---|
|
Satisfaction dateField name: Satisfaction date Description: The Satisfaction date field is a Timestamp representing the date of feedback provided by the customer. Accessing the Satisfaction date field: You can access the Satisfaction date field using any of the following getters of the Issue interface:
To manipulate the date see here |
...
Panel |
---|
|
Time to resolutionField name: Time to resolution Description: The Time to resolution field is an object representing a SLA value. Accessing the Time to resolution field: You can access the Time to resolution field using any of the following getters of the Issue interface:
|
...
Panel |
---|
|
Parent Link- Field Name: Parent Link
Description: The Parent link field is an object representing the Initiative of the current Epic. It returns com.atlassian.rm.jpo.env.issues.JiraIssueService$3. Accessing the Parent Link field: You can access the Parent Link field using getAsString("Parent Link") or getAsString("customfield_xxxxx") that returns a String representing the key of the Initiative the Epic belongs to.
|
...
...
...
...