From acc0939f9879b02d3f55321eb8efccc4a35e9fad Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 29 Nov 2011 09:22:29 -0500 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 e47d701739..c00d662e56 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -3360,7 +3360,11 @@ sub checkin_handle_lost { $self->checkin_handle_lost_now_found_restore_od($circ_lib) 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; } -- 2.11.0