@PublicApi public interface

Issue

implements WithId WithKey IssueContext OfBizValueWrapper
com.atlassian.jira.issue.Issue
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Main issue interface. Historically, JIRA has just passed around GenericValues describing issue records. Issue is essentially a GenericValue wrapper, with setters, getters and a store() operation for persisting changes through the underlying GenericValue.

Amongst other means, Issue objects may be obtained with getIssueObject(String), or converted using IssueFactory.

Summary

[Expand]
Inherited Fields
From interface com.atlassian.jira.issue.context.IssueContext
Public Methods
boolean equals(Object o)
For interactivity, implementations must be based on the issue key.
Collection<Version> getAffectedVersions()
@IncompatibleReturnType User getAssignee()
Returns the Assignee User.
String getAssigneeId()
User getAssigneeUser()
Returns the Assignee User.
Collection<Attachment> getAttachments()
Collection<ProjectComponent> getComponentObjects()
Collection<GenericValue> getComponents()
This method is deprecated. Use getComponentObjects() instead. Since v5.2.
Timestamp getCreated()
User getCreator()
String getCreatorId()
Object getCustomFieldValue(CustomField customField)
String getDescription()
Timestamp getDueDate()
String getEnvironment()
Long getEstimate()
This is the "remaining estimate" of work left to be performed on this issue, in milliseconds.
Object getExternalFieldValue(String fieldId)
Collection<Version> getFixVersions()
GenericValue getGenericValue()
This method is deprecated. Use the Data object getters instead. Since v5.0.
Long getId()
IssueRenderContext getIssueRenderContext()
@Deprecated GenericValue getIssueType()
This method is deprecated. Please use getIssueTypeObject(). Deprecated since v4.0
String getIssueTypeId()
Gets the ID of the IssueType for this Issue.
IssueType getIssueTypeObject()
Gets the IssueType for this Issue.
String getKey()
Set<Label> getLabels()
Returns a set of all the labels for this issue or an empty set if none exist yet.
Long getNumber()
Long getOriginalEstimate()
This is the "original estimate" of work to be performed on this issue, in milliseconds.
@Deprecated GenericValue getParent()
This method is deprecated. Use getParentObject() instead.
Long getParentId()
Issue getParentObject()
If this issue is a subtask, return its parent.
@Nullable GenericValue getPriority()
This method is deprecated. Use getPriorityObject() instead. Since v5.2.
@Nullable Priority getPriorityObject()
Returns the Priority for this Issue.
@Deprecated GenericValue getProject()
This method is deprecated. please use getProjectObject (this still implicitly relies on the GV), but it is a start!
Long getProjectId()
Gets the ID of the Project for this Issue.
Project getProjectObject()
Gets the Project for this Issue.
@IncompatibleReturnType User getReporter()
Returns the Reporter User.
String getReporterId()
User getReporterUser()
Returns the Reporter User.
GenericValue getResolution()
This method is deprecated. Use getResolutionObject() instead. Since v5.2.
Timestamp getResolutionDate()
Returns the datetime that an issue was resolved on.
String getResolutionId()
Resolution getResolutionObject()
Returns the Resolution for this Issue.
GenericValue getSecurityLevel()
This method is deprecated. Use getSecurityLevelId() instead. Since v5.2.
Long getSecurityLevelId()
Returns the Security Level for this Issue.
@Deprecated GenericValue getStatus()
This method is deprecated. since 4.2. Use getStatusObject() instead.
String getStatusId()
Status getStatusObject()
Collection<Issue> getSubTaskObjects()
Gets all the issue's subtasks.
@Deprecated Collection<GenericValue> getSubTasks()
This method is deprecated. Use getSubTaskObjects()
String getSummary()
Long getTimeSpent()
This is the "total time spent" working on this issue, in milliseconds.
Timestamp getUpdated()
Long getVotes()
Long getWatches()
Long getWorkflowId()
int hashCode()
For interactivity, implementations must be based on the hashcode of the issue key.
boolean isCreated()
boolean isEditable()
boolean isSubTask()
[Expand]
Inherited Methods
From interface com.atlassian.jira.entity.WithId
From interface com.atlassian.jira.entity.WithKey
From interface com.atlassian.jira.issue.context.IssueContext
From interface com.atlassian.jira.ofbiz.OfBizValueWrapper

Public Methods

public boolean equals (Object o)

For interactivity, implementations must be based on the issue key. See the implementation in AbstractIssue for an example.

Parameters
o the other object
Returns
  • true if the other Issue object has the same key.

public Collection<Version> getAffectedVersions ()

Returns
  • a collection of 'affects' Version objects.

@IncompatibleReturnType public User getAssignee ()

Returns the Assignee User.

Warning: previous incarnations of this method returned com.opensymphony.user.User. This class has now been removed from the JIRA API, meaning that the 5.0 version is not binary or source compatible with earlier versions.

Returns
  • the Assignee User.

public String getAssigneeId ()

public User getAssigneeUser ()

Returns the Assignee User.

If there is no assignee it returns null, else it is guaranteed to return a non-null User. If the User is no longer available, it will create a dummy User object based on the username.

Legacy synonym for getAssignee()

Returns
  • the Assignee User.
See Also

public Collection<Attachment> getAttachments ()

Returns

public Collection<ProjectComponent> getComponentObjects ()

Returns
  • collection of project components (as objects) that this issue is assigned to

