Issue Interface

This document details the methods you can use on any Issue object, such as the one provided by the 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: 

denotes a method that is specific to JMWE

 

On this page:

 

All methods of the Issue interface:

 

Methods to access issue fields and information

Method

Description

Parameters

Return type

Method

Description

Parameters

Return type

get(String fieldNameOrID)

Returns the value of a system or custom field of the Issue object.

A string representing the field name or field Id

Depends on the field being accessed

get(String fieldNameOrID, Object defaultValue) 

Returns 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. 

  1. A string representing the field name or field Id

  2. An object representing the field default value

Depends on the field being accessed

getAffectedVersions()

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

None

Collection<Version>

getAssignee()

Returns the Assignee user, null if the issue is not assigned.

None

ApplicationUser

getAsJsonData(String fieldNameOrID) 

Returns 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.

A string representing the field name or field Id

JsonData

getAsString(String fieldNameOrID)

Same as the get method, but returns a String representation of the value of the system or custom field, whenever possible.

A string representing the field name or field Id

 

getAsString(String fieldNameOrID, String defaultValue)

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.

  1. A string representing the field name or field Id

  2. A string representing the field default value

 

getAttachments()

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

None

Collection<Attachment>

getChannel ()

Returns the channel through which the Jira Service Management request was created

None

String

getComponentObjects()

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

None

Collection<ProjectComponent>

getCreated()

Returns the timestamp of the issue creation.

None

Timestamp

getCreator()

Returns the user who created the issue.

None

ApplicationUser

getDescription()

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

None

String

getDueDate()

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

None

Timestamp

getEnvironment()

Returns the Environment of the issue, null if there is no Environment set for the issue

None

String

getEstimate()

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

None

Long


getFixVersions()

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

None

Collection<Version>

getId()

Returns the ID of the issue

None

Long

getIssueTypeId()

Returns the ID of the issue type of the issue.

None

String

getIssueType()

Returns the issue type object of the issue

None

IssueType

getKey()

Returns the key of the issue

None

String

getLabels()

Returns the labels of the issue, empty Set if no labels.

None

Set<Label>

getNumber()

Returns the issue number in the project

None

Long

getOriginalEstimate()

Returns the "original estimate" of work to be performed on this issue, in milliseconds, null if empty.

None

Long

getPriorityObject()

Returns the Priority for this Issue.

None

Priority

getProjectId()

Returns the ID of the Project for this Issue.