From: Bill Erickson Date: Mon, 8 Aug 2022 18:04:55 +0000 (-0400) Subject: LP1915440 Clear Hopeless Date on Capture X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=db7cbf0bbb53060b3fb5a23639c1b1618e3844ea;p=Evergreen.git 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 --- 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 aec6471953..8d34d7c84b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -1892,6 +1892,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'); @@ -3354,6 +3355,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)