com.atlassian.jira.issue
Interface Issue

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

@PublicApi
public interface Issue
extends OfBizValueWrapper, IssueContext

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.


Method Summary
 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()
           
 Timestamp getCreated()
           
 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
 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 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()
           
 Priority getPriorityObject()
           
 org.ofbiz.core.entity.GenericValue getProject()
          Deprecated. please use getProjectObject (this still implicitly relies on the GV), but it is a start!
 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()
           
 Timestamp getResolutionDate()
          Returns the datetime that an issue was resolved on.
 String getResolutionId()
           
 Resolution getResolutionObject()
           
 org.ofbiz.core.entity.GenericValue getSecurityLevel()
           
 Long getSecurityLevelId()
           
 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()
           
 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()

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.

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.

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

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

getSecurityLevelId

Long getSecurityLevelId()

getPriority

@Nullable
org.ofbiz.core.entity.GenericValue getPriority()

getPriorityObject

@Nullable
Priority getPriorityObject()

getResolutionId

String getResolutionId()

getResolution

org.ofbiz.core.entity.GenericValue getResolution()

getResolutionObject

Resolution getResolutionObject()

getKey

String getKey()

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


Copyright © 2002-2012 Atlassian. All Rights Reserved.