com.atlassian.jira.issue
Interface MutableIssue

All Superinterfaces:
Issue, IssueContext, OfBizValueWrapper, WithId, WithKey
All Known Implementing Classes:
IssueImpl, MockIssue

@PublicApi
public interface MutableIssue
extends Issue

Facade for an issue's GenericValue. After calling any 'setter' method, you will need to call OfBizValueWrapper.store() to persist the change to the database. Note that this is a 'shallow' store - only fields directly part of the issue (in the database schema) are persisted.

See Also:
IssueManager

Field Summary
 
Fields inherited from interface com.atlassian.jira.issue.context.IssueContext
GLOBAL
 
Method Summary
 Map<String,ModifiedValue> getModifiedFields()
          Retrieve a map of issue fields whose values have been set (since object creation or last resetModifiedFields() call.
 void resetModifiedFields()
          Reset the internal list of modified fields.
 void setAffectedVersions(Collection<Version> affectedVersions)
           
 void setAssignee(com.atlassian.crowd.embedded.api.User assignee)
           
 void setAssigneeId(String assigneeId)
          Sets the user that this issue is assigned to.
 void setComponentObjects(Collection<ProjectComponent> components)
          Sets the components for this Issue.
 void setComponents(Collection<org.ofbiz.core.entity.GenericValue> components)
          Deprecated. Use setComponentObjects(java.util.Collection) instead. Since v5.0.
 void setCreated(Timestamp created)
           
 void setCustomFieldValue(CustomField customField, Object value)
          Sets a custom field value on this Issue Object, but does not write it to the database.
 void setDescription(String description)
           
 void setDueDate(Timestamp dueDate)
           
 void setEnvironment(String environment)
           
 void setEstimate(Long estimate)
           
 void setExternalFieldValue(String fieldId, Object newValue)
          This can be used bya field to "place" a custom object into the MutableIssue so that it can retrived it by key at a later point via the getModifiedFields() and Issue.getExternalFieldValue(String).
 void setExternalFieldValue(String fieldId, Object oldValue, Object newValue)
          This can be used bya field to "place" a custom object into the MutableIssue so that it can retrived it by key at a later point via the getModifiedFields() and Issue.getExternalFieldValue(String).
 void setFixVersions(Collection<Version> fixVersions)
           
 void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
          Deprecated. Use setIssueTypeObject(com.atlassian.jira.issue.issuetype.IssueType) instead. Since v5.0.
 void setIssueTypeId(String issueTypeId)
           
 void setIssueTypeObject(IssueType issueType)
          Sets the IssueType for this Issue.
 void setKey(String key)
          Deprecated. Use setProjectObject(com.atlassian.jira.project.Project) and setNumber(Long) to change issue. Since v6.1
 void setLabels(Set<Label> labels)
          Set the labels for this issue.
 void setNumber(Long number)
           
 void setOriginalEstimate(Long estimate)
           
 void setParentId(Long parentId)
          Sets the ParentId of this Issue.
 void setParentObject(Issue parentIssue)
          Sets the parent Issue Object for this Issue (subtask).
 void setPriority(org.ofbiz.core.entity.GenericValue priority)
          Deprecated. Use setPriorityObject(com.atlassian.jira.issue.priority.Priority) instead. Since v5.0.
 void setPriorityId(String priorityId)
           
 void setPriorityObject(Priority priority)
          Sets the priority for this Issue.
 void setProject(org.ofbiz.core.entity.GenericValue project)
          Deprecated. Use setProjectObject(com.atlassian.jira.project.Project) instead. Since v5.0.
 void setProjectId(Long projectId)
          Sets the project by id.
 void setProjectObject(Project project)
          Sets the Project for this Issue.
 void setReporter(com.atlassian.crowd.embedded.api.User reporter)
           
 void setReporterId(String reporterId)
          Sets the reporter in this issue.
 void setResolution(org.ofbiz.core.entity.GenericValue resolution)
          Deprecated. Use setResolutionObject(com.atlassian.jira.issue.resolution.Resolution) instead. Since v5.0.
 void setResolutionDate(Timestamp resolutionDate)
           
 void setResolutionId(String resolutionId)
           
 void setResolutionObject(Resolution resolution)
          Sets the resolution for this Issue.
 void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
          Deprecated. Use setSecurityLevelId(Long) instead. Since v5.0.
 void setSecurityLevelId(Long securityLevelId)
          Sets the SecurityLevel for this Issue.
 void setStatus(org.ofbiz.core.entity.GenericValue status)
          Deprecated. Use setStatusObject(com.atlassian.jira.issue.status.Status) instead. Since v5.0.
 void setStatusId(String statusId)
          Set issue's status by status id ("1", "2" etc).
 void setStatusObject(Status status)
          Sets the status for this Issue.
 void setSummary(String summary)
           
 void setTimeSpent(Long timespent)
           
 void setUpdated(Timestamp updated)
           
 void setVotes(Long votes)
           
 void setWatches(Long votes)
           
 void setWorkflowId(Long workflowId)
           
 
Methods inherited from interface com.atlassian.jira.issue.Issue
equals, getAffectedVersions, getAssignee, getAssigneeId, getAssigneeUser, getAttachments, getComponentObjects, getComponents, getCreated, getCreator, getCreatorId, getCustomFieldValue, getDescription, getDueDate, getEnvironment, getEstimate, getExternalFieldValue, getFixVersions, getId, getIssueRenderContext, getIssueType, getIssueTypeId, getIssueTypeObject, getKey, getLabels, getNumber, getOriginalEstimate, getParent, getParentId, getParentObject, getPriority, getPriorityObject, getProject, getProjectId, getProjectObject, getReporter, getReporterId, getReporterUser, getResolution, getResolutionDate, getResolutionId, getResolutionObject, getSecurityLevel, getSecurityLevelId, getStatus, getStatusObject, getSubTaskObjects, getSubTasks, getSummary, getTimeSpent, getUpdated, getVotes, getWatches, getWorkflowId, hashCode, isCreated, isEditable, isSubTask
 
Methods inherited from interface com.atlassian.jira.ofbiz.OfBizValueWrapper
getGenericValue, getLong, getString, getTimestamp, store
 

Method Detail

setProject

void setProject(org.ofbiz.core.entity.GenericValue project)
Deprecated. Use setProjectObject(com.atlassian.jira.project.Project) instead. Since v5.0.

Sets the Project for this Issue.

Parameters:
project - the new Project

setProjectObject

void setProjectObject(Project project)
Sets the Project for this Issue.

Parameters:
project - the new Project

setProjectId

void setProjectId(Long projectId)
                  throws IllegalArgumentException
Sets the project by id.

Parameters:
projectId - The id of the project
Throws:
IllegalArgumentException - If no project exists for the given projectId.

setIssueType

void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
Deprecated. Use setIssueTypeObject(com.atlassian.jira.issue.issuetype.IssueType) instead. Since v5.0.

Sets the IssueType for this Issue.

Parameters:
issueType - the new IssueType

setIssueTypeObject

void setIssueTypeObject(IssueType issueType)
Sets the IssueType for this Issue.

Parameters:
issueType - the new IssueType

setIssueTypeId

void setIssueTypeId(String issueTypeId)

setSummary

void setSummary(String summary)

setAssignee

void setAssignee(com.atlassian.crowd.embedded.api.User assignee)

setComponents

void setComponents(Collection<org.ofbiz.core.entity.GenericValue> components)
Deprecated. Use setComponentObjects(java.util.Collection) instead. Since v5.0.

Sets the components for this Issue.

Parameters:
components - the new components value

setComponentObjects

void setComponentObjects(Collection<ProjectComponent> components)
Sets the components for this Issue.

Parameters:
components - the new components value
Since:
v5.0

setAssigneeId

void setAssigneeId(String assigneeId)
Sets the user that this issue is assigned to. Note that this should be the userkey, not the username.

Parameters:
assigneeId - The user key.

setReporter

void setReporter(com.atlassian.crowd.embedded.api.User reporter)

setReporterId

void setReporterId(String reporterId)
Sets the reporter in this issue. Note that this should be the userkey, not the username.

Parameters:
reporterId - userkey of the desired reporter.
See Also:
setReporter(User)

setDescription

void setDescription(String description)

setEnvironment

void setEnvironment(String environment)

setAffectedVersions

void setAffectedVersions(Collection<Version> affectedVersions)
Parameters:
affectedVersions - A collection of 'affects' Version objects.

setFixVersions

void setFixVersions(Collection<Version> fixVersions)
Parameters:
fixVersions - A collection of fix-for Version objects.

setDueDate

void setDueDate(Timestamp dueDate)

setSecurityLevelId

void setSecurityLevelId(Long securityLevelId)
Sets the SecurityLevel for this Issue.

Parameters:
securityLevelId - the new SecurityLevel value

setSecurityLevel

void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
Deprecated. Use setSecurityLevelId(Long) instead. Since v5.0.

Sets the SecurityLevel for this Issue.

Parameters:
securityLevel - the new SecurityLevel value

setPriority

void setPriority(@Nullable
                 org.ofbiz.core.entity.GenericValue priority)
Deprecated. Use setPriorityObject(com.atlassian.jira.issue.priority.Priority) instead. Since v5.0.

Sets the priority for this Issue.

Parameters:
priority - the new priority value

setPriorityObject

void setPriorityObject(@Nullable
                       Priority priority)
Sets the priority for this Issue.

Parameters:
priority - the new priority value

setPriorityId

void setPriorityId(String priorityId)

setResolution

void setResolution(org.ofbiz.core.entity.GenericValue resolution)
Deprecated. Use setResolutionObject(com.atlassian.jira.issue.resolution.Resolution) instead. Since v5.0.

Sets the resolution for this Issue.

Parameters:
resolution - the new resolution value

setResolutionObject

void setResolutionObject(Resolution resolution)
Sets the resolution for this Issue.

Parameters:
resolution - the new resolution value

setKey

void setKey(String key)
Deprecated. Use setProjectObject(com.atlassian.jira.project.Project) and setNumber(Long) to change issue. Since v6.1

Parameters:
key -

setNumber

void setNumber(Long number)

setVotes

void setVotes(Long votes)

setWatches

void setWatches(Long votes)

setCreated

void setCreated(Timestamp created)

setUpdated

void setUpdated(Timestamp updated)

setResolutionDate

void setResolutionDate(Timestamp resolutionDate)

setWorkflowId

void setWorkflowId(Long workflowId)

setCustomFieldValue

void setCustomFieldValue(CustomField customField,
                         Object value)
Sets a custom field value on this Issue Object, but does not write it to the database. This is highly misleading.
To actually set a custom field value, use OrderableField.updateIssue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, MutableIssue, java.util.Map)

