public MutableIssue getIssue(final GenericValue issueGV) { return new IssueImpl(issueGV, issueManager, projectManager, versionManager, issueSecurityLevelManager, constantsManager, subTaskManager, attachmentManager, labelManager, projectComponentManager, userManager, jiraAuthenticationContext); }
public void setAffectedVersions(Collection<Version> affectedVersions) { ModifiedValue modifiedValue = new ModifiedValue(getAffectedVersions(), affectedVersions); this.affectedVersions = affectedVersions; modifiedFields.put(IssueFieldConstants.AFFECTED_VERSIONS, modifiedValue); }
public void setAssignee(ApplicationUser assignee) { ModifiedValue modifiedValue = new ModifiedValue(getAssignee(), assignee); this.assignee = assignee; modifiedFields.put(IssueFieldConstants.ASSIGNEE, modifiedValue); if (assignee != null) { assigneeId = ApplicationUsers.getKeyFor(assignee); } else { assigneeId = null; } updateGV(IssueFieldConstants.ASSIGNEE, assigneeId); }
public void setDescription(String description) { ModifiedValue modifiedValue = new ModifiedValue(getDescription(), description); this.description = description; modifiedFields.put(IssueFieldConstants.DESCRIPTION, modifiedValue); updateGV(IssueFieldConstants.DESCRIPTION, description); }
setAffectedVersions(issue.getAffectedVersions()); setFixVersions(issue.getFixVersions()); setComponent(issue.getComponentObjects()); setLabels(issue.getLabels()); copyValuesFromGV(issue.getGenericValue()); copyValuesFromIssue(issue); setParentId(issue.getParentId()); initializeKey();
if (!isCreated()) creatorId = getLoggedInUserKey(); copyValuesFromGV(genericValue);
copyValuesFromGV(genericValue); initializeKey();
reporterId = issue.getReporterId(); creatorId = issue.getCreatorId(); dueDate = copyTimestampOrNullIfUnset(issue.getDueDate()); securityLevelId = issue.getSecurityLevelId(); final Priority priorityObject = issue.getPriorityObject(); statusId = (statusObject != null) ? statusObject.getId() : null; resolutionId = issue.getResolutionId(); created = copyTimestampOrNullIfUnset(issue.getCreated()); updated = copyTimestampOrNullIfUnset(issue.getUpdated()); resolutionDate = copyTimestampOrNullIfUnset(issue.getResolutionDate()); originalEstimate = issue.getOriginalEstimate(); estimate = issue.getEstimate(); timespent = issue.getTimeSpent(); votes = returnZeroIfNull(issue.getVotes()); watches = issue.getWatches();
public Collection<ProjectComponent> getComponentObjects() { return getComponents(); }
public ApplicationUser getAssigneeUser() { return getAssignee(); }
@Override public void setComponent(Collection<ProjectComponent> components) { ModifiedValue modifiedValue = new ModifiedValue(getComponentObjects(), components); this.components = components; modifiedFields.put(IssueFieldConstants.COMPONENTS, modifiedValue); }
public void setCustomFieldValue(CustomField customField, Object value) { ModifiedValue modifiedValue = new ModifiedValue(getCustomFieldValue(customField), value); customFieldValues.put(customField, value); modifiedFields.put(customField.getId(), modifiedValue); }
public MutableIssue cloneIssue(final Issue issue) { return new IssueImpl(issue, issueManager, projectManager, versionManager, issueSecurityLevelManager, constantsManager, subTaskManager, attachmentManager, labelManager, projectComponentManager, userManager, jiraAuthenticationContext); }
public MutableIssue cloneIssueNoParent(final Issue issue) { final IssueImpl clonedIssue = new IssueImpl((GenericValue) issue.getGenericValue().clone(), issueManager, projectManager, versionManager, issueSecurityLevelManager, constantsManager, subTaskManager, attachmentManager, labelManager, projectComponentManager, userManager, jiraAuthenticationContext); clonedIssue.hasNoParentId = true; return clonedIssue; } }
public void addIssue(GenericValue issueGV) { addIssue(new IssueImpl(issueGV, this, new MockProjectManager(), null, null, null, null, null, null, null, null, null)); }
public static MutableIssue createIssue(Long id) { GenericValue gv = new MockGenericValue("Issue"); gv.set("id", id); gv.set("key", "HSP-" + id); gv.set(IssueFieldConstants.ISSUE_NUMBER, id); return new IssueImpl(gv, issueManager, projectManager, versionManager, issueSecurityLevelManager, constantsManager, subTaskManager, attachmentManager, labelManager, projectComponentManager, userManager, jiraAuthenticationContext); }
public static MutableIssue createIssue(long id, String key, long projectId) { GenericValue gv = new MockGenericValue("Issue"); gv.set("id", id); gv.set("key", key); gv.set(IssueFieldConstants.ISSUE_NUMBER, id); gv.set(IssueFieldConstants.PROJECT, projectId); return new IssueImpl(gv, issueManager, projectManager, versionManager, issueSecurityLevelManager, constantsManager, subTaskManager, attachmentManager, labelManager, projectComponentManager, userManager, jiraAuthenticationContext); }
private MutableIssue getIssueObject(final GenericValue issueGV) { return new IssueImpl(issueGV, this, MockIssueFactory.getProjectManager(), MockIssueFactory.getVersionManager(), MockIssueFactory.getIssueSecurityLevelManager(), MockIssueFactory.getConstantsManager(), MockIssueFactory.getSubTaskManager(), MockIssueFactory.getAttachmentManager(), MockIssueFactory.getLabelManager(), MockIssueFactory.getProjectComponentManager(), MockIssueFactory.getUserManager(), MockIssueFactory.getJiraAuthenticationContext()); }
public MutableIssue getIssueObject(String key) throws DataAccessException { final Issue movedIssue = findMovedIssue(key); if (movedIssue != null) { return (MutableIssue) movedIssue; } Issue issue = null; for (Issue i : issues.values()) { if (key.equals(i.getKey())) { issue = i; break; } } if (issue == null) { return null; } // By contract we must return a new instance each time. return new IssueImpl(issue.getGenericValue(), this, MockIssueFactory.getProjectManager(), MockIssueFactory.getVersionManager(), MockIssueFactory.getIssueSecurityLevelManager(), MockIssueFactory.getConstantsManager(), MockIssueFactory.getSubTaskManager(), MockIssueFactory.getAttachmentManager(), MockIssueFactory.getLabelManager(), MockIssueFactory.getProjectComponentManager(), MockIssueFactory.getUserManager(), MockIssueFactory.getJiraAuthenticationContext()); }