From: Bill Erickson Date: Wed, 2 Dec 2020 22:02:24 +0000 (-0800) Subject: LP1896285 Batch mark item missing serialized X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d5e6c2969abaf8f7a0f59aeacae1920371590ab6;p=Evergreen.git LP1896285 Batch mark item missing serialized Process batches of items one at a time when marking them lost to avoid sending too many parallel requests to the server. Signed-off-by: Bill Erickson Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index 54aa9f3f0d..6f22aa8cc1 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -1521,11 +1521,13 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, egAddCopyAl ).result.then(function() { return egCore.pcrud.retrieve('ccs', 4) .then(function(resp) { - var promises = []; + var promise = $q.when(); angular.forEach(copies, function(copy) { - promises.push(service.mark_item(copy, resp, {})) + promise = promise.then(function() { + return service.mark_item(copy, resp, {}); + }); }); - return $q.all(promises); + return promise; }); }); }