From dc9b09a4ee390db471ba8b7dedc375a9c7e72ad3 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 월, 13 12월 2021 15:56:49 +0900
Subject: [PATCH] - 연관이슈 검색 시 다른 이슈 유형(다른 프로젝트)의 이슈도 검색 가능 하도록 수정 - 부서 삭제 코드 약간 수정

---
 src/main/webapp/scripts/components/utils/autoComplete.controller.js |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/main/webapp/scripts/components/utils/autoComplete.controller.js b/src/main/webapp/scripts/components/utils/autoComplete.controller.js
index 8e9cbc3..638c1dd 100644
--- a/src/main/webapp/scripts/components/utils/autoComplete.controller.js
+++ b/src/main/webapp/scripts/components/utils/autoComplete.controller.js
@@ -133,13 +133,13 @@
                 function getIssueList(query, issueTypeId, excludeList, page, callBack) {
                     var conditions = {
                         name : query,
-                        issueTypeIds : (function () {
+                        /*issueTypeIds : (function () {
                             var ids = [];
 
                             ids.push(issueTypeId);
 
                             return ids;
-                        })(),
+                        })(),*/
                         excludeIds : (function () {
                             var excludeIds = [];
 
@@ -175,13 +175,13 @@
                 function getDownIssueList(query, issueTypeId, excludeList, page, callBack) {
                     var conditions = {
                         name : query,
-                        // issueTypeIds : (function () {
-                        //     var ids = [];
-                        //
-                        //     ids.push(issueTypeId);
-                        //
-                        //     return ids;
-                        // })(),
+                        issueTypeIds : (function () {
+                            var ids = [];
+
+                            ids.push(issueTypeId);
+
+                            return ids;
+                        })(),
                         excludeIds : (function () {
                             var excludeIds = [];
 
@@ -312,9 +312,10 @@
                     return deferred.promise;
                 }
 
-                function getIssueDepartmentList(query, excludeList, page, callBack) {
+                function getIssueDepartmentList(issueTypeId, query, excludeList, page, callBack) {
                     var conditions = {
-                        issueTypeId : $scope.vm.form.issueTypeId,
+                        //issueTypeId : $scope.vm.form.issueTypeId,
+                        issueTypeId : issueTypeId,
                         departmentName : query,
                         userId : $rootScope.user.id,
                         projectId : (function () {
@@ -347,7 +348,7 @@
                         conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) {
                         if (result.data.message.status === "success") {
                             const departments = result.data.data;
-                            if(departments != null && departments.length() > 0){
+                            if(departments != null){
                                 var filterDepartments = departments.filter(function(item, idx){
                                     return departments.findIndex(function(item2, idx2){
                                         return item.departmentName === item2.departmentName

--
Gitblit v1.8.0