public void removeValueFromIssueObject(MutableIssue issue) { issue.setAssignee(null); }
public void execute(Map transientVars, Map args, PropertySet ps) { MutableIssue issue = (MutableIssue) transientVars.get("issue"); String assignee = (String) transientVars.get("assignee"); if (TextUtils.stringSet(assignee)) issue.setAssigneeId(assignee); else issue.setAssignee(null); } }
public void execute(Map transientVars, Map args, PropertySet ps) { MutableIssue issue = (MutableIssue) transientVars.get("issue"); issue.setAssignee(issue.getReporter()); // JRA-15120: issue.store() should never have been called in this function, as it can cause the Issue object // to be persisted to the database prematurely. However, since it has been here for a while, removing it could // break existing functionality for lots of users. But, because an NPE is only thrown when this function is used // in the Create step, all we have to do to prevent this error from occuring is check if the issue has already // been stored before. If it has, we can call store() to update the issue, which maintains working (albeit // incorrect) behaviour. If it hasn't, we defer the store() call, as it should have been implemented initially. if (issue.isCreated()) { issue.store(); } } }
public void updateIssue(FieldLayoutItem fieldLayoutItem, MutableIssue issue, Map fieldValueHolder) { if (fieldValueHolder.containsKey(getId())) { boolean addToHistory = true; ApplicationUser assignee = getValueFromParams(fieldValueHolder); if (assignee == null && AUTOMATIC_ASSIGNEE.equals(fieldValueHolder.get(getId()))) { assignee = assigneeResolver.getDefaultAssigneeObject(issue, fieldValueHolder); addToHistory = false; } issue.setAssignee(assignee); if (addToHistory) { addToUsedUserHistoryIfValueChanged(issue); } } }
public void execute(Map transientVars, Map args, PropertySet ps) { final MutableIssue issue = getIssue(transientVars); final ApplicationUser currentUser = getCallerUser(transientVars, args); final PermissionManager permissionManager = getPermissionManager(); //Check that there's as a logged in user and that the user has both the assign issue and assignable // user permission. if (currentUser != null && permissionManager.hasPermission(Permissions.ASSIGNABLE_USER, issue, currentUser)) { issue.setAssignee(currentUser); } }
issue.setAssignee(lead);