- Excel Import 기능 담당부서도 들어가게 하기(기간 미지정 시에도 가능하도록 수정)
- 이슈 통합검색 키워드에 업체,ISP,호스팅 정보도 포함
- 프로젝트에서 설정한 이슈유형만 보여주기
| | |
| | | Map<String, Priority> priorityMaps = new HashMap<>(); // 우선 순위 모음 |
| | | Map<String, Severity> severityMaps = new HashMap<>(); // 중요도 모음 |
| | | Map<String, Object> userMaps = new HashMap<>(); // 사용자 모음 |
| | | Map<String, Object> departmentMaps = new HashMap<>(); // 부서 모음 |
| | | Map<String, DepartmentVo> departmentMaps = new HashMap<>(); // 부서 모음 |
| | | Map<String, CustomField> customFieldMaps = new HashMap<>(); |
| | | Map<String, IssueStatus> issueStatusReadyMaps = new HashMap<>(); // 상태 속성 '대기'인 이슈 상태 |
| | | Map<Long, Long> issueNumberMaps = new HashMap<>(); // 이슈 번호 모음 |
| | |
| | | // 1번 헤더부터 데이터 영역 |
| | | if (rowIndex > 1) { |
| | | // 이슈로 등록하기 위해 IssueForm 에 데이터를 셋팅한다. |
| | | issueForms.add(this.setIssueFormToExcelField(row, (rowIndex + 1), issueStatusReadyMaps, projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, customFieldMaps, issueNumberMaps, headers)); |
| | | issueForms.add(this.setIssueFormToExcelField(row, (rowIndex + 1), issueStatusReadyMaps, projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, departmentMaps, customFieldMaps, issueNumberMaps, headers)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | // 이슈의 주요 속성을 map 에 저장하여 엑셀 import 에서 지정한 대상(이슈 속성)을 빠르게 찾을 수 있게 한다. |
| | | private void IssueAttributeMapToList(Map<String, Project> projectMaps, Map<String, IssueType> issueTypeMaps, Map<String, Priority> priorityMaps, Map<String, Severity> severityMaps, |
| | | Map<String, Object> userMaps, Map<String, Object> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) { |
| | | Map<String, Object> userMaps, Map<String, DepartmentVo> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) { |
| | | // 프로젝트 키로 바로 찾을 수 있게 준비 |
| | | List<Project> projects = this.projectService.findByWorkspaceId(); |
| | | List<Long> projectIds = Lists.newArrayList(); |
| | |
| | | for (Map<String, Object> user : users) { |
| | | userMap.put(CommonUtil.decryptAES128(MapUtil.getString(user, "account")), MapUtil.getLong(user, "userId")); |
| | | } |
| | | |
| | | userMaps.put(project.getProjectKey(), userMap); |
| | | |
| | | // 프로젝트에 참여하는 부서 정보 |
| | | List<Map<String, Object>> departments = this.departmentService.findProjectDepartment(project); |
| | | List<Long> departmentList = Lists.newArrayList(); |
| | | // 부서 정보를 저장 |
| | | for (Map<String, Object> department : departments) { |
| | | departmentList.add(MapUtil.getLong(department, "departmentId")); |
| | | } |
| | | } |
| | | |
| | | // 이슈 유형을 바로 찾을 수 있게 준비 |
| | |
| | | |
| | | IssueStatus issueStatus = this.issueStatusService.findByIssueStatusTypeIsReady(issueType.getWorkflow()); |
| | | issueStatusReadyMaps.put(issueType.getId().toString(), issueStatus); |
| | | |
| | | // 워크플로우에 속해있는 부서 정보 |
| | | List<DepartmentVo> departments = this.departmentService.findWorkflowDepartment(issueType.getId()); |
| | | // 부서 정보를 저장 |
| | | for (DepartmentVo department : departments) { |
| | | departmentMaps.put(department.getDepartmentName(), department); |
| | | } |
| | | } |
| | | |
| | | // 우선순위를 바로 찾을 수 있게 준비 |
| | |
| | | |
| | | // 엑셀 필드에 있는 정보를 이슈 form 으로 옮긴다. |
| | | private IssueForm setIssueFormToExcelField(Row row, int rowIndex, Map<String, IssueStatus> issueStatusReadyMaps, Map<String, Project> projectMaps, Map<String, IssueType> issueTypeMaps, Map<String, |
| | | Priority> priorityMaps, Map<String, Severity> severityMaps, Map<String, Object> userMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, List<String> headers) { |
| | | Priority> priorityMaps, Map<String, Severity> severityMaps, Map<String, Object> userMaps, Map<String, DepartmentVo> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, List<String> headers) { |
| | | IssueForm issueForm = new IssueForm(); |
| | | issueForm.setRegisterId(this.webAppUtil.getLoginId()); |
| | | Project project = null; |
| | |
| | | // 중요도를 IssueForm 에 저장한다. |
| | | this.setIssueFormSeverity(cell, severityMaps, issueForm, rowIndex); |
| | | break; |
| | | /*case 6: |
| | | // 담당자를 IssueForm 에 저장한다. |
| | | this.setIssueFormAssignee(cell, userMaps, issueForm, project); |
| | | break;*/ |
| | | case 6: |
| | | // 담당부서를 IssueForm 에 저장한다. |
| | | this.setIssueFormAssignee(cell, userMaps, issueForm, project); |
| | | this.setIssueFormDepartment(cell, departmentMaps, issueForm, project); |
| | | break; |
| | | case 7: |
| | | // 시작일을 IssueForm 에 저장한다. |
| | |
| | | this.setIssueFormPeriod(cell, issueForm, false, rowIndex); |
| | | break; |
| | | default: |
| | | // 8번 이상부터는 사용자 정의 필드. 사용자 정의 필드 정보를 IssueForm 에 저장한다. |
| | | // 9번 부터는 사용자 정의 필드. 사용자 정의 필드 정보를 IssueForm 에 저장한다. |
| | | this.setIssueFormCustomFieldValue(cell, customFieldMaps, issueForm, headers.get(cellIndex), rowIndex); |
| | | } |
| | | } |
| | |
| | | issueForm.setSeverityId(severity.getId()); |
| | | } |
| | | |
| | | // 담당부서를 IssueForm 에 저장한다. |
| | | private void setIssueFormAssignee(Cell cell, Map<String, Object> userMaps, IssueForm issueForm, Project project) { |
| | | if (cell != null) { |
| | | String[] splitAssignee = CommonUtil.convertExcelStringToCell(cell).split("#"); |
| | | Map<String, Object> userMap = (Map<String, Object>) MapUtil.getObject(userMaps, project.getProjectKey()); |
| | | |
| | | List<Long> departmentIds = Lists.newArrayList(); |
| | | List<Long> userIds = Lists.newArrayList(); |
| | | |
| | | for (String account : splitAssignee) { |
| | | if (MapUtil.getLong(userMap, account) != null) { |
| | | departmentIds.add(MapUtil.getLong(userMap, account)); |
| | | userIds.add(MapUtil.getLong(userMap, account)); |
| | | } |
| | | } |
| | | issueForm.setUserIds(userIds); |
| | | } |
| | | } |
| | | |
| | | // 담당부서를 IssueForm 에 저장한다. |
| | | private void setIssueFormDepartment(Cell cell, Map<String, DepartmentVo> departmentMaps, IssueForm issueForm, Project project) { |
| | | if (cell != null) { |
| | | String[] splitDepartment = CommonUtil.convertExcelStringToCell(cell).split("#"); |
| | | |
| | | // 값이 공백이면 중지 |
| | | String cellValue = CommonUtil.convertExcelStringToCell(cell); |
| | | if (StringUtils.isEmpty(cellValue)) { |
| | | return; |
| | | } |
| | | |
| | | List<Long> departmentIds = Lists.newArrayList(); |
| | | |
| | | for (String department : splitDepartment) { |
| | | DepartmentVo departmentVo = departmentMaps.get(department); |
| | | departmentIds.add(departmentVo.getId()); |
| | | } |
| | | issueForm.setDepartmentIds(departmentIds); |
| | | } |
| | | } |
| | |
| | | private void setIssueFormPeriod(Cell cell, IssueForm issueForm, Boolean checkStartDate, int rowIndex) { |
| | | if (cell != null && !cell.toString().equals("")) { |
| | | |
| | | // 값이 공백이면 중지 |
| | | String cellValue = CommonUtil.convertExcelStringToCell(cell); |
| | | if (StringUtils.isEmpty(cellValue)) { |
| | | return; |
| | | } |
| | | |
| | | Date startDate; |
| | | |
| | | try { |
| | |
| | | LEFT OUTER JOIN issue_user issue_user FORCE INDEX(issueIdIndex) ON issue.id = issue_user.issue_id |
| | | LEFT OUTER JOIN user_department ud ON ud.department_id = isd.department_id |
| | | LEFT OUTER JOIN department d ON d.id = isd.department_id |
| | | LEFT OUTER JOIN issue_company ic ON ic.issue_id = issue.id |
| | | LEFT OUTER JOIN issue_isp ii ON ii.issue_id = issue.id |
| | | LEFT OUTER JOIN issue_hosting ih ON ih.issue_id = issue.id |
| | | LEFT OUTER JOIN (SELECT issue_id, COUNT(id) as attachedFileCount FROM attached_file GROUP BY issue_id) |
| | | temp_attached_file on (temp_attached_file.issue_id = issue.id) |
| | | LEFT OUTER JOIN (SELECT issue_id, COUNT(id) as issueCommentCount FROM issue_comment GROUP BY issue_id) |
| | |
| | | OR priority.name like CONCAT('%',#{keyWord},'%') |
| | | OR severity.name like CONCAT('%',#{keyWord},'%') |
| | | OR issue_custom.use_value like CONCAT('%',#{keyWord},'%') |
| | | OR d.department_name like CONCAT('%',#{keyWord},'%')) |
| | | OR d.department_name like CONCAT('%',#{keyWord},'%') |
| | | OR ic.name like CONCAT('%',#{keyWord},'%') |
| | | OR ic.manager like CONCAT('%',#{keyWord},'%') |
| | | OR ic.tel like CONCAT('%',#{keyWord},'%') |
| | | OR ic.email like CONCAT('%',#{keyWord},'%') |
| | | OR ic.url like CONCAT('%',#{keyWord},'%') |
| | | OR ic.memo like CONCAT('%',#{keyWord},'%') |
| | | OR ii.name like CONCAT('%',#{keyWord},'%') |
| | | OR ii.code like CONCAT('%',#{keyWord},'%') |
| | | OR ii.manager like CONCAT('%',#{keyWord},'%') |
| | | OR ii.tel like CONCAT('%',#{keyWord},'%') |
| | | OR ii.email like CONCAT('%',#{keyWord},'%') |
| | | OR ii.url like CONCAT('%',#{keyWord},'%') |
| | | OR ii.memo like CONCAT('%',#{keyWord},'%') |
| | | OR ih.name like CONCAT('%',#{keyWord},'%') |
| | | OR ih.code like CONCAT('%',#{keyWord},'%') |
| | | OR ih.manager like CONCAT('%',#{keyWord},'%') |
| | | OR ih.tel like CONCAT('%',#{keyWord},'%') |
| | | OR ih.email like CONCAT('%',#{keyWord},'%') |
| | | OR ih.url like CONCAT('%',#{keyWord},'%') |
| | | OR ih.memo like CONCAT('%',#{keyWord},'%')) |
| | | </if> |
| | | |
| | | <if test="title != null and !title.equals('')"> |
| | |
| | | LEFT OUTER JOIN issue_user issue_user FORCE INDEX(issueIdIndex) ON issue.id = issue_user.issue_id |
| | | LEFT OUTER JOIN user_department ud ON ud.department_id = isd.department_id |
| | | LEFT OUTER JOIN department d ON d.id = isd.department_id |
| | | LEFT OUTER JOIN issue_company ic ON ic.issue_id = issue.id |
| | | LEFT OUTER JOIN issue_isp ii ON ii.issue_id = issue.id |
| | | LEFT OUTER JOIN issue_hosting ih ON ih.issue_id = issue.id |
| | | LEFT OUTER JOIN (SELECT issue_id, COUNT(id) as attachedFileCount FROM attached_file GROUP BY issue_id) |
| | | temp_attached_file on (temp_attached_file.issue_id = issue.id) |
| | | LEFT OUTER JOIN (SELECT issue_id, COUNT(id) as issueCommentCount FROM issue_comment GROUP BY issue_id) |
| | |
| | | OR priority.name like CONCAT('%',#{keyWord},'%') |
| | | OR severity.name like CONCAT('%',#{keyWord},'%') |
| | | OR issue_custom.use_value like CONCAT('%',#{keyWord},'%') |
| | | OR d.department_name like CONCAT('%',#{keyWord},'%')) |
| | | OR d.department_name like CONCAT('%',#{keyWord},'%') |
| | | OR ic.name like CONCAT('%',#{keyWord},'%') |
| | | OR ic.manager like CONCAT('%',#{keyWord},'%') |
| | | OR ic.tel like CONCAT('%',#{keyWord},'%') |
| | | OR ic.email like CONCAT('%',#{keyWord},'%') |
| | | OR ic.url like CONCAT('%',#{keyWord},'%') |
| | | OR ic.memo like CONCAT('%',#{keyWord},'%') |
| | | OR ii.name like CONCAT('%',#{keyWord},'%') |
| | | OR ii.code like CONCAT('%',#{keyWord},'%') |
| | | OR ii.manager like CONCAT('%',#{keyWord},'%') |
| | | OR ii.tel like CONCAT('%',#{keyWord},'%') |
| | | OR ii.email like CONCAT('%',#{keyWord},'%') |
| | | OR ii.url like CONCAT('%',#{keyWord},'%') |
| | | OR ii.memo like CONCAT('%',#{keyWord},'%') |
| | | OR ih.name like CONCAT('%',#{keyWord},'%') |
| | | OR ih.code like CONCAT('%',#{keyWord},'%') |
| | | OR ih.manager like CONCAT('%',#{keyWord},'%') |
| | | OR ih.tel like CONCAT('%',#{keyWord},'%') |
| | | OR ih.email like CONCAT('%',#{keyWord},'%') |
| | | OR ih.url like CONCAT('%',#{keyWord},'%') |
| | | OR ih.memo like CONCAT('%',#{keyWord},'%')) |
| | | </if> |
| | | |
| | | <if test="title != null and !title.equals('')"> |
| | |
| | | function getIssueTypes() { |
| | | var deferred = $q.defer(); |
| | | |
| | | IssueType.find($resourceProvider.getContent({}, |
| | | IssueType.find($resourceProvider.getContent({projectId : parameter.id}, |
| | | $resourceProvider.getPageContent(0, 1000))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |