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

...

Panel
borderStylesolid

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

Panel
borderStylesolid

Epic Color

  • Field name: Epic Color

  • Description: The Epic Color field is a multi-line text field describing the color of the Epic.

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

...

Panel
borderStylesolid

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

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

...

Panel
borderStylesolid

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:
      • Example: Increase the story points by 10:

        Code Block
        languagegroovy
        linenumberstrue
        if(issue.get("Story Points"))
        {
          issue.get("Story Points") + 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")

...


Jira Service Desk fields

Panel
borderStylesolid

Approvals

  • Field 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").getApprovals() method of the Issue interface that returns a Collection<Approvals>

    • Example: Approvals on the issue:

      Code Block
      languagegroovy
      linenumberstrue
      if(issue.get("Approvals").getApprovals()) 
      {
        issue.get("Approvals").getApprovals().first().getName()
      }


...

Panel
borderStylesolid

Customer Request Type

  • Field name: Customer Request Type

  • Description: The Customer Request Type field represents an object describing the information about the Service Desk used to create the ticket.

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

      Code Block
      issue.get("Customer Request Type")?.getRequestTypeKey()


  • getAsString("Customer Request Type") or getAsString("customfield_xxxxx") that returns a String representing the request type name:
    • Example: Customer request type:

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


...

Panel
borderStylesolid

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:

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

      Names of the Organizations:

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


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

    • Example: Names of Organizations:

      Code Block
      issue.getAsString("Organizations")


...

Panel
borderStylesolid

Satisfaction

...