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 |
---|
denotes a method that is specific to JMCF |
...
Getters
Method | Return type | Returns |
---|---|---|
get(String fieldNameOrID ) | Depends on the field being accessed | The value of a system or custom field of the Issue object. |
get(String fieldNameOrID, Object defaultValue) | Depends on the field being accessed | The value of a system or custom field of the Issue object. If the value is null, it returns the default value specified as the second parameter. |
Acollection of Affects Version/s objects, an empty collection if there are no affects versions. | ||
The Assignee user, null if the issue is not assigned. | ||
getAsString(String fieldNameOrID ) | String | Same 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) | String | Same 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 default value specified as the second parameter. The defaultValue must be a String. |
getAsJsonData(String fieldNameOrID ) | JsonData | The JSON-style version of a system or a custom field of the Issue object, essentially a key-value Map. This can be useful to access some complex Jira Software and Jira Service desk fields. |
Collection<Attachment> | A collection of attachment objects, an empty collection if there are no attachments. | |
getAvailableOptions(String fieldName) |
| 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. |
Collection<ProjectComponent> | A collection of project components (as objects) that this issue is assigned to, an empty collection if there are no components. | |
Timestamp | The timestamp of the issue creation. | |
ApplicationUser | The user who created the issue. | |
String | The description of the issue, null if there is no description for the issue | |
Timestamp | The due date of the issue, null if there is no due date set for the issue | |
String | The Environment of the issue, null if there is no Environment set for the issue | |
| Issue | The Epic, if any, of the current issue. null if the issue doesn't belong to an Epic. |
Long | The "remaining estimate" of work left to be performed on this issue, in milliseconds, | |
Collection<Version> | Acollection of Fix Version/s objects, an empty collection if there are no Fix versions. | |
| Long | The ID of the issue |
getInwardIssueLinks() | List<IssueLink> | A list of inward issue links to the issue, an empty list if there are no inward issue links. |
String | The ID of the issue type of the issue. | |
IssueType | The issue type object of the issue | |
| String | The key of the issue |
Set<Label> | The labels of the issue, empty Set if no labels. | |
getLinkedIssues(String linkType) | 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() | 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). |
Long | The issue number in the project | |
Long | The "original estimate" of work to be performed on this issue, in milliseconds, null if empty. | |
getOutwardIssueLinks() | List<IssueLink> | A list of outward issue links from the issue, an empty list if there are no outward issue links. |
Issue | The parent Issue, or null if the issue is not a subtask. | |
Priority | The Priority for this Issue. | |
Long | The ID of the Project for this Issue. | |
Project | The Project for this Issue. | |
getRawValue(String field_name) | Depends on the field being accessed | Same as the get method, but for Single-Select type custom fields, returns an Option object instead of a String |
getRemoteLinks(String ApplicationName) | 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. |
ApplicationUser | The Reporter of the issue | |
Timestamp | Timestamp of when an issue was resolved. Will be | |
String | The ID of the resolution of the issue, if any | |
Resolution | The Resolution for this Issue, | |
Long | The Security level for this issue, null if there is no Security level set for the issue | |
Status | The status of the issue | |
| List<Issue> | A list of stories of the current Epic, an empty list if there are no Stories |
Collection< | The subtasks of this issue, an empty collection if no subtasks | |
String | The summary of the issue | |
Long | The "total time spent" working on this issue, in milliseconds, | |
Timestamp | The timestamp of the issue update | |
| Long | The number of votes for the issue, null if empty. |
Long | The number of watchers for the issue, null if empty. | |
Long | The ID of the workflow the issue belongs to | |
Boolean | True when the issue is created | |
Boolean | True when the issue is editable | |
Boolean | True when the issue is a sub-task |
...