Interface Issue

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

@PublicApi public interface Issue extends OfBizValueWrapper, IssueContext, WithId, WithKey, Serializable
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 Details

    • 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!
    • 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

      IssueType getIssueType()
      Gets the IssueType for this Issue.
      Specified by:
      getIssueType in interface IssueContext
      Returns:
      The IssueType for this Issue.
    • getIssueTypeObject

      @Deprecated IssueType getIssueTypeObject()
      Deprecated.
      Please use getIssueType(). Deprecated since v7.0
      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

      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.
      Since:
      4.3
      See Also:
    • getAssignee

      @IncompatibleReturnType(since="5.0", was="com.opensymphony.user.User") 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.
    • getAssigneeId

      String getAssigneeId()
      Returns:
      a user key of the assignee
    • getComponentObjects

      @Deprecated Collection<ProjectComponent> getComponentObjects()
      Deprecated.
      Use getComponents(). Since v7.0
      Returns:
      collection of project components (as objects) that this issue is assigned to
      Since:
      4.2
    • getComponents

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

      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.
      Since:
      4.3
      See Also:
    • getReporter

      @IncompatibleReturnType(since="5.0", was="com.opensymphony.user.User") 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.
    • getReporterId

      String getReporterId()
      Returns:
      a user key of the reporter
    • getCreator

      ApplicationUser getCreator()
    • getCreatorId

      String getCreatorId()
      Returns:
      a user key of the creator
    • 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

      @Deprecated 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 Priority getPriority()
      Returns the Priority for this Issue.
      Returns:
      the Priority for this Issue.
    • getPriorityObject

      @Deprecated @Nullable Priority getPriorityObject()
      Deprecated.
      Use getPriority() instead. Since v7.0
      Returns the Priority for this Issue.
      Returns:
      the Priority for this Issue.
    • getResolutionId

      String getResolutionId()
    • getResolution

      Resolution getResolution()
      Returns the Resolution for this Issue.
      Returns:
      the Resolution for this Issue.
    • getResolutionObject

      @Deprecated Resolution getResolutionObject()
      Deprecated.
      Use getResolution() instead. Since v7.0
      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

      Status getStatus()
    • getStatusId

      String getStatusId()
    • getStatusObject

      @Deprecated Status getStatusObject()
      Deprecated.
      since 7.0. Use getStatus() instead.
    • getOriginalEstimate

      Long getOriginalEstimate()
      This is the "original estimate" of work to be performed on this issue, in seconds.
      Returns:
      the "original estimate" of work to be performed on this issue, in seconds.
    • getEstimate

      Long getEstimate()
      This is the "remaining estimate" of work left to be performed on this issue, in seconds.

      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 seconds.
    • getTimeSpent

      Long getTimeSpent()
      This is the "total time spent" working on this issue, in seconds.
      Returns:
      the "total time spent" working on this issue, in seconds.
    • 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.
    • 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
    • isArchived

      boolean isArchived()
      Returns true if issue is archived
      Returns:
      is issue archived
    • getArchivedByUser

      @ExperimentalApi ApplicationUser getArchivedByUser()
      Returns the user who archived this issue, or null if it wasn't archived.
      Returns:
      the user who archived this issue, or null if it wasn't archived.
    • getArchivedById

      @ExperimentalApi String getArchivedById()
      Returns the userid of user who archived this issue, or null if it wasn't archived.
      Returns:
      the userid of user who archived this issue, or null if it wasn't archived.
    • getArchivedDate

      @ExperimentalApi Timestamp getArchivedDate()
      Returns the timestamp when this issue was archived, or null if it wasn't archived.
      Returns:
      timestamp when this issue was archived, or null if it wasn't archived.
    • 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).
    • getGenericValue

      @Deprecated org.ofbiz.core.entity.GenericValue getGenericValue()
      Deprecated.
      Use the Data object getters instead. Since v5.0.
      Get the backing GenericValue object.
      Specified by:
      getGenericValue in interface OfBizValueWrapper
      Returns:
      the backing GenericValue object.