com.atlassian.jira.issue
Interface Issue

All Superinterfaces:
IssueContext, OfBizValueWrapper, WithId, WithKey
All Known Subinterfaces:
MutableIssue
All Known Implementing Classes:
AbstractIssue, DocumentIssueImpl, IssueImpl, MockIssue, TemplateIssue

@PublicApi
public interface Issue
extends OfBizValueWrapper, IssueContext, WithId, WithKey

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

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


Field Summary
 
Fields inherited from interface com.atlassian.jira.issue.context.IssueContext
GLOBAL
 
Method Summary
 boolean equals(Object o)
          For interactivity, implementations must be based on the issue key.
 Collection<Version> getAffectedVersions()
           
 com.atlassian.crowd.embedded.api.User getAssignee()
          Returns the Assignee User.
 String getAssigneeId()
           
 com.atlassian.crowd.embedded.api.User getAssigneeUser()
          Returns the Assignee User.
 Collection<Attachment> getAttachments()
           
 Collection<ProjectComponent> getComponentObjects()
           
 Collection<org.ofbiz.core.entity.GenericValue> getComponents()
          Deprecated. Use getComponentObjects() instead. Since v5.2.
 Timestamp getCreated()
           
 com.atlassian.crowd.embedded.api.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()
           
 Long getId()
           
 IssueRenderContext getIssueRenderContext()
           
 org.ofbiz.core.entity.GenericValue getIssueType()
          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.
 org.ofbiz.core.entity.GenericValue getParent()
          Deprecated. Use getParentObject() instead.
 Long getParentId()
           
 Issue getParentObject()
          If this issue is a subtask, return its parent.
 org.ofbiz.core.entity.GenericValue getPriority()
          Deprecated. Use getPriorityObject() instead. Since v5.2.
 Priority getPriorityObject()
          Returns the Priority for this Issue.
 org.ofbiz.core.entity.GenericValue getProject()
          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.
 com.atlassian.crowd.embedded.api.User getReporter()
          Returns the Reporter User.
 String getReporterId()
           
 com.atlassian.crowd.embedded.api.User getReporterUser()
          Returns the Reporter User.
 org.ofbiz.core.entity.GenericValue getResolution()
          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.
 org.ofbiz.core.entity.GenericValue getSecurityLevel()
          Deprecated. Use getSecurityLevelId() instead. Since v5.2.
 Long getSecurityLevelId()
          Returns the Security Level for this Issue.
 org.ofbiz.core.entity.GenericValue getStatus()
          Deprecated. since 4.2. Use getStatusObject() instead.
 Status getStatusObject()
           
 Collection<Issue> getSubTaskObjects()
          Gets all the issue's subtasks.
 Collection<org.ofbiz.core.entity.GenericValue> getSubTasks()
          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()
           
 
Methods inherited from interface com.atlassian.jira.ofbiz.OfBizValueWrapper
getGenericValue, getLong, getString, getTimestamp, store
 

Method Detail

getId

Long getId()
Specified by:
getId in interface WithId
Returns:
the unique id of the entity.

getProject

@Deprecated
org.ofbiz.core.entity.GenericValue getProject()
Deprecated. please use getProjectObject (this still implicitly relies on the GV), but it is a start!

Description copied from interface: IssueContext
Gets the Project for this IssueContext.

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

Specified by:
getProject in interface IssueContext
Returns:
The Project for this IssueContext (can be null).

getProjectObject

Project getProjectObject()
Gets the Project for this Issue.

Specified by:
getProjectObject in interface IssueContext
Returns:
The Project for this Issue.

getProjectId

Long getProjectId()
Gets the ID of the Project for this Issue.

Specified by:
getProjectId in interface IssueContext
Returns:
The ID of the Project for this Issue.

getIssueType

@Deprecated
org.ofbiz.core.entity.GenericValue getIssueType()
Deprecated. Please use getIssueTypeObject(). Deprecated since v4.0

Gets the IssueType for this Issue.

Specified by:
getIssueType in interface IssueContext
Returns:
The IssueType for this Issue.

getIssueTypeObject

IssueType getIssueTypeObject()
Gets the IssueType for this Issue.

Specified by:
getIssueTypeObject in interface IssueContext
Returns:
The IssueType for this Issue.

getIssueTypeId

String getIssueTypeId()
Gets the ID of the IssueType for this Issue.

Specified by:
getIssueTypeId in interface IssueContext
Returns:
The ID of the IssueType for this Issue.

getSummary

String getSummary()

getAssigneeUser

