| | |
| | | // 현재 상세화면으로 보려고하는 이슈 id를 기억한다. |
| | | $rootScope.currentDetailIssueId = id; |
| | | // 이슈 상세 화면 요청 |
| | | $rootScope.$broadcast("getIssueDetail", { |
| | | id : id |
| | | }); |
| | | // $scope.$broadcast("getIssueDetail", { |
| | | // id : id |
| | | // }); |
| | | } |
| | | |
| | | |
| | | // 목록 화면으로 변경한다. |
| | | function listView() { |
| | |
| | | $scope.vm.responseData.data = angular.copy(temp); |
| | | // 마지막으로 보고있던 이슈 id를 초기화한다. |
| | | $rootScope.currentDetailIssueId = null; |
| | | $scope.$broadcast("getIssueList", {id: $rootScope.currentDetailIssueId}); |
| | | } |
| | | |
| | | // 이슈 테이블 설정 |
| | |
| | | if ($rootScope.workProject != null && $rootScope.workProject.id > -1) { |
| | | var find = findProjectSearch($rootScope.workProject.id); |
| | | if (!find) { |
| | | $scope.vm.projects = []; |
| | | $scope.vm.projects.push($rootScope.workProject); |
| | | } |
| | | } |
| | |
| | | $scope.vm.issueTypeId = result.data.data[0].issueTypeId; |
| | | $scope.vm.projectKey = result.data.data[0].projectKey; |
| | | $scope.vm.issueNumber = result.data.data[0].issueNumber; |
| | | $scope.vm.projectName = result.data.data[0].projectName; |
| | | $scope.vm.page.selectedPage = currentPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | |
| | | if (detail) { |
| | | changeDetailView(result.data.data[0].id); |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("issue.failedIssueLookup"), result.data.message.message); // 이슈 조회 실패 |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 이메일 프로젝트 경로로 이동 후 상세 진입시 조회 |
| | | function getDetailList(projectKey, number) { |
| | | var conditions = { |
| | | projectKey : projectKey, |
| | | combinationIssueNumber : number |
| | | }; |
| | | |
| | | Issue.find($resourceProvider.getContent(conditions, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | if (result.data.data != null && result.data.data.length > 0) { |
| | | $scope.vm.projectKey = result.data.data[0].projectKey; |
| | | $scope.vm.issueNumber = result.data.data[0].issueNumber; |
| | | $scope.vm.responseData = result.data; |
| | | |
| | | changeDetailView(result.data.data[0].id); |
| | | } |
| | | } |
| | | else { |
| | |
| | | // 파라미터 읽기 |
| | | var params = $rootScope.previousGetParams; |
| | | if ($rootScope.isDefined(params)) { |
| | | $rootScope.$broadcast("makeIssueSearch", { projectKey : params.projectKey, issueNumber : params.issueNumber }); |
| | | // $rootScope.$broadcast("makeIssueSearch", { projectKey : params.projectKey, issueNumber : params.issueNumber }); |
| | | getDetailList(params.projectKey, params.issueNumber); |
| | | $rootScope.previousGetParams = null; |
| | | // $rootScope.issueTypeId = $rootScope.issueTypeMenu.id; |
| | | return; |