Package com.atlassian.jira.issue
Interface MutableIssue
- All Superinterfaces:
Issue,IssueContext,OfBizValueWrapper,Serializable,WithId,WithKey
- All Known Implementing Classes:
GenericMutableIssueWrapper,IssueImpl,MockIssue
Facade for an issue's
GenericValue. After calling any 'setter' method, you will need to call 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:
-
Field Summary
Fields inherited from interface com.atlassian.jira.issue.context.IssueContext
GLOBALFields inherited from interface com.atlassian.jira.entity.WithId
ID_COMPARATOR -
Method Summary
Modifier and TypeMethodDescriptionRetrieve a map of issue fields whose values have been set (since object creation or lastresetModifiedFields()call.voidReset the internal list of modified fields.voidsetAffectedVersions(Collection<Version> affectedVersions) voidsetArchived(boolean isArchived) voidsetAssignee(ApplicationUser assignee) voidsetAssigneeId(String assigneeId) Sets the user that this issue is assigned to.voidsetComponent(Collection<ProjectComponent> components) Sets the components for this Issue.voidsetCreated(Timestamp created) voidsetCustomFieldValue(CustomField customField, Object value) Sets a custom field value on this Issue Object, but does not write it to the database.voidsetDescription(String description) voidsetDueDate(Timestamp dueDate) voidsetEnvironment(String environment) voidsetEstimate(Long estimate) voidsetExternalFieldValue(String fieldId, Object newValue) This can be used by a field to "place" a custom object into the MutableIssue so that it can be retrieved by key at a later point via thegetModifiedFields()andIssue.getExternalFieldValue(String).voidsetExternalFieldValue(String fieldId, Object oldValue, Object newValue) This can be used bya field to "place" a custom object into the MutableIssue so that it can be retrieved by key at a later point via thegetModifiedFields()andIssue.getExternalFieldValue(String).voidsetFixVersions(Collection<Version> fixVersions) voidsetIssueType(IssueType issueType) voidsetIssueTypeId(String issueTypeId) voidsetIssueTypeObject(IssueType issueType) Sets the IssueType for this Issue.voidDeprecated.voidSet the labels for this issue.voidvoidsetOriginalEstimate(Long estimate) voidsetParentId(Long parentId) Sets the ParentId of this Issue.voidsetParentObject(Issue parentIssue) Sets the parent Issue Object for this Issue (subtask).voidsetPriority(Priority priority) Sets the priority for this Issue.voidsetPriorityId(String priorityId) Sets the priority for this Issue.voidsetPriorityObject(Priority priority) Sets the priority for this Issue.voidsetProject(org.ofbiz.core.entity.GenericValue project) Deprecated.UsesetProjectObject(com.atlassian.jira.project.Project)instead.voidsetProjectId(Long projectId) Sets the project by id.voidsetProjectObject(Project project) Sets the Project for this Issue.voidsetReporter(ApplicationUser reporter) voidsetReporterId(String reporterId) Sets the reporter in this issue.voidsetResolution(Resolution resolution) Sets the resolution for this Issue.voidsetResolutionDate(Timestamp resolutionDate) voidsetResolutionId(String resolutionId) voidsetResolutionObject(Resolution resolution) Sets the resolution for this Issue.voidsetSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel) Deprecated.UsesetSecurityLevelId(Long)instead.voidsetSecurityLevelId(Long securityLevelId) Sets the SecurityLevel for this Issue.voidSets the status for this Issue.voidsetStatusId(String statusId) Set issue's status by status id ("1", "2" etc).voidsetStatusObject(Status status) Sets the status for this Issue.voidsetSummary(String summary) voidsetTimeSpent(Long timespent) voidsetUpdated(Timestamp updated) voidvoidsetWatches(Long votes) voidsetWorkflowId(Long workflowId) voidstore()Deprecated.Use the Object's Service or Manager to save values.Methods inherited from interface com.atlassian.jira.issue.Issue
equals, getAffectedVersions, getArchivedById, getArchivedByUser, getArchivedDate, getAssignee, getAssigneeId, getAssigneeUser, getAttachments, getComponentObjects, getComponents, getCreated, getCreator, getCreatorId, getCustomFieldValue, getDescription, getDueDate, getEnvironment, getEstimate, getExternalFieldValue, getFixVersions, getGenericValue, 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, getStatusId, getStatusObject, getSubTaskObjects, getSubTasks, getSummary, getTimeSpent, getUpdated, getVotes, getWatches, getWorkflowId, hashCode, isArchived, isCreated, isEditable, isSubTaskMethods inherited from interface com.atlassian.jira.ofbiz.OfBizValueWrapper
getLong, getString, getTimestamp
-
Method Details
-
setProject
void setProject(org.ofbiz.core.entity.GenericValue project) Deprecated.UsesetProjectObject(com.atlassian.jira.project.Project)instead. Since v5.0.Sets the Project for this Issue.- Parameters:
project- the new Project
-
setProjectObject
Sets the Project for this Issue.- Parameters:
project- the new Project
-
setProjectId
Sets the project by id.- Parameters:
projectId- The id of the project- Throws:
IllegalArgumentException- If no project exists for the given projectId.
-
setIssueType
-
setIssueTypeObject
Sets the IssueType for this Issue.- Parameters:
issueType- the new IssueType
-
setIssueTypeId
-
setSummary
-
setAssignee
-
setComponent
Sets the components for this Issue.- Parameters:
components- the new components value- Since:
- v5.0
-
setAssigneeId
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
-
setReporterId
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:
-
setDescription
-
setEnvironment
-
setAffectedVersions
- Parameters:
affectedVersions- A collection of 'affects'Versionobjects.
-
setFixVersions
- Parameters:
fixVersions- A collection of fix-forVersionobjects.
-
setDueDate
-
setSecurityLevelId
Sets the SecurityLevel for this Issue.- Parameters:
securityLevelId- the new SecurityLevel value
-
setSecurityLevel
void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel) Deprecated.UsesetSecurityLevelId(Long)instead. Since v5.0.Sets the SecurityLevel for this Issue.- Parameters:
securityLevel- the new SecurityLevel value
-
setPriority
Sets the priority for this Issue.- Parameters:
priority- the new priority value
-
setPriorityObject
Sets the priority for this Issue.- Parameters:
priority- the new priority value
-
setPriorityId
Sets the priority for this Issue.- Parameters:
priorityId- the new priority value
-
setResolution
Sets the resolution for this Issue. -
setResolutionObject
Sets the resolution for this Issue.- Parameters:
resolution- the new resolution value
-
setKey
Deprecated.UsesetProjectObject(com.atlassian.jira.project.Project)andsetNumber(Long)to change issue. Since v6.1- Parameters:
key-
-
setNumber
-
setVotes
-
setWatches
-
setCreated
-
setUpdated
-
setResolutionDate
-
setWorkflowId
-
setCustomFieldValue
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, useOrderableField.updateIssue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, MutableIssue, java.util.Map)- Parameters:
customField- the CustomFieldvalue- the value.
-
setStatus
Sets the status for this Issue.- Parameters:
status- the new status value
-
setStatusObject
Sets the status for this Issue.- Parameters:
status- the new status value
-
setStatusId
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:
-
setOriginalEstimate
-
setTimeSpent
-
setEstimate
-
setExternalFieldValue
This can be used by a field to "place" a custom object into the MutableIssue so that it can be retrieved by key at a later point via thegetModifiedFields()andIssue.getExternalFieldValue(String).The passed in newValue will be wrapped in the
ModifiedValue.getNewValue()TheModifiedValue.getOldValue()will be null.- Parameters:
fieldId- the field id to use as a keynewValue- the new value to place in aModifiedValue
-
setExternalFieldValue
This can be used bya field to "place" a custom object into the MutableIssue so that it can be retrieved by key at a later point via thegetModifiedFields()andIssue.getExternalFieldValue(String).The passed in newValue will be wrapped in the
ModifiedValue.getNewValue()and the oldValue will be placed inModifiedValue.getOldValue()- Parameters:
fieldId- the field id to use as a keyoldValue- the old value to place in aModifiedValuenewValue- the new value to place in aModifiedValue
-
setParentId
Sets the ParentId of this Issue.- Parameters:
parentId- The new parentId.- See Also:
-
setParentObject
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:
-
setResolutionId
-
setArchived
void setArchived(boolean isArchived) -
setLabels
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 lastresetModifiedFields()call.- Returns:
- A Map of key -> ModifiedValue pairs, where keys are defined in
IssueFieldConstantsand the value objects in the ModifiedValue are field-specific.
-
store
Deprecated.Use the Object's Service or Manager to save values. Since v5.0. DO NOT USE THIS as it overwrites all the fields of the issue which can result in difficult to reproduce bugs Prefer to use QueryDslAccessor to change only needed fieldsPersist this issue's immediate fields. This is for internal usage only.- Specified by:
storein interfaceOfBizValueWrapper
-
setProjectObject(com.atlassian.jira.project.Project)andsetNumber(Long)to change issue.