Parameters:
customField - the CustomField
value - the value.

setStatus

void setStatus(org.ofbiz.core.entity.GenericValue status)
Deprecated. Use setStatusObject(com.atlassian.jira.issue.status.Status) instead. Since v5.0.

Sets the status for this Issue.

Parameters:
status - the new status value

setStatusObject

void setStatusObject(Status status)
Sets the status for this Issue.

Parameters:
status - the new status value

setStatusId

void setStatusId(String statusId)
Set issue's status by status id ("1", "2" etc).

Parameters:
statusId - the new StatusId.

resetModifiedFields

void resetModifiedFields()
Reset the internal list of modified fields.

See Also:
getModifiedFields()

setOriginalEstimate

void setOriginalEstimate(Long estimate)

setTimeSpent

void setTimeSpent(Long timespent)

setEstimate

void setEstimate(Long estimate)

setExternalFieldValue

void setExternalFieldValue(String fieldId,
                           Object newValue)
This can be used bya field to "place" a custom object into the MutableIssue so that it can retrived it by key at a later point via the getModifiedFields() and Issue.getExternalFieldValue(String).

The passed in newValue will be wrapped in the ModifiedValue.getNewValue() The ModifiedValue.getOldValue() will be null.

Parameters:
fieldId - the field id to use as a key
newValue - the new value to place in a ModifiedValue

