| | |
| | | var IspField = $injector.get("IspField"); |
| | | var HostingField = $injector.get("HostingField"); |
| | | var IssueType = $injector.get("IssueType"); |
| | | var IssueTypeCustomField = $injector.get("IssueTypeCustomField"); |
| | | var CustomField = $injector.get("CustomField"); |
| | | var $log = $injector.get("$log"); |
| | | var SweetAlert = $injector.get("SweetAlert"); |
| | |
| | | $scope.fn.getIssueTypeList = getIssueTypeList; // 이슈 유형 목록 조회 |
| | | $scope.fn.getCustomFieldList = getCustomFieldList; // 사용자 정의 필드 목록 조회 |
| | | $scope.fn.getMailTargetAll = getMailTargetAll; // 사용자 정의 필드 목록 조회 |
| | | $scope.fn.getIssueTypeCustomFieldList = getIssueTypeCustomFieldList; // 이슈 유형에서 사용중인 사용자정의 필드가져오기 |
| | | |
| | | function getUserList(query, excludeList, page, callBack) { |
| | | var conditions = { |
| | |
| | | return deferred.promise; |
| | | } |
| | | |
| | | // 이슈 유형에 연결된 사용자 정의 필드 |
| | | function getIssueTypeCustomFieldList(query, excludeList, projectId, issueTypeId, page, callBack) { |
| | | |
| | | if (projectId == null) return; |
| | | if (issueTypeId == null) return; |
| | | |
| | | var deferred = $q.defer(); |
| | | |
| | | IssueTypeCustomField.find($resourceProvider.getContent({ |
| | | name : query, |
| | | projectId : projectId, |
| | | issueTypeId : issueTypeId, |
| | | excludeIds : (function () { |
| | | var excludeIds = []; |
| | | |
| | | angular.forEach(excludeList, function (exclude) { |
| | | excludeIds.push(exclude.id); |
| | | }); |
| | | |
| | | return excludeIds; |
| | | })() |
| | | }, |
| | | $resourceProvider.getPageContent(0, 1000))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | if ($rootScope.isDefined(callBack)) { |
| | | callBack(result); |
| | | } |
| | | |
| | | var customFields = result.data.data; |
| | | var customFieldVos = []; |
| | | customFields.forEach(function (customField) { |
| | | customFieldVos.push(customField.customFieldVo); |
| | | }) |
| | | |
| | | deferred.resolve(customFieldVos); |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("issue.failedToUserDefinedFieldListAssociatedLookup"), result.data.message.message, "error"); // 이슈 유형에 연결된 사용자 정의 필드 목록 조회 실패 |
| | | } |
| | | |
| | | }); |
| | | |
| | | return deferred.promise; |
| | | } |
| | | |
| | | function getMailTargetAll(excludeList) { |
| | | var deferred = $q.defer(); |
| | | |