@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.entity.WithId
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 ApplicationUser getAssignee()
Returns the Assignee User.
String getAssigneeId()
ApplicationUser getAssigneeUser()
Returns the Assignee User.
Collection<Attachment> getAttachments()
@Deprecated Collection<ProjectComponent> getComponentObjects()
This method is deprecated. Use getComponents(). Since v7.0
Collection<ProjectComponent> getComponents()
Timestamp getCreated()
ApplicationUser 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()
IssueType getIssueType()
Gets the IssueType for this Issue.
String getIssueTypeId()
Gets the ID of the IssueType for this Issue.
@Deprecated IssueType getIssueTypeObject()
This method is deprecated. Please use getIssueType(). Deprecated since v7.0
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 Priority getPriority()
Returns the Priority for this Issue.
@Nullable Priority getPriorityObject()
This method is deprecated. Use getPriorityObject() instead. Since v7.0
@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 ApplicationUser getReporter()
Returns the Reporter User.
String getReporterId()
ApplicationUser getReporterUser()
Returns the Reporter User.
Resolution getResolution()
Returns the Resolution for this Issue.
Timestamp getResolutionDate()
Returns the datetime that an issue was resolved on.
String getResolutionId()
@Deprecated Resolution getResolutionObject()
This method is deprecated. Use getResolution() instead. Since v7.0
GenericValue getSecurityLevel()
This method is deprecated. Use getSecurityLevelId() instead. Since v5.2.
Long getSecurityLevelId()
Returns the Security Level for this Issue.
Status getStatus()
String getStatusId()
@Deprecated Status getStatusObject()
This method is deprecated. since 7.0. Use getStatus() instead.
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 ApplicationUser 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 ApplicationUser 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

@Deprecated public Collection<ProjectComponent> getComponentObjects ()

This method is deprecated.
Use getComponents(). Since v7.0

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

public Collection<ProjectComponent> getComponents ()

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

public Timestamp getCreated ()

public ApplicationUser 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 ()

public IssueType getIssueType ()

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.

@Deprecated public IssueType getIssueTypeObject ()

This method is deprecated.
Please use getIssueType(). Deprecated since v7.0

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 Priority getPriority ()

Returns the Priority for this Issue.

Returns
  • the Priority for this Issue.

@Nullable public Priority getPriorityObject ()

This method is deprecated.
Use getPriorityObject() instead. Since v7.0

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!

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 ApplicationUser 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 ApplicationUser 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 Resolution getResolution ()

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 ()

@Deprecated public Resolution getResolutionObject ()

This method is deprecated.
Use getResolution() instead. Since v7.0

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.

public Status getStatus ()

public String getStatusId ()

@Deprecated public Status getStatusObject ()

This method is deprecated.
since 7.0. Use getStatus() instead.

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 ()