This page explains how to access the value of Pre-defined custom fields using Groovy. You can access them using either the methods native to Groovy or the methods provided by JMWE.
To understand how to write values into the writable custom fields see Raw value/text input for fields and Groovy expression input for fields.
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. |
...
...
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. To understand how to write values into the writable custom fields see Raw value/text input for fields and Groovy expression input for fields.
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. |
In this page:
Capture for JIRA fields
Panel |
---|
|
Capture for JIRA Browser |
Panel |
---|
|
Capture for JIRA Document Mode |
Panel |
---|
|
Capture for JIRA BrowserjQuery Version |
Panel |
---|
|
Capture for JIRA Document ModeOperating SystemField name: Capture for JIRA Document ModeOperating System Description: The Capture for JIRA Document Mode Operating system field is a multi-line text field describing the document mode operating system of the page captured. - Accessing the Capture for JIRA Document Mode fieldOperating System field: You can access the Capture for JIRA Document ModeOperating System field using any of the following methods of Issue interface:
|
Panel |
---|
|
Capture for JIRA jQuery VersionScreen ResolutionField name: Capture for jQuery VersionJIRA Screen Resolution Description: The Capture for JIRA jQuery Version Screen Resolution field is a multi-line text field describing the jQuery version screen resolution of the page capturedcapture. - Accessing the Capture for JIRA jQuery Version fieldScreen resolution field: You can access the Capture for JIRA jQuery VersionScreen Resolution field using any of the following getters methods of the Issue interface:
|
Panel |
---|
|
Capture for JIRA Operating SystemURLField name: Capture for JIRA Operating SystemURL Description: The Capture for JIRA Operating system URL field is a multistring representation of a multi-line text field describing the operating system URL of the page captured. - Accessing the Capture for JIRA Operating System fieldURL field: You can access the Capture for JIRA Operating SystemURL field using any of the following methods getters of the Issue interface:
|
Panel |
---|
|
Capture for JIRA Screen ResolutionUser AgentField name: Capture for JIRA Screen ResolutionUser Agent Description: The Capture for JIRA Screen Resolution User agent field is a multi-line text field describing the screen resolution user agent of the page capturecaptured. - Accessing the Capture for Screen resolution fieldJIRA User Agent field: You can access the Capture for Screen ResolutionJIRA User Agent field using any of the following methods getters of the Issue interface:
|
Panel |
---|
|
Capture for JIRA URLRaised duringField name: Capture for JIRA URL Raised during Description: The Capture for JIRA URL Raised during field is a string representation of a multi-line text describing the URL of the page capturedrepresenting the ID of the session the issue was raised in. - Accessing the Capture for JIRA URL field Raised during field: You can access the Capture for JIRA URLRaised during field using any of the following getters of the Issue interface:
|
Panel |
---|
|
Capture for JIRA User AgentTest sessionsField name: Capture for JIRA User Agent Test sessions Description: The Capture for JIRA User agent Test sessions field is a multi-line text field describing the user agent of the page capturedstring representing the ID's of the sessions the issue belongs to. - Accessing the Capture for JIRA User Agent Test Sessions field: You can access the Capture for JIRA User AgentTest Sessions field using any of the following getters of the Issue interface:
|
Panel |
---|
|
Raised duringTesting status |
Jira Software fields
Panel |
---|
|
Test sessionsEpic Color
Field name: Test sessions Epic Color Description: The Test sessions Epic Color field is a string representing the ID's of the sessions the issue belongs tomulti-line text field describing the color of the Epic. - Accessing the Test Sessions field Epic Color field: You can access the Test SessionsEpic color field using any of the following getters of the Issue interface:
|
Panel |
---|
|
Testing status Epic Link
|
JIRA Software fields
Panel |
---|
|
Epic NameRankField name: Epic Name Rank Description: The Epic Name The Rank field is a multi-line text field describing the name of the Epicstring representing the priority of the issue at a more granular level than issue priorities in Jira. Accessing the Epic Name Rank field: You You can access the Epic NameRank field using any of the following getters of the Issue interface:
|
Panel |
---|
|
Epic StatusSprintField name: Epic Status Sprint Description: The Epic Status Sprint field is a multi-line text field representing the status of the Epiccollection of objects. Each object represents a Sprint. Accessing the Epic Status Sprint field: You can access the Epic statusSprint field using any of the following getters of the Issue interface: get("Epic Status") or get("customfield_xxxxx") that returns a String
Example: Epic status field of the issue: Code Block |
---|
language | groovy |
---|
linenumbers | true |
---|
| issue.get("Epic Status
|
Panel |
---|
|
RankStory Points
|
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:
|
Jira Service Desk fields
Panel |
---|
|
ApprovalsField name: Approvals Description: The Approvals field is a collection of objects. Each object represents an Approval . Accessing the Approvals field: You can access the Approvals field using get("Approvals").getApprovals() or get("customfield_xxxxx" ) that returns a String with comma separated Sprint IDs).getApprovals() method of the Issue interface that returns a Collection <Approval>
Example: Sprints Approvals on the issue belongs to: Code Block |
---|
language | groovy |
---|
linenumbers | true |
---|
| if(issue.get("Approvals").getApprovals())
{
issue. | getAsStringSprintApprovals").getApprovals().first().getName()
} |
|
Panel |
---|
|
Story PointsApprovers
|
JIRA Service Desk fields
Panel |
---|
|
ApprovalsCustomer Request TypeField name: ApprovalsCustomer Request Type Description: The Approvals field is a collection of objects. Each object represents an Approval Customer Request Type field represents an object describing the information about the Service Desk used to create the ticket. - Accessing the Approvals Customer request type field: You You can access the Approvals Customers Request Type field using any of the following getters of the Issue interface:
get(" ApprovalsCustomer Request Type") .getApprovals() or get("customfield_xxxxx") .getApprovals() method of the Issue interface that returns a Collection <Approvals> that returns VpOrigin
Example: Approvals on the issueCustomer request type: Code Block |
---|
language | groovy |
---|
linenumbers | true |
---|
if(issue.get("ApprovalsCustomer Request Type")?.getApprovalsgetRequestTypeKey())
{
issue.get("Approvals").getApprovals().first().getName()
} |
|
Panel |
---|
|
Approvers
To 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 |
---|
|
Customer Request TypeOrganizationsField name: Customer Request Type Organizations Description: The Customer Request Type Organizations field represents an object array of Strings describing the information about the Service Desk used to create the ticket. Organizations the issue belongs to - Accessing the Customer request type Organizations field: You You can access the Customers Request Type Organizations field using any of the following getters of the Issue interface:
get("Organizations") or get("customfield_xxxxx") that returns a Collection<Organization > Issue interfaceCustomer Request Type or get("customfield_xxxxx") that returns VpOrigin
getAsString(" Customer Request TypeOrganizations") or getAsString("customfield_xxxxx") that returns a String representing the request type name with comma separated Organization ID's:
|
Panel |
---|
|
OrganizationsRequest participants
Field name: Organizations Request participants Description: The Organizations field represents Request Participants is an array of Strings describing the Organizations the issue belongs toobjects. Each object represents an ApplicationUser. - Accessing the Organizations Request Participants field: You You can access the Organizations Request participants field using any of the following getters of the Issue interface:Organizations that a Organization
ApplicationUser >Number Organizations issue belongs to: Code Block |
---|
first participant: Code Block |
---|
if(issue.get("Request participants"))
{
issue.get(" |
Organizations?.sizeNames of the Organizations:Organizations?.join(",").find(){
it.getName() == "JohnDoe"
}!=null |
getAsString("
Organizations that a Organization ID'susernames: Names Organizationsall the participants: Code Block |
---|
issue.getAsString(" |
Organizations
|
Panel |
---|
|
Request participantsSatisfactionField name: Request participants Satisfaction Description: The Request Participants Satisfaction field is an array of objects. Each object represents an ApplicationUserobject describing the request feedback in Service Desk requests. Accessing the Request Participants Satisfaction field: You can access the Request participants field using any of the following getters of the Issue interface:get("Request Participants") or get("customfield_xxxxx") that returns a Collection <ApplicationUser >Example: Name of the first participant: Code Block |
---|
if(issue.get("Request participants"))
{
issue.get("Request participants").first().getName()
} | Example: is a specific user in the participants list?Satisfaction field using any of the following getters of the Issue interface:
|
Panel |
---|
|
Satisfaction dateField name: Satisfaction date Description: The Satisfaction date field is an object describing the request feedback in Service Desk requestsa Timestamp representing the date of feedback provided by the customer. Accessing the Satisfaction date field: You You can access the the Satisfaction field using date field using any of the following getters of the Issue interface:
To manipulate the date see here |
Panel |
---|
|
Satisfaction dateTime to resolutionField name: Satisfaction date Time to resolution Description: The Satisfaction date Time to resolution field is a Timestamp representing the date of feedback provided by the customeran object representing a SLA value. Accessing the Satisfaction date Time to resolution field: You can access the Satisfaction date field using Time to resolution 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:
|
Portfolio for Jira fields
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.SimpleIssueAttributes. 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 SLA Value: String representing the key of the Initiative the Epic belongs to.
|
Tempo fields
...