Versions Compared

Key

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

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.

...

Table of Contents

...

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:

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 multi-line text field describing the browser of the page captured.

  • Accessing the Capture for JIRA Browser field: You can access the Capture for JIRA Browser field using any of the following getters of the Issue interface:
  • get("Capture for JIRA Browser") or get("customfield_xxxxx") that returns a String
    • Example: Capture for JIRA Browser field of the issue:

      Code Block
      languagegroovy
      linenumberstrue
      issue.get("Capture for JIRA Browser")


  • getAsString("Capture for JIRA Browser") or getAsString("customfield_xxxxx") that returns a String representing the browser of the page captured:

    • Example: Capture for JIRA Browser field of the issue:

      Code Block
      languagegroovy
      linenumberstrue
      issue.getAsString("Capture for JIRA Browser")



Panel
borderStylesolid

Capture for JIRA

Browser

Document Mode

  • Field name: Capture for JIRA BrowserDocument Mode

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

  • Accessing the Capture for JIRA Browser field: You Document Mode fieldYou can access the Capture for JIRA BrowserDocument Mode field using any of the following getters methods of the Issue interface: Browser that
    • that returns a String
      • Example: Capture for JIRA

      Browser
      • Document mode field of the issue:

        Code Block
        languagegroovy
        linenumberstrue
        issue.get("Capture for JIRA Document 
      Browser
      • Mode")


    • getAsString("Capture for JIRA
    Browser browser
    • document mode of the page captured:
      • Example: Capture for JIRA

      Browser
      • Document mode field of the issue:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getAsString("Capture for JIRA Document 
      Browser
      • Mode")



Panel
borderStylesolid

Capture for JIRA

Document Mode

jQuery Version

  • Field name: Capture for JIRA Document ModejQuery Version

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

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


Panel
borderStylesolid

Capture for JIRA

jQuery Version

Operating System

  • Field name: Capture for jQuery VersionJIRA Operating System

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

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


Panel
borderStylesolid

Capture for JIRA

Operating System

Screen Resolution

  • Field name: Capture for JIRA Operating SystemScreen Resolution

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

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


Panel
borderStylesolid

Capture for JIRA

Screen Resolution

URL

  • Field name: Capture for JIRA Screen ResolutionURL

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

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


Panel
borderStylesolid

Capture for JIRA

URL

User Agent

  • Field name: Capture for JIRA URLUser Agent

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

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


Panel
borderStylesolid
Capture for JIRA User Agent

Raised during

  • Field name: Capture for JIRA User AgentRaised during

  • Description: The Capture for JIRA User agent Raised during field is a multi-line text field describing the user agent of the page capturedstring representing the ID of the session the issue was raised in.

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


Panel
borderStylesolid
Raised during

Test sessions

  • Field name: Raised duringTest sessions

  • Description: The Raised during Test sessions field is a string representing the ID's of the session sessions the issue was raised inbelongs to.

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


Panel
borderStylesolid
Test sessions

Testing status

  • Field name: Test sessionsTesting status

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

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

Jira Software fields

Panel
borderStylesolid
Testing status

Epic Color

  • Field name: Testing statusEpic Color

  • Description: The Testing status Epic Color field is a string representing the status of the all the sessions the issue belongs tomulti-line text field describing the color of the Epic.

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

Jira Software fields



Panel
borderStylesolid
Color
  • Field name: Epic ColorLink

  • Description: The Epic Color link field is a multi-line text field describing the color of the Epican object representing the Epic of the current issue.

  • Accessing the Epic ColorLink fieldYou can access the Epic color field Link using any of the following getters of the Issue interface:


Panel
borderStylesolid

Epic

Link

Name

  • Field name: Epic LinkName

  • Description: The Epic link Name field is an object representing the Epic of the current issuea multi-line text field describing the name of the Epic.

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


Panel
borderStylesolid

Epic

Name

Status

  • Field name: Epic NameStatus

  • Description: The Epic Name Status field is a multi-line text field describing representing the name status of the Epic.

  • Accessing the Epic Name Status fieldYou can access the Epic Namestatus field using any of the following getters of the Issue interface:


Panel
borderStylesolid
Epic Status

Rank

  • Field name: Epic StatusRank

  • Description: The Epic Status  The Rank field is a multi-line text field string representing the status priority of the Epicissue at a more granular level than issue priorities in Jira.

  • Accessing the

    Epic Status

    Rank field:

     You

     You can access the

    Epic status

    Rank field using any of the following getters of the Issue interface:


Panel
borderStylesolid
Rank

Sprint

  • Field name: RankSprint

  • Description: The Rank  The Sprint field is a string representing the priority of the issue at a more granular level than issue priorities in Jiracollection of objects. Each object represents a Sprint.

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

    get("Rank") or get("customfield_xxxxx") that returns a LexoRank.

    Example: Rank of the parent issue

    • get("Sprint") or get("customfield_xxxxx") that returns a  Collection<Sprint>

      • Example: First active Sprint the issue belongs to:

        Code Block
        languagegroovy
        linenumberstrue
        issue.get("Sprint").find(){
          it.getState() == "ACTIVE"
        }


      • Example: All the Sprint names the issue belongs to:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getParentObject()?.get("Rankdef names = []
        issue.get("Sprint").each(){
          names += it.getName()
        }
        names.join(",")


    • getAsString("RankSprint") or getAsString("customfield_xxxxx") that returns a LexoRank representing the Rank of the issue: String with comma separated Sprint IDs

      • Example: Rank of Sprints the parent issue belongs to:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getParentObject()?.getAsString("RankSprint")



Panel
borderStylesolid
Sprint

Story Points

  • Field name: SprintStory Points

  • Description: The Sprint Story Points field is a collection of objects. Each object represents a Sprint.number representing the story points.

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

    • All the Sprint names the issue belongs to
      • Increase the story points by 10:

        Code Block
        languagegroovy
        linenumberstrue
    • def names = []
      • if(issue.get("
    • Sprint
      • Story Points")
    • .each(){ names += it.getName(
      • )
        
    • }
      • {
          
    • names
      • issue.
    • join
      • get("
    • ,
      • Story Points") + 10
        }


    • getAsString("SprintStory Points") or getAsString("customfield_xxxxx") that  that returns a Stringwith comma separated Sprint IDs representing the Story points

      • Example:Sprints Story points of the issue belongs to:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getAsString("SprintStory Points")


Jira Service Desk fields

Panel
borderStylesolid
Story Points

Approvals

  • Field name: Story PointsApprovals

  • Description: The Story Points Approvals field is a number representing the story pointscollection of objects. Each object represents an Approval.

  • Accessing the

    Story Points

    Approvals field:

     You

     You can access the

    Story points

    Approvals field using

    any of the following getters of the Issue interface:

    get("

    Story Points"

    Approvals").getApprovals() or get("customfield_xxxxx")

     

    .getApprovals() method of the Issue interface that returns a

    Double

    Collection<Approvals>

    • Example:

      Story points of the story:
      Code Block
      languagegroovy
      linenumberstrue
      issue.get("Story Points")
    • Example: Increase the story points by 10
    • Approvals on the issue:

      Code Block
      languagegroovy
      linenumberstrue
      if(issue.get("
    • Story Points"
    • Approvals").getApprovals()) 
      {
        issue.get("
    • Story Points
    • Approvals")
    • + 10 }

      getAsString("Story Points") or getAsString("customfield_xxxxx") that returns a String representing the Story points

      Example: Story points of the issue:

      Code Block
      languagegroovy
      linenumberstrue
      issue.getAsString("Story Points")

...

    • .getApprovals().first().getName()
      }



groovy
Panel
borderStylesolid
Approvals

Approvers

  • Field name: ApprovalsApprovers

  • Description: The Approvals Approvers field is a collection an array of objects. Each object represents an Approval.Accessing the Approvals field: You can access the Approvals field using get("Approvals").getApprovals() or get ApplicationUser.

  • Accessing the Approvers fieldYou can access the Approvers field using any of the following getters of the Issue interface: .getApprovals() method of the Issue interface
    •  that returns a

    Collection<Approvals>
    •  String with comma separated Approvers usernames:

      • Example:

      Approvals on
      • Names of all approvers who approved the issue:

        Code Block
language
linenumberstrueif(
  • issue.
get
  • getAsString("
Approvals").getApprovals()) { issue.get("Approvals").getApprovals().first().getName() }
  • Approvers")



Panel
borderStylesolid
Approvers

Customer Request Type

  • Field name: ApproversCustomer Request Type

  • Description: The Approvers Customer Request Type field is represents an array of objects. Each object represents an ApplicationUserobject describing the information about the Service Desk used to create the ticket.

  • Accessing the Approvers Customer request type fieldYou can access the Approvers Customers Request Type field using any of the following getters of the Issue interface:
  • get("ApproversCustomer Request Type") or get("customfield_xxxxx") that returns a Collection<ApplicationUser>: VpOrigin
    • Example:

      Names of all approvers who approved the issue

      Customer request type:

      Code Block
      def names = []
      issue
      .get("Approvers").each(){ names += it.getName() } names.join(","
      .get("Customer Request Type")?.getRequestTypeKey()


  • getAsString("ApproversCustomer Request Type") or getAsString("customfield_xxxxx") that  that returns a  String with comma separated Approvers usernames String representing the request type name:
    • Example:

      Names of all approvers who approved the issue

      Customer request type:

      Code Block
      issue.getAsString("
      Approvers
      Customer Request Type")



Panel
borderStylesolid
Customer Request Type

Organizations

  • Field name: Customer Request TypeOrganizations

  • 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("Customer Request TypeOrganizations") or get("customfield_xxxxx") that returns VpOrigin that returns a Collection<Organization>
    • Example: Customer request typeNumber of Organizations the issue belongs to:

      Code Block
      issue.get("Customer Request TypeOrganizations")?.size()

      Names of the Organizations:

      Code Block
      issue.get("Organizations")?.getRequestTypeKeyjoin(",")


  • getAsString("

    Customer Request Type

    Organizations") or getAsString("customfield_xxxxx") that returns a String

    representing the request type name

    with comma separated Organization ID's:

    • Example:Customer request type Names of Organizations:

      Code Block
      issue.getAsString("Customer Request TypeOrganizations")



Panel
borderStylesolid
Organizations

Request participants

  • Field name: OrganizationsRequest 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
    •  that returns
    a Organization
    • ApplicationUser>
      • Example:

      Number
      • Name of

      Organizations
      • the

      issue belongs to
      • first participant:

        Code Block
        if(issue.get("
      Organizations")?.size()Names of the Organizations:
      • Request participants"))
        {
          issue.get("Request participants").first().getName()
        }


      • Example: is a specific user in the participants list?

        Code Block
        issue.get(
      "Organizations")?.join(",")
      • "Request participants").find(){
          it.getName() == "JohnDoe"  
        }!=null


    • getAsString("

    Organizations that
    •  that returns

    a
    • String with comma separated

    Organization ID's
    • usernames:

      • Example:

      Names
      • Name of

      Organizations
      • all the participants:

        Code Block
        issue.getAsString("
      Organizations
      • Request participants")



Panel
borderStylesolid
Request participants

Satisfaction

  • Field name: Request participantsSatisfaction

  • 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 fieldYou can access the

    Request participants

    Satisfaction field using any of the following getters of the Issue interface:


Panel
borderStylesolid

Satisfaction date

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


issue.get("Satisfaction date"

 Start time of the last completed cycle of the 'Time to first response' SLA:

Panel
borderStylesolid
Satisfaction date

Time to resolution

  • Field name: Satisfaction dateTime 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:

Code Block
Code Block
issue.get("Time to resolution")?.getLastCompletedCycle()?.get()?.getStartTime()


  • getAsString("Satisfaction dateTime to resolution") or getAsString("customfield_xxxxx") that returns a String representing the date of satisfaction SLA Value:

    • Example: Satisfaction date of the issue Start time of the last completed cycle of the 'Time to first response' SLA:

      Code Block
      issue.getAsString("SatisfactionTime to dateresolution")
  • To manipulate the date see here

    Portfolio for Jira fields

    Panel
    borderStylesolid
    Time to resolution

    Parent Link field

    • Field name: Time to resolutionName: Parent Link
    • Description:  The Time to resolution The Parent link field is an object representing a SLA valuethe Initiative of the current Epic.

    • Accessing the Time to resolution Parent Link field: You  You can access the Time to resolution field using the Parent Link field using any of the following getters of the Issue interface:
      • get("Time to resolutionParent Link") or get("customfield_xxxxx") that returns a SLA Value:an  Issue
        • Example:  Start time of the last completed cycle of the 'Time to first response' SLA:

          code

          Parent Link of the Epic

          Code Block
          languagegroovy
          linenumberstrue
          issue.get("TimeParent to resolution")?.getLastCompletedCycle()?.get()?.getStartTime(Link")


      • getAsString("Time to resolutionParent Link") or getAsString("customfield_xxxxx") that returns a String representing the SLA Valuekey of the Initiative the Epic belongs to:
        • Example: Start time of the last completed cycle of the 'Time to first response' SLA Parent Link of the Epic:

          Code Block
          languagegroovy
          linenumberstrue
          issue.getAsString("TimeParent to resolutionLink")


    Tempo fields

    Panel
    borderStylesolid

    Iteration

    ...