From a8d0b20014902bf6508df27fab637d61a4373e35 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 8 Aug 2022 14:04:55 -0400 Subject: [PATCH] LP1915440 Clear Hopeless Date on Capture Clear the hold hopeless date when a copy is captured for the hold. One way to make this happen for testing: . Configure the Missing copy status as holdable=true hopeless_prone=true . Place hold with only 1 viable copy. . Mark said copy as missing -- this stamps a hopeless_date on the hold. . Check the copy in. This results in a capture + hopeless hold. Signed-off-by: Bill Erickson Signed-off-by: Susan Morrison Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index ffb5a622b0..41bb4739af 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -1893,6 +1893,7 @@ sub handle_checkout_holds { $logger->debug("circulator: checkout fulfilling hold " . $hold->id); # if the hold was never officially captured, capture it. + $hold->clear_hopeless_date; $hold->current_copy($copy->id); $hold->capture_time('now') unless $hold->capture_time; $hold->fulfillment_time('now'); @@ -3301,6 +3302,7 @@ sub attempt_checkin_hold_capture { $logger->info("circulator: found permitted hold ".$hold->id." for copy, capturing..."); + $hold->clear_hopeless_date; $hold->current_copy($copy->id); $hold->capture_time('now'); $self->put_hold_on_shelf($hold) -- 2.11.0