public String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, ApplicationUser value, Map displayParameters) { Map velocityParams = getVelocityParams(fieldLayoutItem, action, null, displayParameters); velocityParams.put("assignee", value != null ? value.getName() : null); return getViewHtml(velocityParams); }
public String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParameters) { Map velocityParams = getVelocityParams(fieldLayoutItem, action, issue, displayParameters); ApplicationUser assignee = issue.getAssignee(); if (assignee != null) { velocityParams.put("assignee", assignee.getName()); } else { velocityParams.put("assignee", null); } return getViewHtml(velocityParams); }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { String assigneeUserId = null; try { assigneeUserId = issue.getAssigneeId(); } catch (DataAccessException e) { log.debug("Error occurred retrieving assignee", e); } final Map<String, Object> velocityParams = getVelocityParams(getAuthenticationContext().getI18nHelper(), displayParams, issue); if (assigneeUserId != null) { velocityParams.put("assigneeUserkey", assigneeUserId); } return renderTemplate("assignee-columnview.vm", velocityParams); }
public String getBulkEditHtml(OperationContext operationContext, Action action, BulkEditBean bulkEditBean, Map displayParameters) { Map velocityParams = getVelocityParams(null, action, null, displayParameters); String currentAssigneeName = (String) operationContext.getFieldValuesHolder().get(getId()); velocityParams.put("currentAssignee", currentAssigneeName); ActionDescriptor actionDescriptor = extractActionDescriptor(bulkEditBean); final Collection<Issue> issues = getBulkEditIssues(bulkEditBean); boolean frotherAssignee = useFrotherControl(); if (frotherAssignee) { AssigneeOptions assigneeOptions = assignees.bulkOptionsForFrotherControl(issues, extractActionDescriptor(operationContext)); List<Project> projects = new ArrayList<Project>(getIssueProjects(issues)); velocityParams.put("soyRenderData", makeSoyRenderData(currentAssigneeName, assigneeOptions, projects, null, extractActionDescriptor(operationContext))); } else { velocityParams.put("assigneeOptions", assignees.bulkOptionsForHtmlSelect(issues, actionDescriptor)); } return renderTemplate("assignee-edit.vm", velocityParams); }
public String getEditHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue, Map displayParameters) { Map velocityParams = getVelocityParams(fieldLayoutItem, action, issue, displayParameters); String currentAssigneeName = (String) operationContext.getFieldValuesHolder().get(getId()); velocityParams.put("currentAssignee", currentAssigneeName); if (hasContext(operationContext, issue)) { if (useFrotherControl()) { AssigneeOptions assigneeOptions = assignees.optionsForFrotherControl(issue, extractActionDescriptor(operationContext), currentAssigneeName); List<Project> projects = Arrays.asList(issue.getProjectObject()); velocityParams.put("soyRenderData", makeSoyRenderData(currentAssigneeName, assigneeOptions, projects, issue, extractActionDescriptor(operationContext))); } else { velocityParams.put("assigneeOptions", assignees.optionsForHtmlSelect(issue, extractActionDescriptor(operationContext))); } Map<String, String> auiparams = (Map<String, String>) velocityParams.get("auiparams"); auiparams.put("controlHeaderId", "assignee-container"); return renderTemplate("assignee-edit.vm", velocityParams); } else { webResourceManager.requireResource("jira.webresources:autocomplete"); velocityParams.put("allowUnassigned", isUnassignedIssuesEnabled()); return renderTemplate("assignee-edit-no-context.vm", velocityParams); } }