Versions Compared

Key

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

This document details the methods you can use on any Issue object, such as the one provided by the issue variable, as well as Issue objects returned by other methods such as getParentObject()getEpic()or getLinkedIssues().

Methods of the Issue interface: 

Note

(green star) denotes a method that is specific to JMCF

...

MethodReturn typeReturns
get(<field_name>String fieldNameOrID) (green star)Depends on the field being accessedThe value of a system or custom field of the Issue object.
get(String fieldNameOrID, Object defaultValue) (green star)Depends on the field being accessedThe value of a system or custom field of the Issue object. If the value is null, it returns the optional default value specified as the second parameter. The defaultValue can be a String, an object or an array of objects.

getAffectedVersions()

Collection<Version>

Acollection of Affects Version/s objects, an empty collection if there are no affects versions.

getAssignee()

ApplicationUser

The Assignee user, null if the issue is not assigned.
getAsString(String field_namefieldNameOrID) (green star)StringSame as the get method, but returns a String representation of the value of the system or custom field, whenever possible.
getAsString(String fieldNameOrID, String defaultValue)(green star)StringSame as the get method, but returns a String representation of the value of the system or custom field, whenever possible. If the value is null, it returns the optional default value specified as the second parameter. The defaultValuedefaultValue must be a String.
getAsJsonData(<field_name> or <field_id>String fieldNameOrID) (green star)JsonDataThe JSON-style version of a system or a custom field of the Issue object, essentially a key-value MapThis can be useful to access some complex Jira Software and Jira Service desk fields.

getAttachments()

Collection<Attachment>

A collection of attachment objects, an empty collection if there are no attachments.

getAvailableOptions(String fieldName) (green star)

Collection<Object the field returns>

The Collection of available options for a field, which can be:

Both field names and field IDs are supported, just like on the get() method. See here for the list of supported fields.

getComponentObjects()

Collection<ProjectComponent>

A collection of project components (as objects) that this issue is assigned to, an empty collection if there are no components.

getCreated()

TimestampThe timestamp of the issue creation.

getCreator()

ApplicationUserThe user who created the issue.

getDescription()

StringThe description of the issue, null if there is no description for the issue

getDueDate()

TimestampThe due date of the issue, null if there is no due date set for the issue

getEnvironment()

StringThe Environment of the issue, null if there is no Environment set for the issue
getEpic()(green star)
IssueThe Epic, if any, of the current issue. null if the issue doesn't belong to an Epic.

getEstimate()

Long

The "remaining estimate" of work left to be performed on this issue, in milliseconds, null if empty.

getFixVersions()

Collection<Version>

Acollection of Fix Version/s objects, an empty collection if there are no Fix versions.

getId()

LongThe ID of the issue
getInwardIssueLinks() (green star)List<IssueLink>A list of inward issue links to the issue, an empty list if there are no inward issue links.

getIssueTypeId()

StringThe ID of the issue type of the issue.

getIssueTypeObject()

IssueTypeThe issue type object of the issue

getKey()

StringThe key of the issue

getLabels()

Set<Label>The labels of the issue, empty Set if no labels.
getLinkedIssues(String linkType) (green star)List<Issue>A list of issues linked to the current issue through a specific link type. Supports all issue links other than Parent-Subtask (see getParentObject() and getSubTaskObjects() for that) and Epic-Story (see getEpic() and getStories() for that).
getLinkedIssues() (green star)List<Issue>A list of issues linked to the current issue through any regular link type (all issue links other than Parent-Subtask (see getParentObject() and getSubTaskObjects() for that) and Epic-Story (see getEpic() and getStories() for that).

getNumber()

LongThe issue number in the project

getOriginalEstimate()

LongThe "original estimate" of work to be performed on this issue, in milliseconds, null if empty.
getOutwardIssueLinks() (green star)List<IssueLink>A list of outward issue links from the issue, an empty list if there are no outward issue links.

getParentObject()

Issue

The parent Issue, or null if the issue is not a subtask.

getPriorityObject()

Priority

The Priority for this Issue.

getProjectId()

Long

The ID of the Project for this Issue.

getProjectObject()

Project

The Project for this Issue.

getRawValue(String field_name) (green star)Depends on the field being accessedSame as the get method, but for Single-Select type custom fields, returns an Option object instead of a String
getRemoteLinks(String ApplicationName) (green star)Collection<RemoteIssueLink>A collection of remote issue links of the current issue to the target application (e.g. "jira" or "confluence"). When the ApplicationName is null all the remote issue links are returned.

getReporterUser()

ApplicationUserThe Reporter of the issue

getResolutionDate()

Timestamp

Timestamp of when an issue was resolved. Will be null if it hasn't been resolved yet, or if an issue has been returned to the 'unresolved' state.

getResolutionId()

StringThe ID of the resolution of the issue, if any

getResolutionObject()

Resolution

The Resolution for this Issue, null if the issue hasn't been resolved yet, or if an issue has been returned to the 'unresolved' state.

getSecurityLevelId()

LongThe Security level for this issue, null if there is no Security level set for the issue

getStatusObject()

StatusThe status of the issue
getStories() (green star)
List<Issue>A list of stories of the current Epic, an empty list if there are no Stories

getSubTaskObjects()

Collection<Issue>

The subtasks of this issue, an empty collection if no subtasks

getSummary()

StringThe summary of the issue

getTimeSpent()

Long

The "total time spent" working on this issue, in milliseconds, null if empty.

getUpdated()

TimestampThe timestamp of the issue update

getVotes()

LongThe number of votes for the issue, null if empty.

getWatches()

LongThe number of watchers for the issue, null if empty.

getWorkflowId()

LongThe ID of the workflow the issue belongs to

isCreated()

Boolean
True when the issue is created

isEditable()

Boolean
True when the issue is editable

isSubTask()

Boolean
True when the issue is a sub-task

...