| | |
| | | package kr.wisestone.owl.data; |
| | | |
| | | import kr.wisestone.owl.config.CommonConfiguration; |
| | | import kr.wisestone.owl.domain.*; |
| | | import kr.wisestone.owl.service.*; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.web.form.IssueForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | |
| | | // issue 유효성 체크용 클래스 |
| | | public class CheckIssueData { |
| | |
| | | Priority priority; |
| | | Severity severity; |
| | | |
| | | @Autowired |
| | | private IssueService issueService; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | | |
| | | @Autowired |
| | | private ProjectService projectService; |
| | | |
| | | @Autowired |
| | | private IssueStatusService issueStatusService; |
| | | |
| | | @Autowired |
| | | private IssueTypeService issueTypeService; |
| | | |
| | | @Autowired |
| | | private PriorityService priorityService; |
| | | |
| | | @Autowired |
| | | private SeverityService severityService; |
| | | |
| | | public CheckIssueData() {} |
| | | |
| | | public boolean CheckData(User user, IssueForm issueForm) { |
| | | // 사용하고 있는 업무 공간이 활성 상태인지 확인한다. 사용 공간에서 로그인한 사용자가 비활성인지 확인한다. |
| | | this.workspaceService.checkUseWorkspace(user, user.getLastWorkspaceId()); |
| | | |
| | | Issue issue = this.issueService.getIssue(issueForm.getId()); |
| | | IssueStatus oldIssueStatus = issue.getIssueStatus(); |
| | | // 프로젝트 유효성 체크 |
| | | Project project = this.projectService.getProject(issueForm.getProjectId()); |
| | | // 이슈 상태 유효성 체크 |
| | | IssueStatus issueStatus = this.issueStatusService.getIssueStatus(issueForm.getIssueStatusId()); |
| | | // 이슈 유형 유효성 체크 |
| | | IssueType issueType = this.issueTypeService.getIssueType(issueForm.getIssueTypeId()); |
| | | // 우선순위 유효성 체크 |
| | | Priority priority = this.priorityService.getPriority(issueForm.getPriorityId()); |
| | | // 중요도 유효성 체크 |
| | | Severity severity = this.severityService.getSeverity(issueForm.getSeverityId()); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public Issue getIssue() { |
| | | return issue; |