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.

'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

Capture for JIRA Browser


Capture for JIRA Document Mode

  • Field name: Capture for JIRA Document Mode

  • Description: The Capture for JIRA Document Mode field is a multi-line text field describing the document mode of the page captured.

  • Accessing the Capture for JIRA Document Mode fieldYou can access the Capture for JIRA Document Mode field using any of the following methods of Issue interface:


Capture for JIRA jQuery Version

  • Field name: Capture for jQuery Version

  • Description: The Capture for JIRA jQuery Version field is a multi-line text field describing the jQuery version of the page captured.

  • Accessing the Capture for JIRA jQuery Version fieldYou can access the Capture for JIRA jQuery Version field using any of the following getters of the Issue interface:


Capture for JIRA Operating System

  • Field name: Capture for JIRA Operating System

  • Description: The Capture for JIRA Operating system field is a multi-line text field describing the operating system of the page captured.

  • Accessing the Capture for JIRA Operating System fieldYou can access the Capture for JIRA Operating System field using any of the following methods of Issue interface:


Capture for JIRA Screen Resolution

  • Field name: Capture for JIRA Screen Resolution

  • Description: The Capture for JIRA Screen Resolution field is a multi-line text field describing the screen resolution of the page capture.

  • Accessing the Capture for Screen resolution fieldYou can access the Capture for Screen Resolution field using any of the following methods of Issue interface:


Capture for JIRA URL

  • Field name: Capture for JIRA URL

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

  • Accessing the Capture for JIRA URL fieldYou can access the Capture for JIRA URL field using any of the following getters of the Issue interface:


Capture for JIRA User Agent

  • Field name: Capture for JIRA User Agent

  • Description: The Capture for JIRA User agent field is a multi-line text field describing the user agent of the page captured.

  • Accessing the Capture for JIRA User Agent fieldYou can access the Capture for JIRA User Agent field using any of the following getters of the Issue interface:


Raised during


Test sessions

  • Field name: Test sessions

  • Description: The Test sessions field is a string representing the ID's of the sessions the issue belongs to.

  • Accessing the Test Sessions fieldYou can access the Test Sessions field using any of the following getters of the Issue interface:


Testing status

  • Field name: Testing status

  • Description: The Testing status field is a string representing the status of the all the sessions the issue belongs to.

  • Accessing the Testing status fieldYou can access the Testing status field using any of the following getters of the Issue interface:

Jira Software fields

Epic Color


Epic Link


Epic Name


Epic Status


Rank

  • Field name: Rank

  • DescriptionThe 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:


Sprint

  • Field name: Sprint

  • Description: The Sprint field is a collection of objects. Each object represents a Sprint.

  • Accessing the Sprint fieldYou can access the Sprint field using any of the following getters of the Issue interface:


Story Points

  • Field name: Story Points

  • Description: The Story Points field is a number representing the story points.

  • Accessing the Story Points fieldYou can access the Story points field using any of the following getters of the Issue interface:

Jira Service Desk fields

Approvals


Approvers


Customer Request Type

To get the Customer Request Type name as displayed on the issue view, you can use the following snippet:

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



Organizations

  • Field name: Organizations

  • Description: The Organizations field represents an array of Strings describing the Organizations the issue belongs to

  • Accessing the Organizations field: You can access the Organizations field using any of the following getters of the Issue interface:
  • get("Organizations") or get("customfield_xxxxx") that returns a Collection<Organization>
    • Example: Number of Organizations the issue belongs to:

      issue.get("Organizations")?.size()

      Names of the Organizations:

      issue.get("Organizations")?.join(",")


  • getAsString("Organizations") or getAsString("customfield_xxxxx") that returns a String with comma separated Organization ID's:

    • Example: Names of Organizations:

      issue.getAsString("Organizations")



Request participants


Satisfaction


Satisfaction date

To manipulate the date see here


Time to resolution

  • Field 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

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 fieldYou 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.

    • Example: Fetch the issue object of the Initiative the Epic belongs to:

      def initiativeKey = issue.getAsString("Parent Link");
      if (initiativeKey==null)
        return null;
      return com.atlassian.jira.component.ComponentAccessor.getIssueManager().getIssueObject(initiativeKey);


Tempo fields

Iteration


Team


Tempo Account

  • Field name: Account

  • Description: The Tempo Account field is an object representing the Tempo account the issue belongs to:

  • Accessing the Account fieldYou can access the Tempo Account field using any of the following getters of the Issue interface: