| | |
| | | if (isConfirm) { |
| | | inheritYn = true; |
| | | } |
| | | SweetAlert.close(); |
| | | |
| | | Issue.importExcel({ |
| | | method : "POST", |
| | | file : $scope.vm.form.file, |
| | |
| | | } |
| | | }); |
| | | }); |
| | | } else { |
| | | Issue.importExcel({ |
| | | method : "POST", |
| | | file : $scope.vm.form.file, |
| | | // data 속성으로 별도의 데이터 전송 |
| | | fields : { |
| | | content : { |
| | | projectId : $scope.vm.form.projects[0].id, |
| | | issueTypeId : $scope.vm.form.issueTypeId, |
| | | parentIssueId : (function () { |
| | | let id = -1; |
| | | if ($rootScope.isDefined($scope.vm.form.issues)) { |
| | | if ($rootScope.isDefined($scope.vm.form.issues[0])) { |
| | | id = $scope.vm.form.issues[0].id; |
| | | } |
| | | } |
| | | return id; |
| | | })(), |
| | | inheritYn : inheritYn |
| | | } |
| | | }, |
| | | fileFormDataName : "file", |
| | | }).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $timeout(function () { |
| | | SweetAlert.success($filter("translate")("issue.succeededIssueRegistration"), result.data.message.message); // 이슈 등록 성공 |
| | | $scope.fn.cancel(); |
| | | $rootScope.$broadcast("getIssueList"); |
| | | $rootScope.spinner = false; |
| | | }, 1000); |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("issue.failedIssueRegistration"), result.data.message.message); // 이슈 등록 실패 |
| | | $rootScope.spinner = false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |