Fix LP851000.
authorJason Stephenson <jstephenson@mvlc.org>
Thu, 17 Nov 2011 20:15:09 +0000 (15:15 -0500)
committerDan Wells <dbw2@calvin.edu>
Tue, 6 Dec 2011 14:44:01 +0000 (09:44 -0500)
Remove about 14 lines from OpenILS/Application/Circ/Circulate.pm
in the checkin_handle_circ subroutine that check whether or not
the checkin happens at the copy's circ_lib and the value of the
circ.lost_immediately_available org unit setting.

This change causes the handle_lost subroutine to run regardless of
where the checkin takes place for a more consistent experience.

Whether or not billings are voided, overdues restored, etc. is still
determined by the copy's circ_lib.

Given how the hold targeter and transit code works, it does not appear
the the circ.lost_immediately_available setting could ever do what it
was intended to do. Given these changes to the code it is now unnecessary.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>

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

index 2b99396..e47d701 100644 (file)
@@ -3296,21 +3296,7 @@ sub checkin_handle_circ {
         $self->copy->circ_lib->id : $self->copy->circ_lib;
     my $stat = $U->copy_status($self->copy->status)->id;
 
-    # immediately available keeps items lost or missing items from going home before being handled
-    my $lost_immediately_available = $U->ou_ancestor_setting_value(
-        $circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self->editor) || 0;
-
-
-    if ( (!$lost_immediately_available) && ($circ_lib != $self->circ_lib) ) {
-
-        if( ($stat == OILS_COPY_STATUS_LOST or $stat == OILS_COPY_STATUS_MISSING) ) {
-            $logger->info("circulator: not updating copy status on checkin because copy is lost/missing");
-        } else {
-            $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING));
-            $self->update_copy;
-        }
-
-    } elsif ($stat == OILS_COPY_STATUS_LOST) {
+    if ($stat == OILS_COPY_STATUS_LOST) {
 
         $self->checkin_handle_lost($circ_lib);