| | |
| | | |
| | | Workspace workspace = this.workspaceService.getWorkspace(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); // 이슈를 넣으려는 업무 공간 |
| | | // 이슈의 주요 속성을 map 에 저장하여 엑셀 import 에서 지정한 대상(이슈 속성)을 빠르게 찾을 수 있게 한다. |
| | | this.IssueAttributeMapToList(priorityMaps, severityMaps, departmentMaps, customFieldMaps, issueTypeCustomFieldMaps); |
| | | this.IssueAttributeMapToList(issueForm, priorityMaps, severityMaps, departmentMaps, customFieldMaps, issueTypeCustomFieldMaps); |
| | | // 0.237 - 0.230 |
| | | |
| | | List<IssueForm> issueForms = Lists.newArrayList(); |
| | |
| | | issue.setIssueType(issueType); |
| | | issue.setProject(project); |
| | | issue.setIssueNumber(issueNumber); |
| | | issue.setParentIssue(this.getIssue(saveIssueForm.getParentIssueId())); |
| | | if (saveIssueForm.getParentIssueId() != null && saveIssueForm.getParentIssueId() > -1) { |
| | | issue.setParentIssue(this.getIssue(saveIssueForm.getParentIssueId())); |
| | | } |
| | | |
| | | issue = this.issueRepository.saveAndFlush(issue); |
| | | |
| | |
| | | issueDepartment.setWorkspace(workspace); |
| | | |
| | | List<Long> departmentsIds = this.workflowDepartmentService.findFirstDepartmentIds(workflow); |
| | | for (Long departmentId : departmentsIds) { |
| | | issueDepartment.setDepartment(this.departmentService.getDepartment(departmentId)); |
| | | if (departmentsIds != null && departmentsIds.size() > 0) { |
| | | for (Long departmentId : departmentsIds) { |
| | | issueDepartment.setDepartment(this.departmentService.getDepartment(departmentId)); |
| | | } |
| | | issue.addIssueDepartment(issueDepartment); |
| | | } |
| | | issue.addIssueDepartment(issueDepartment); |
| | | |
| | | saveIssueForm.setIssueStatusId(issueStatus.getId()); |
| | | } |
| | |
| | | } |
| | | |
| | | // 이슈의 주요 속성을 map 에 저장하여 엑셀 import 에서 지정한 대상(이슈 속성)을 빠르게 찾을 수 있게 한다. |
| | | private void IssueAttributeMapToList(Map<String, Priority> priorityMaps, Map<String, Severity> severityMaps, |
| | | private void IssueAttributeMapToList(IssueForm issueForm, Map<String, Priority> priorityMaps, Map<String, Severity> severityMaps, |
| | | Map<String, DepartmentVo> departmentMaps, Map<String, CustomField> customFieldMaps,Map<String, Long> issueTypeCustomFieldMaps) { |
| | | |
| | | Project project = this.projectService.getProject(issueForm.getProjectId()); |
| | | |
| | | for (IssueTypeCustomField issueTypeCustomField : project.getIssueTypeCustomFields()) { |
| | | // 빠르게 찾기 위해 이슈 타입 아이디 + 사용자 정의 필드 아이디를 키로 한다. |
| | | String makeKey = issueTypeCustomField.getIssueType().getId().toString() + issueTypeCustomField.getCustomField().getId().toString(); |
| | | issueTypeCustomFieldMaps.put(makeKey, issueTypeCustomField.getId()); |
| | | } |
| | | |
| | | // 우선순위를 바로 찾을 수 있게 준비 |
| | | List<Priority> priorities = this.priorityService.findByWorkspaceId(); |
| | |
| | | |
| | | // 값이 공백이면 중지 |
| | | String cellValue = CommonUtil.convertExcelStringToCell(cell); |
| | | if (StringUtils.isEmpty(cellValue)) { |
| | | if (StringUtils.isEmpty(cellValue) || !cell.toString().equals("null")) { |
| | | return; |
| | | } |
| | | |