From: Jason Stephenson Date: Tue, 29 Nov 2011 14:22:29 +0000 (-0500) Subject: Check OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE in checkin_handle_lost. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bb6ba8d5a09b09de80f1a77f266a0bc699ea7992;p=working%2FEvergreen.git Check OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE in checkin_handle_lost. Check the value of OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE before changing the copy status in checkin_handle_lost. This makes the setting actually do something. Add a couple of blank lines to aid in readability. Signed-off-by: Jason Stephenson Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 430a7c5842..b6bf4c90ac 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -3068,7 +3068,11 @@ sub checkin_handle_lost { $self->checkin_handle_lost_now_found_restore_od() if $restore_od && ! $self->void_overdues; } - $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING)); + my $immediately_available = $U->ou_ancestor_setting_value( + $circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self->editor) || 0; + + $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING)) if ($immediately_available); + $self->update_copy; }