@Override protected void finaliseOperation(String finalValue, IssueInputParameters parameters, ErrorCollection errors) { parameters.setAssigneeId(finalValue); }
@Override public void populateInputParams(CachingUserMapper userMapper, IssueInputParameters inputParameters, CopyIssueBean copyIssueBean, FieldLayoutItem fieldLayoutItem, Project project, IssueType issueType) { InternalMappingResult assignee = mapUser(userMapper, copyIssueBean.getAssignee(), project); switch (assignee.decision) { case FOUND: inputParameters.setAssigneeId(assignee.mappedUser.getName()); break; case NOT_FOUND: boolean unassignedAllowed = applicationProperties.getOption(APKeys.JIRA_OPTION_ALLOWUNASSIGNED); if (!unassignedAllowed) { if (hasDefaultValue(project, copyIssueBean)) { String[] defaults = defaultFieldValuesManager.getDefaultFieldValue(project.getKey(), fieldLayoutItem.getOrderableField().getId(), copyIssueBean.getTargetIssueType()); if (StringUtils.isNotBlank(defaults[0])) { inputParameters.setAssigneeId(defaults[0]); } } else { inputParameters.setAssigneeId(IssueUtils.AUTOMATIC_ASSIGNEE); } } break; } } }
private IssueInputParameters getIssueInputParameters(String projectId, String issueTypeId, String summary, ApplicationUser reporter) { final IssueInputParameters issueInputParameters = new IssueInputParametersImpl(); issueInputParameters.setProjectId(new Long(projectId)); issueInputParameters.setIssueTypeId(issueTypeId); issueInputParameters.setSummary(summary); issueInputParameters.setReporterId(reporter.getName()); issueInputParameters.setAssigneeId("-1"); issueInputParameters.setPriorityId(constantsManager.getDefaultPriorityObject().getId()); return issueInputParameters; }
issueInputParameters.setAssigneeId(rIssue.getAssignee()); issueInputParameters.setDescription(rIssue.getDescription()); issueInputParameters.setEnvironment(rIssue.getEnvironment());