LP1865564 Clear holds cache after Request Items
authorBill Erickson <berickxx@gmail.com>
Thu, 16 Jul 2020 18:27:34 +0000 (14:27 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 21 Aug 2020 16:24:32 +0000 (12:24 -0400)
When staff place holds on a record within the Holdings View via the
Request Items function, reset the holds grid data so it bypasses the
cache and refetches the holds, including the new holds.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/web/js/ui/default/staff/cat/catalog/app.js

index 809ffea..414f3ea 100644 (file)
@@ -1004,9 +1004,10 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
                         'open-ils.circ',
                         'open-ils.circ.holds.test_and_create.batch.override',
                         egCore.auth.token(), args, h.copy_list
-                    );
-
-                    $uibModalInstance.close();
+                    ).then(function() {
+                        holds = []; // force the holds grid to refetch data.
+                        $uibModalInstance.close();
+                    });
                 }
 
                 $scope.cancel = function($event) {