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

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

...

Portfolio for Jira fields

  • Field Name: Parent Link
  • Description: The Parent link field is an object representing the Initiative of the current Epic.

  • Accessing the Parent Link fieldYou can access the Parent Link field using any of the following getters of the Issue interface:get("Parent Link") or get("customfield_xxxxx") that returns an  Issue

    Example: Parent Link of the Epic

    Panel
    Code Block
    languagegroovy
    linenumberstrue
    issue.get("Parent Link")
    borderStylesolid
    solid
    • 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.

    • representing

      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:

         Parent Link

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

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


    Tempo fields

    Panel
    borderStylesolid

    Iteration

    ...