From 317c2fdc537948af4da2999cbafb7c3f290dad3a Mon Sep 17 00:00:00 2001 From: "a. bellenir" Date: Wed, 27 Jun 2018 14:48:56 -0400 Subject: [PATCH] LP1746536: cannot edit vol/call number in item status spawnHoldingsEdit was disabling record summary by passing record_id: 0 this change will provided the record_id if exactly one record is selected. behavior is unchanged if multiple records are selected. Signed-off-by: a. bellenir Signed-off-by: cesar velez Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier Conflicts: Open-ILS/web/js/ui/default/staff/circ/services/item.js Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier Signed-off-by: Galen Charlton --- .../web/js/ui/default/staff/circ/services/item.js | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) 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 3bb09b0e0c..c39f0380be 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 @@ -732,18 +732,22 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog angular.forEach(items, function(i){ item_ids.push(i.id); }); - - egCore.net.request( - 'open-ils.actor', - 'open-ils.actor.anon_cache.set_value', - null, - 'edit-these-copies', - { - record_id: 0, // disables record summary - copies: item_ids, - raw: {}, - hide_vols : hide_vols, - hide_copies : hide_copies + + // provide record_id iff one record is selected. + // 0 disables record summary + var record_ids = service.gatherSelectedRecordIds(items); + var record_id = record_ids.length === 1 ? record_ids[0] : 0; + egCore.net.request( + 'open-ils.actor', + 'open-ils.actor.anon_cache.set_value', + null, + 'edit-these-copies', + { + record_id: record_id, + copies: item_ids, + raw: {}, + hide_vols : hide_vols, + hide_copies : hide_copies }).then(function(key) { if (key) { var url = egCore.env.basePath + 'cat/volcopy/' + key; -- 2.11.0