| | |
| | | import kr.wisestone.owl.web.form.IssueStatusForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.hibernate.jdbc.Work; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IssueStatusRepository issueStatusRepository; |
| | | |
| | | @Autowired |
| | | private WorkflowService workflowService; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | |
| | | public List<IssueStatus> findByWorkspaceId(Long workspaceId) { |
| | | return this.issueStatusRepository.findByWorkspaceId(workspaceId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public List<IssueStatusVo> findByIssueTypeId(Long issueTypeId) { |
| | | IssueType issueType = this.issueTypeService.getIssueType(issueTypeId); |
| | | Workflow workflow = issueType.getWorkflow(); |
| | | return findByWorkflowId(workflow.getId()); |
| | | } |
| | | |
| | | // 이슈 상태를 생성한다. |
| | | @Override |
| | |
| | | // 삭제할 이슈 상태가 워크플로우 에서 사용되고 있는지 확인한다. |
| | | this.checkUseWorkflow(issueStatus); |
| | | |
| | | // 기본으로 제공되는 이슈 상태는 삭제 금지 |
| | | if (issueStatus.getDefaultYn()) { |
| | | // 기본으로 제공되는 이슈 상태는 삭제 금지 -> 기본제공이여도 사용하지 않으면 삭제 가능하도록 수정 |
| | | /*if (issueStatus.getDefaultYn()) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.DEFAULT_ISSUE_STATUS_NOT_REMOVE)); |
| | | } |
| | | }*/ |
| | | |
| | | this.issueStatusRepository.delete(issueStatus); |
| | | } |