public String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, GenericValue value, Map displayParameters) { Map velocityParams = getVelocityParams(fieldLayoutItem, action, null, displayParameters); velocityParams.put("security", value); return getViewHtml(velocityParams); }
public String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParameters) { Map velocityParams = getVelocityParams(fieldLayoutItem, action, issue, displayParameters); velocityParams.put("security", issue.getSecurityLevel()); return getViewHtml(velocityParams); }
public String getEditHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue, Map displayParameters) { Map velocityParams = getVelocityParams(fieldLayoutItem, action, issue, displayParameters); if (issue.isSubTask()) { // Users can't set the Security Level of a subtask directly, show a read-only messsage. velocityParams.put("infoMessageKey", "bulk.edit.security.level.subtask.message"); return renderTemplate("securitylevel-subtask.vm", velocityParams); } String securityLevelId = (String) operationContext.getFieldValuesHolder().get(getId()); if (securityLevelId != null) { velocityParams.put(getId(), Long.valueOf(securityLevelId)); } velocityParams.put("securityLevels", getSecurityLevelsForLoggedInUser(issue)); velocityParams.put("noneLevelId", NO_SECURITY_LEVEL_ID); return renderTemplate("securitylevel-edit.vm", velocityParams); }
public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue) { Map<String, Object> velocityParams = getVelocityParams(getAuthenticationContext().getI18nHelper(), displayParams, issue); velocityParams.put(getId(), issue.getSecurityLevel()); return renderTemplate("securitylevel-columnview.vm", velocityParams); }
public String getBulkEditHtml(OperationContext operationContext, Action action, BulkEditBean bulkEditBean, Map displayParameters) { Map velocityParams = getVelocityParams(null, action, null, displayParameters); //JRA-13990 Subtasks must take the parent's Security Level, so show a message instead of an editable field. //JRA-13245 When doing issue->subtask conversion the Security Level is also taken from the new parent, so only show a message. if (bulkEditBean.isSubTaskOnly() || bulkEditBean.getParentIssueObject() != null) { velocityParams.put("infoMessageKey", "bulk.edit.security.level.subtask.message"); return renderTemplate("securitylevel-subtask.vm", velocityParams); } String securityLevelId = (String) operationContext.getFieldValuesHolder().get(getId()); if (securityLevelId != null) { velocityParams.put(getId(), Long.valueOf(securityLevelId)); } /* A bulk move will use the target project for getting the possible security levels whlie a bulk transition will use the selected issues.*/ if (bulkEditBean.getTargetProject() != null) { velocityParams.put("securityLevels", getUserSecurityLevelsForProject(bulkEditBean.getTargetProject())); } else { velocityParams.put("securityLevels", getUserSecurityLevels(bulkEditBean.getSelectedIssues())); } velocityParams.put("noneLevelId", NO_SECURITY_LEVEL_ID); return renderTemplate("securitylevel-edit.vm", velocityParams); }