Versions Compared

Key

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

...

Panel
borderStylesolid

Component/s

  • Field name: Component/s

  • Field ID: components

  • Description: The Component/s field is a collection of objects. Each object represents one component.

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

...

Panel
borderStylesolid

Epic

  • Field name: Epic

  • Field ID: none

  • Description: Represents the issue's in the current Epic.

  • Accessing the Epic of an issue: You can access the Epic of an issue using the getEpic() that returns an Issue

    • Example: Get the Epic of the current issue

      Code Block
      languagegroovy
      linenumberstrue
      issue.epic


    • Example: Get the status of the current issue's Epic

      Code Block
      languagegroovy
      linenumberstrue
      issue.epic?.get("status")?.getName()


    • Example: Get the priority of the current issue's Epic

      Code Block
      languagegroovy
      linenumberstrue
      issue.getEpic()?.get("priority")?.getName()


...

Panel
borderStylesolid
  • Field name: Issue Links

  • Field ID: issuelinks

  • Description: Issue links is a list of objects. Each object represents one issue link.

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

    • get("issuelinks") or get("Linked Issues") that returns a List<IssueLink>
      • Example: Get the issue links of the current issue

        Code Block
        languagegroovy
        linenumberstrue
        issue.get("issuelinks")


    • getInwardIssueLinks() that returns a List<IssueLink>
      • Example: Number of inward linked issues for the current issue

        Code Block
        languagegroovy
        linenumberstrue
        issue.getInwardIssueLinks().size()


    • getOutwardIssueLinks() that returns a List<IssueLink>
      • Example: Destination issue of the first issue link to the current issue

        Code Block
        languagegroovy
        linenumberstrue
        if(issue.getOutwardIssueLinks())
        {
          issue.getOutwardIssueLinks().first().getDestinationObject()  
        }


    • getLinkedIssues(String linkName) that returns a List<Issue>
      • Example: Get the issues linked to the current issue with the 'blocks' link type

        Code Block
        languagegroovy
        linenumberstrue
        issue.getLinkedIssues('blocks')


      • Example: Get the status of all issues linked to the current issue with the 'is blocked by' link type

        Code Block
        languagegroovy
        linenumberstrue
        Status = []
        issue.getLinkedIssues('is blocked by').each{
          Status += it.getStatus().getName()
        }
        return Status


...

Panel
borderStylesolid

Parent

  • Field name: Parent

  • Field ID: none

  • Description: Represents the parent of an issue. This applies only to sub-tasks.

  • Accessing the parent issue of an issue: You can access the parent of an issue using the getParentObject() that returns an Issue

    • Example: Get the username of the user to whom the current issue's parent is assigned:

      Code Block
      languagegroovy
      linenumberstrue
      issue.parent?.getAssignee()?.getName()


    • Example: Get the status of the current issue's parent issue

      Code Block
      issue.getParentObject()?.get("status")?.getName()


...

Panel
borderStylesolid

Stories

  • Field name: Stories

  • Field ID: none

  • Description: Represents the issues in the current Epic.

  • Accessing the issues in an Epic: You can access the issues in an Epic using the getStories() that returns a List<Issue>

    • Example: Get the issues of an Epic that are in Closed status:

      Code Block
      languagegroovy
      linenumberstrue
      def stories = issue.getStories().findAll{
        it.get("status").getName() == "Closed"
      }
      return stories


    • Example: Get the number of issues in the current Epic

      Code Block
      languagegroovy
      linenumberstrue
      issue.getStories().size()


...

Panel
borderStylesolid

Work log

  • Field name: Log Work

  • Field ID: worklog

  • Description: The Work log field is a list of worklogs logged on the issue.

  • Accessing the Worklog: You can access the Log Work field using the get("worklog") or get("Log Work") that returns a List<Worklog>

    • Example: Time spent on the last work logged

      Code Block
      languagegroovy
      linenumberstrue
      if(issue.get("Log Work"))
      {
        issue.get("Log Work").last().getTimeSpent()
      }


...