diff options
author | Angel Avila | 2017-03-30 21:43:03 +0000 |
---|---|---|
committer | Angel Avila | 2017-04-07 18:17:49 +0000 |
commit | 999aba407e91b0792029b8e8d215acc9082537d7 (patch) | |
tree | b818048a16008a9a8c279fa6b91c8de827f02cf4 | |
parent | d28178f503da21136679f2356cf6ee029701d543 (diff) | |
download | org.eclipse.osee-999aba407e91b0792029b8e8d215acc9082537d7.tar.gz org.eclipse.osee-999aba407e91b0792029b8e8d215acc9082537d7.tar.xz org.eclipse.osee-999aba407e91b0792029b8e8d215acc9082537d7.zip |
bug[ats_ATS362035]: Update only edited fields during mult edit
Change-Id: I36af6213afb147ced2f5b83111f9da6d136209ac
-rw-r--r-- | plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js | 14 | ||||
-rw-r--r-- | plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js | 21 |
2 files changed, 27 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js b/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js index 3c7f85f093e..b4822ce5fd7 100644 --- a/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js +++ b/plugins/org.eclipse.osee.disposition.rest/web/legacy/js/userController.js @@ -551,10 +551,18 @@ app.controller('userController', [ $scope.editItem(item, null); } + $scope.editAssignees = function(item) { + $scope.editItem(item, 'assignee'); + } + $scope.editNotes = function (item) { $scope.editItem(item, 'itemNotes'); } + $scope.editCategories = function (item) { + $scope.editItem(item, 'category'); + } + $scope.editNeedsRerun = function (item) { $scope.editItem(item, 'needsRerun'); } @@ -748,7 +756,7 @@ app.controller('userController', [ for(var i = 0; i < size; i++) { if($scope.selectedItems[i].assignee != inputs.multiAssignee){ $scope.selectedItems[i].assignee = inputs.multiAssignee; - $scope.editItem($scope.selectedItems[i]); + $scope.editAssignees($scope.selectedItems[i]); } } }); @@ -783,7 +791,7 @@ app.controller('userController', [ for(var i = 0; i < size; i++) { if($scope.selectedItems[i].category != inputs.category){ $scope.selectedItems[i].category = inputs.category; - $scope.editItem($scope.selectedItems[i]); + $scope.editCategories($scope.selectedItems[i]); } } }); @@ -818,7 +826,7 @@ app.controller('userController', [ for(var i = 0; i < size; i++) { if($scope.selectedItems[i].needsRerun != inputs.needsRerun) { $scope.selectedItems[i].needsRerun = inputs.needsRerun; - $scope.editItem($scope.selectedItems[i]); + $scope.editNeedsRerun($scope.selectedItems[i]); } } }); diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js index 2b599cf99b0..621e3f62c32 100644 --- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js +++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js @@ -20,8 +20,7 @@ app.controller('userController', [ $scope.lastFocused = null; $scope.isMulitEditRequest = false; $scope.loading = false; - $scope.isSearchView = false; -// $rootScope.cachedName = $cookieStore.get("name"); + $scope.isSearchView = false; $scope.getDispoType = function() { if($rootScope.type == 'codeCoverage') { @@ -352,10 +351,18 @@ app.controller('userController', [ $scope.editItem(item, null); } + $scope.editAssignees = function(item) { + $scope.editItem(item, 'assignee'); + } + $scope.editNotes = function (item) { $scope.editItem(item, 'itemNotes'); } + $scope.editCategories = function (item) { + $scope.editItem(item, 'category'); + } + $scope.editNeedsRerun = function (item) { $scope.editItem(item, 'needsRerun'); } @@ -368,6 +375,10 @@ app.controller('userController', [ newItem.itemNotes = item.itemNotes; } else if(field == 'needsRerun') { newItem.needsRerun = item.needsRerun; + } else if(field == 'assignee') { + newItem.assignee = item.assignee; + } else if(field == 'category') { + newItem.category = item.category; } Item.update({ @@ -580,7 +591,7 @@ app.controller('userController', [ for(var i = 0; i < size; i++) { if($scope.selectedItems[i].assignee != inputs.multiAssignee){ $scope.selectedItems[i].assignee = inputs.multiAssignee; - $scope.editItem($scope.selectedItems[i]); + $scope.editAssignees($scope.selectedItems[i]); } } }); @@ -615,7 +626,7 @@ app.controller('userController', [ for(var i = 0; i < size; i++) { if($scope.selectedItems[i].category != inputs.category){ $scope.selectedItems[i].category = inputs.category; - $scope.editItem($scope.selectedItems[i]); + $scope.editCategories($scope.selectedItems[i]); } } }); @@ -650,7 +661,7 @@ app.controller('userController', [ for(var i = 0; i < size; i++) { if($scope.selectedItems[i].needsRerun != inputs.needsRerun) { $scope.selectedItems[i].needsRerun = inputs.needsRerun; - $scope.editItem($scope.selectedItems[i]); + $scope.editNeedsRerun($scope.selectedItems[i]); } } }); |