@PublicApi public interface MutableIssue extends Issue
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.IssueManager
GLOBAL
ID_COMPARATOR
Modifier and Type | Method and Description |
---|---|
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 |
setArchived(boolean isArchived) |
void |
setAssignee(ApplicationUser assignee) |
void |
setAssigneeId(String assigneeId)
Sets the user that this issue is assigned to.
|
void |
setComponent(Collection<ProjectComponent> components)
Sets the components for this Issue.
|
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 by a field to "place" a custom object into the MutableIssue so that it can be retrieved 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 be retrieved by key at
a later point via the
getModifiedFields() and Issue.getExternalFieldValue(String) . |
void |
setFixVersions(Collection<Version> fixVersions) |
void |
setIssueType(IssueType issueType) |
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(Priority priority)
Sets the priority for this Issue.
|
void |
setPriorityId(String priorityId)
Sets the priority for this Issue.
|
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(ApplicationUser reporter) |
void |
setReporterId(String reporterId)
Sets the reporter in this issue.
|
void |
setResolution(Resolution resolution)
Sets the resolution for this Issue.
|
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(Status status)
Sets the status for this Issue.
|
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) |
void |
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 fields
|
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, isSubTask
getLong, getString, getTimestamp
void setProject(org.ofbiz.core.entity.GenericValue project)
setProjectObject(com.atlassian.jira.project.Project)
instead. Since v5.0.project
- the new Projectvoid setProjectObject(Project project)
project
- the new Projectvoid setProjectId(Long projectId) throws IllegalArgumentException
projectId
- The id of the projectIllegalArgumentException
- If no project exists for the given projectId.void setIssueType(IssueType issueType)
void setIssueTypeObject(IssueType issueType)
issueType
- the new IssueTypevoid setIssueTypeId(String issueTypeId)
void setSummary(String summary)
void setAssignee(ApplicationUser assignee)
void setComponent(Collection<ProjectComponent> components)
components
- the new components valuevoid setAssigneeId(String assigneeId)
assigneeId
- The user key.void setReporter(ApplicationUser reporter)
void setReporterId(String reporterId)
reporterId
- userkey of the desired reporter.setReporter(ApplicationUser)
void setDescription(String description)
void setEnvironment(String environment)
void setAffectedVersions(Collection<Version> affectedVersions)
affectedVersions
- A collection of 'affects' Version
objects.void setFixVersions(Collection<Version> fixVersions)
fixVersions
- A collection of fix-for Version
objects.void setDueDate(Timestamp dueDate)
void setSecurityLevelId(Long securityLevelId)
securityLevelId
- the new SecurityLevel valuevoid setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
setSecurityLevelId(Long)
instead. Since v5.0.securityLevel
- the new SecurityLevel valuevoid setPriority(@Nullable Priority priority)
priority
- the new priority valuevoid setPriorityObject(@Nullable Priority priority)
priority
- the new priority valuevoid setPriorityId(String priorityId)
priorityId
- the new priority valuevoid setResolution(Resolution resolution)
void setResolutionObject(Resolution resolution)
resolution
- the new resolution valuevoid setKey(String key)
setProjectObject(com.atlassian.jira.project.Project)
and setNumber(Long)
to change issue. Since v6.1key
- void setNumber(Long number)
void setVotes(Long votes)
void setWatches(Long votes)
void setCreated(Timestamp created)
void setUpdated(Timestamp updated)
void setResolutionDate(Timestamp resolutionDate)
void setWorkflowId(Long workflowId)
void setCustomFieldValue(CustomField customField, Object value)
OrderableField.updateIssue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem,
MutableIssue, java.util.Map)
customField
- the CustomFieldvalue
- the value.void setStatus(Status status)
status
- the new status valuevoid setStatusObject(Status status)
status
- the new status valuevoid setStatusId(String statusId)
statusId
- the new StatusId.void resetModifiedFields()
getModifiedFields()
void setOriginalEstimate(Long estimate)
void setTimeSpent(Long timespent)
void setEstimate(Long estimate)
void setExternalFieldValue(String fieldId, Object newValue)
getModifiedFields()
and Issue.getExternalFieldValue(String)
.
The passed in newValue will be wrapped in the ModifiedValue.getNewValue()
The ModifiedValue.getOldValue()
will be null.
fieldId
- the field id to use as a keynewValue
- the new value to place in a ModifiedValue
void setExternalFieldValue(String fieldId, Object oldValue, Object newValue)
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()
fieldId
- the field id to use as a keyoldValue
- the old value to place in a ModifiedValue
newValue
- the new value to place in a ModifiedValue
void setParentId(Long parentId)
parentId
- The new parentId.setParentObject(Issue)
void setParentObject(Issue parentIssue)
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.
parentIssue
- the required parent Issue for this subtask.setParentId(Long)
,
Issue.getParentObject()
void setResolutionId(String resolutionId)
void setArchived(boolean isArchived)
void setLabels(Set<Label> labels)
labels
- the labels for this issueMap<String,ModifiedValue> getModifiedFields()
resetModifiedFields()
call.IssueFieldConstants
and the value
objects in the ModifiedValue are field-specific.@Internal @Deprecated void store()
store
in interface OfBizValueWrapper
Copyright © 2002-2021 Atlassian. All Rights Reserved.