From 30f2bb1868097cf3669da711c2b1bfcee740bdfe Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 2 Dec 2019 17:44:14 -0500 Subject: [PATCH] LP1854197 Add Vols and Copies honors owning lib Fixes a bug in the Add Volumes and Copies action where there vol/copy editor was unable to extract the owning library of the selected volumes, thus leading to no differentation between owning libraries in the editor and having all of the new volumes/copies linked (by default) to the first owning library in the list. To test: 1. Navigate to Item Status UI 2. Scan multiple (say, 3) barcodes, each with a different owning lib. 3. Select all 3 items and chose "Add Callnumbers and Items" 4. The holdings edit page that results should show one volume and copy row per owning library instead of all rows linked to the first owning library in the set. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/circ/services/item.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/item.js b/Open-ILS/web/js/ui/default/staff/circ/services/item.js index 8e2142882f..fef15ff346 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/item.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/item.js @@ -690,7 +690,12 @@ function(egCore , egOrg , egCirc , $uibModal , $q , $timeout , $window , ngToast service.gatherSelectedHoldingsIds(items,r), function (i) { angular.forEach(items, function(item) { - if (i == item.id) raw.push({owner : item['call_number.owning_lib']}); + if (i == item.id) { + // owning_lib may be fleshed. + var owner = item['call_number.owning_lib.id'] + || item['call_number.owning_lib']; + raw.push({owner : owner}); + } }); } ); -- 2.11.0