setExternalFieldValue

void setExternalFieldValue(String fieldId,
                           Object oldValue,
                           Object newValue)
This can be used bya field to "place" a custom object into the MutableIssue so that it can retrived it by key at a later point via the getModifiedFields() and Issue.getExternalFieldValue(String).

The passed in newValue will be wrapped in the ModifiedValue.getNewValue() and the oldValue will be placed in ModifiedValue.getOldValue()

Parameters:
fieldId - the field id to use as a key
oldValue - the old value to place in a ModifiedValue
newValue - the new value to place in a ModifiedValue

setParentId

void setParentId(Long parentId)
Sets the ParentId of this Issue.

Parameters:
parentId - The new parentId.
See Also:
setParentObject(Issue)

setParentObject

void setParentObject(Issue parentIssue)
Sets the parent Issue Object for this Issue (subtask).

Normally a subtask just has the ID of the parent set using setParentId(). In this case, the getParentObject() method will look up the parent object from the DB (or cache). However, when you are editing a parent and its subtask within a transaction (eg a Bulk Move), it is useful to be able to link the subtask to the pending parent object in order that it can see the new values for the parent.

Parameters:
parentIssue - the required parent Issue for this subtask.
See Also:
setParentId(Long), Issue.getParentObject()

setResolutionId

void setResolutionId(String resolutionId)

setLabels

void setLabels(Set<Label> labels)
Set the labels for this issue.

Parameters:
labels - the labels for this issue

getModifiedFields

Map<String,ModifiedValue> getModifiedFields()
Retrieve a map of issue fields whose values have been set (since object creation or last resetModifiedFields() call.

Returns:
A Map of key -> ModifiedValue pairs, where keys are defined in IssueFieldConstants and the value objects in the ModifiedValue are field-specific.


Copyright © 2002-2014 Atlassian. All Rights Reserved.