This document details the methods you can use on any Issue
object, such as the one provided by the issue
variable issue
, linkedIssue
and parentIssue
variables (where applicable), 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 |
...
Table of Contents | ||
---|---|---|
|
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 |
fieldNameOrID) |
| 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 | |
getEntityProperty(String propertyName) | Object | The value of the specified Entity property of the issue, parsed into a Groovy object. |
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, | |
getFieldHistory(String fieldNameOrID) | List<ChangeItemBean> | The history of a system or custom field of the Issue object. |
Collection<Version> |
| |
| 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 (including the issue links being added on the transition screen during a transition) through a specific link type. Note: Supports all issue links other than Parent-Subtask (see |
getLinkedIssues() | List<Issue> | A list of issues linked to the current issue (including the issue links being added on the transition screen during a transition) through any regular link type |
. Note: Supports all issue links other than Parent-Subtask (see | ||
getModifiedFields() | Map<String,ModifiedValue> | Retrieve a map of issue fields that have been modified during the current transition. |
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 |
fieldNameOrID) | 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 |
getServiceDeskUrl() | String | The URL of the issue's customer request view. Only applies to Service Desk requests. Returns null otherwise. | ||
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<Issue> | 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 | |||
getUserProperty(String propertyName) | String | Returns the value of the specified User property of the user.
| ||
getUrl() | String | The URL of the issue's View screen. | ||
| 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 |
Setters
Method | Parameters | Description |
---|---|---|
setEntityProperty(String propertyName, Object value) |
| Sets the value of the specified Entity property of the issue to a JSON representation of the specified value. |
setEntityPropertyToJsonString(String propertyName, String jsonString) |
| Sets the value of the specified Entity property of the issue to the specified JSON string. |
setFieldValue(String fieldNameOrId, Object value) |
| Sets the value of a system or custom field of the Issue object |
Others
Method | Parameters | Description | ||
---|---|---|---|---|
deleteEntityProperty(String propertyName) | propertyName : A string representing the name of the Entity Property | Deletes the specified Entity property of the issue. | ||
addAvailableOption(String fieldNameorID, String value) |
| Adds the provided value as a new possible option to the mentioned field.
| ||
linkIssue(String linkTypeDirection, Issue destIssue) |
| Links the current issue to the specified issue through the specified link type direction | ||
linkIssue(String linkTypeDirection, String destIssueKey) |
| Links the current issue to the issue with the specified issue key through the specified link type direction |