reseting holds on mark missing/damaged
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 19 Aug 2006 15:15:38 +0000 (15:15 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 19 Aug 2006 15:15:38 +0000 (15:15 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5600 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm

index 12cca53..8311c01 100644 (file)
@@ -781,7 +781,20 @@ sub mark_item {
 
        $e->update_asset_copy($copy) or return $e->event;
 
+
+       my $holds = $e->search_action_hold_request(
+               { 
+                       current_copy => $copy->id,
+                       fulfillment_time => undef,
+                       cancel_time => undef,
+               }
+       );
+
        $e->commit;
+
+       $logger->debug("reseting holds that target the marked copy");
+       OpenILS::Application::Circ::Holds->_reset_hold($e->requestor, $_) for @$holds;
+
        return 1;
 }