Versions Compared

Key

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

...

Panel
borderStylesolid

Affects Version/s

  • Field Name: Affects Version/s

  • Field ID: versions

  • Description: The Affects Version/s field is a collection of version objects. Each object represents a single version.

  • Accessing the Affects Version/s field: You can access the Affects Version/s field using any of the following getters of the Issue interface:

...

Panel
borderStylesolid

Assignee

  • Field name: Assignee

  • Field ID: assignee

  • Description: The Assignee field is an object that represents the user who this issue is assigned to.

  • Accessing the Assignee field: You can access the Assigneefield using any of the following getters of the Issue interface:
    • getAssigneeUser() that returns an ApplicationUser
      • Example: EmailAddress of the user the issue is assigned to:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getAssigneeUser()?.getEmailAddress()


...

Panel
borderStylesolid

Attachments

  • Field name: Attachments

  • Field ID: attachment

  • Description: Attachment is a collection of objects. Each object represents a single attachment.

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

...

Panel
borderStylesolid

Comments

  • Field name: Comment

  • Field ID: comment

  • Description: The Comments field is a collection of objects. Each object represents one comment.
  • Accessing the Comments field: You can access the Comments field using any of the following getters of the Issue interface:
    • get("comment") or get("Comments") that returns a List<Comment>
      • Example: Number of comments on the issue:

        Code Block
        languagegroovy
        linenumberstrue
        issue.get("comment").size()


      • Example: Last Comment body:

        Code Block
        languagegroovy
        linenumberstrue
        if(issue.get("comment"))
        {
          issue.get("comment").last().getBody()
        }


      • Example: Name of the author of the first comment on the issue:

        Code Block
        languagegroovy
        linenumberstrue
        if(issue.get("comment"))
        {
          issue.get("comment").first().getAuthorFullName()
        }


    • getAsString("Comments") or getAsString("comment") that returns a String with comma separated bodies of the comments:
      • Example: All the comments on the issue separated by a comma:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getAsString("comment")


...

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

Creator

  • Field name: Creator

  • Field ID: creator

  • Description: The Creator field is an object that represents the user who created this issue.

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

...

Panel
borderStylesolid

FixVersion/s

  • Field name: Fix Version/s

  • Field ID: fixVersions
  • Description: The Fix Version/s field is a collection of objects. Each object represents a single version.

  • Accessing the Fix Version/s fieldYou can access the Fix Version/s field using any of the following getters of the Issue interface:
      • Example: Join the names of the Fix Version/s, separated by commas:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getFixVersions().join(",")


...

Panel
borderStylesolid

ID

  • Field name: ID

  • Field ID: none

  • Description: The ID of the issue.

  • Accessing the ID of an issue: You can access the ID of the issue using getId() that returns ID of the issue in a Long format.

    • Example: ID of the issue

      Code Block
      languagegroovy
      linenumberstrue
      issue.getId()


...

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

Issue type

  • Field name: Issue Type

  • Field ID: issuetype

  • Description: The Issue Type field is an object describing the issue type.

  • Accessing the Issue type field: You can access the Issue type field using any of the following getters of the Issue interface:
    • getAsString("Issue Type") or getAsString("issuetype") that returns a String representing the name of the Issue Type.

      • Example: Name of the issue type:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getAsString("issuetype")


    • getIssueTypeObject() that returns an Issuetype

      • Example: Set a text field to "This issue is a sub-task" if the issue is a sub-task:

        Code Block
        languagegroovy
        linenumberstrue
        if(issue.getIssueTypeObject().getName()=="Sub-task")
        {
          "This is a sub-task"
        }


...

Panel
borderStylesolid

Labels

  • Field name: Labels

  • Field ID: labels

  • Description: Labels is a Set of labels.

  • Accessing the Labels field: You can access the Labels field using any of the following getters of the Issue interface:
    • get("labels") or get("Labels") that returns a Set<Label>
      • Example: Get the first label of the issue:

        Code Block
        languagegroovy
        linenumberstrue
        if(issue.get("labels"))
        {
        
          issue.get("labels").first()
        }


    • getAsString("Labels") or getAsString("labels") that returns a String with comma separated label names:

      • Examples: Labels of the issue

        Code Block
        languagegroovy
        linenumberstrue
        issue.getAsString("labels")


    • getLabels() that returns a Set<Label>

      • Example: Get the last label of the issue

        Code Block
        languagegroovy
        linenumberstrue
        if(issue.getLabels())
        {
          issue.getLabels().last()
        }


      • Example: All the labels of the issue separated by a comma:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getLabels().join(",")


...

Panel
borderStylesolid

Priority

  • Field name: Priority

  • Field ID: priority

  • Description: The Priority field is an object describing the priority of the issue.

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

...

Panel
borderStylesolid

Project

  • Field name: Project

  • Field ID: project

  • Description: The Project field is an object describing the selected project.

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

...

Panel
borderStylesolid

Reporter

  • Field name: Reporter

  • Field ID: reporter

  • Description: The Reporter field is an object that represents the user by whom the issue is reported.

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

...

Panel
borderStylesolid

Resolution

  • Field name: Resolution

  • Field ID: reporter

  • Description: The Resolution field is an object describing the resolution of the issue.

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

...

Panel
borderStylesolid

Security Level

  • Field name: Security Level

  • Field ID: security

  • Description: The Security level field is an object describing the security level of the issue.

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

...

Panel
borderStylesolid

Status

  • Field name: Status

  • Field ID: status

  • Description: The Status field is an object describing the status of the issue.

  • Accessing the Status fieldYou can access the Status field using any of the following getters of the Issue interface:
    • getAsString("Status") or getAsString("status") that returns a String representing the name of the status the issue is in:
      • Example: Name of the status of the issue:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getAsString("status")


    • getStatusObject() that returns a Status:
      • Example: Name of the status category of the status:

        Code Block
        languagegroovy
        linenumberstrue
        issue.getStatusObject().getId()


...

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

Subtasks

  • Field name: Sub-Tasks

  • Field ID: subtasks

  • DescriptionRepresents the subtasks of the current issue.

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

...

Panel
borderStylesolid

Votes

  • Field name: Votes

  • Field ID:votes

  • Description: The Votes field is a collection of users who voted for issue.

  • Accessing the VotesYou can access the Votes field using any of the following getters of the Issue interface:

...

Panel
borderStylesolid

Watchers

  • Field name: Watchers

  • Field ID: watches

  • Description: The Watchers field is a collection of users watching the issue.

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

...

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()
      }


...