public Collection<GenericValue> getComponents ()

This method is deprecated.
Use getComponentObjects() instead. Since v5.2.

Returns
  • A collection of component GenericValues.

public Timestamp getCreated ()

public User getCreator ()

public String getCreatorId ()

public Object getCustomFieldValue (CustomField customField)

Parameters
customField the CustomField
Returns
  • A custom field's value. Will be a List, User, Timestamp etc, depending on custom field type.

public String getDescription ()

public Timestamp getDueDate ()

public String getEnvironment ()

public Long getEstimate ()

This is the "remaining estimate" of work left to be performed on this issue, in milliseconds.

A better name would be getRemainingEstimate but for historical reasons it is called what it is called.

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

public Object getExternalFieldValue (String fieldId)

public Collection<Version> getFixVersions ()

Returns
  • a collection of fix-for Version objects.

public GenericValue getGenericValue ()

This method is deprecated.
Use the Data object getters instead. Since v5.0.

Get the backing GenericValue object.

Returns
  • the backing GenericValue object.

public Long getId ()

public IssueRenderContext getIssueRenderContext ()

@Deprecated public GenericValue getIssueType ()

This method is deprecated.
Please use getIssueTypeObject(). Deprecated since v4.0

Gets the IssueType for this Issue.

Returns
  • The IssueType for this Issue.

public String getIssueTypeId ()

Gets the ID of the IssueType for this Issue.

Returns
  • The ID of the IssueType for this Issue.

public IssueType getIssueTypeObject ()

Gets the IssueType for this Issue.

Returns
  • The IssueType for this Issue.

public String getKey ()

public Set<Label> getLabels ()

Returns a set of all the labels for this issue or an empty set if none exist yet.

Returns
  • a set of all the labels for this issue or an empty set if none exist yet

public Long getNumber ()

public Long getOriginalEstimate ()

This is the "original estimate" of work to be performed on this issue, in milliseconds.

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

@Deprecated public GenericValue getParent ()

This method is deprecated.
Use getParentObject() instead.

public Long getParentId ()

public Issue getParentObject ()

If this issue is a subtask, return its parent.

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

@Nullable public GenericValue getPriority ()

This method is deprecated.
Use getPriorityObject() instead. Since v5.2.

Returns the Priority for this Issue.

Returns
  • the Priority for this Issue.

@Nullable public Priority getPriorityObject ()

Returns the Priority for this Issue.

Returns
  • the Priority for this Issue.

@Deprecated public GenericValue getProject ()

This method is deprecated.
please use getProjectObject (this still implicitly relies on the GV), but it is a start!

Gets the Project for this IssueContext.

A null return value is used to represent that this context applies to all Projects.

Returns
  • The Project for this IssueContext (can be null).

public Long getProjectId ()

Gets the ID of the Project for this Issue.

Returns
  • The ID of the Project for this Issue.

public Project getProjectObject ()

Gets the Project for this Issue.

Returns
  • The Project for this Issue.

@IncompatibleReturnType public User getReporter ()

Returns the Reporter User.

Warning: previous incarnations of this method returned com.opensymphony.user.User. This class has now been removed from the JIRA API, meaning that the 5.0 version is not binary or source compatible with earlier versions.

Returns
  • the Reporter User.

public String getReporterId ()

public User getReporterUser ()

Returns the Reporter User.

This will return a non-null User object even if the User has been deleted.

Legacy synonym for getReporter().

Returns
  • the Reporter User.
See Also

public GenericValue getResolution ()

This method is deprecated.
Use getResolutionObject() instead. Since v5.2.

Returns the Resolution for this Issue.

Returns
  • the Resolution for this Issue.

public Timestamp getResolutionDate ()

Returns the datetime that an issue was resolved on. Will be null if it hasn't been resolved yet, or if an issue has been returned to the 'unresolved' state.

Returns
  • Timestamp of when an issue was resolved, or null

public String getResolutionId ()

public Resolution getResolutionObject ()

Returns the Resolution for this Issue.

Returns
  • the Resolution for this Issue.

public GenericValue getSecurityLevel ()

This method is deprecated.
Use getSecurityLevelId() instead. Since v5.2.

Returns the Security Level for this Issue.

Returns
  • the Security Level for this Issue.

public Long getSecurityLevelId ()

Returns the Security Level for this Issue.

Returns
  • the Security Level for this Issue.

@Deprecated public GenericValue getStatus ()

This method is deprecated.
since 4.2. Use getStatusObject() instead.

public String getStatusId ()

public Status getStatusObject ()

public Collection<Issue> getSubTaskObjects ()

Gets all the issue's subtasks.

Returns

@Deprecated public Collection<GenericValue> getSubTasks ()

This method is deprecated.
Use getSubTaskObjects()

public String getSummary ()

public Long getTimeSpent ()

This is the "total time spent" working on this issue, in milliseconds.

Returns
  • the "total time spent" working on this issue, in milliseconds.

public Timestamp getUpdated ()

public Long getVotes ()

public Long getWatches ()

public Long getWorkflowId ()

public int hashCode ()

For interactivity, implementations must be based on the hashcode of the issue key. See the implementation in AbstractIssue for an example.

Returns
  • the Hashcode of the issue key (or 0 for null).

public boolean isCreated ()

public boolean isEditable ()

public boolean isSubTask ()