com.atlassian.crowd.embedded.api.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.
Since:
4.3
See Also:
getAssignee()

getAssignee

@IncompatibleReturnType(since="5.0",
                        was="com.opensymphony.user.User")
com.atlassian.crowd.embedded.api.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.

getAssigneeId

String getAssigneeId()

getComponents

Collection<org.ofbiz.core.entity.GenericValue> getComponents()
Deprecated. Use getComponentObjects() instead. Since v5.2.

Returns:
A collection of component GenericValues.

getComponentObjects

Collection<ProjectComponent> getComponentObjects()
Returns:
collection of project components (as objects) that this issue is assigned to
Since:
4.2

getReporterUser

com.atlassian.crowd.embedded.api.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.
Since:
4.3
See Also:
getReporter()

getReporter

@IncompatibleReturnType(since="5.0",
                        was="com.opensymphony.user.User")
com.atlassian.crowd.embedded.api.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.

getReporterId

String getReporterId()

getCreator

com.atlassian.crowd.embedded.api.User getCreator()

getCreatorId

String getCreatorId()

getDescription

String getDescription()

getEnvironment

String getEnvironment()

getAffectedVersions

Collection<Version> getAffectedVersions()
Returns:
a collection of 'affects' Version objects.

getFixVersions

Collection<Version> getFixVersions()
Returns:
a collection of fix-for Version objects.

getDueDate

Timestamp getDueDate()

getSecurityLevel

org.ofbiz.core.entity.GenericValue getSecurityLevel()
Deprecated. Use getSecurityLevelId() instead. Since v5.2.

Returns the Security Level for this Issue.

Returns:
the Security Level for this Issue.

getSecurityLevelId

Long getSecurityLevelId()
Returns the Security Level for this Issue.

Returns:
the Security Level for this Issue.

getPriority

@Nullable
org.ofbiz.core.entity.GenericValue getPriority()
Deprecated. Use getPriorityObject() instead. Since v5.2.

Returns the Priority for this Issue.

Returns:
the Priority for this Issue.

getPriorityObject

@Nullable
Priority getPriorityObject()
Returns the Priority for this Issue.

Returns:
the Priority for this Issue.

getResolutionId

String getResolutionId()

getResolution

org.ofbiz.core.entity.GenericValue getResolution()
Deprecated. Use getResolutionObject() instead. Since v5.2.

Returns the Resolution for this Issue.

Returns:
the Resolution for this Issue.

getResolutionObject

Resolution getResolutionObject()
Returns the Resolution for this Issue.

Returns:
the Resolution for this Issue.

getKey

String getKey()
Specified by:
getKey in interface WithKey
Returns:
the entity key.

getNumber

Long getNumber()

getVotes

Long getVotes()

getWatches

Long getWatches()

getCreated

Timestamp getCreated()

getUpdated

Timestamp getUpdated()

getResolutionDate

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

getWorkflowId

Long getWorkflowId()

getCustomFieldValue

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.

getStatus

@Deprecated
org.ofbiz.core.entity.GenericValue getStatus()
Deprecated. since 4.2. Use getStatusObject() instead.


getStatusObject

Status getStatusObject()

getOriginalEstimate

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.

getEstimate

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.

getTimeSpent

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.

getExternalFieldValue

Object getExternalFieldValue(String fieldId)

isSubTask

boolean isSubTask()

getParentId

Long getParentId()

isCreated

boolean isCreated()

getParentObject

Issue getParentObject()
If this issue is a subtask, return its parent.

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

getParent

@Deprecated
org.ofbiz.core.entity.GenericValue getParent()
Deprecated. Use getParentObject() instead.


getSubTasks

@Deprecated
Collection<org.ofbiz.core.entity.GenericValue> getSubTasks()
Deprecated. Use getSubTaskObjects()


getSubTaskObjects

Collection<Issue> getSubTaskObjects()
Gets all the issue's subtasks.

Returns:
A collection of MutableIssues

isEditable

boolean isEditable()

getIssueRenderContext

IssueRenderContext getIssueRenderContext()

getAttachments

Collection<Attachment> getAttachments()
Returns:
A collection of Attachment objects

getLabels

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

equals

boolean equals(Object o)
For interactivity, implementations must be based on the issue key. See the implementation in AbstractIssue for an example.

Overrides:
equals in class Object
Parameters:
o - the other object
Returns:
true if the other Issue object has the same key.

hashCode

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

Overrides:
hashCode in class Object
Returns:
the Hashcode of the issue key (or 0 for null).


Copyright © 2002-2014 Atlassian. All Rights Reserved.