From 21ed06369c83ceaf4a4ed67cd4df424acc8efb85 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 21 Apr 2020 07:11:08 -0400 Subject: [PATCH] Bug 25227: Display correct message if item is lost and lost returns are allowed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Even if a library allows returns of lost items, the SIP server returns the error message "Item lost, return not allowed" if the checkin was not ok for any reason other than it being withdrawn ( and withdrawn items not being returnable ). The most clear example of this is that when a lost item is not checked out to a patron and is returned. SIP returns that message even though lost items *can* be returned. The actual problem being that the item was not checked out. Test Plan: 1) Ensure you can return lost items 2) Mark an item as lost 3) Check it in via SIP 4) Note the message you get back is "Item lost, return not allowed" 5) Apply this patch 6) Restart your SIP server 7) Repeat steps 2 and 3 8) Note you no longer get the incorrect message! Signed-off-by: Frédéric Demians Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- C4/SIP/ILS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm index 822a6d3aaf..94bc15461c 100644 --- a/C4/SIP/ILS.pm +++ b/C4/SIP/ILS.pm @@ -223,7 +223,7 @@ sub checkin { } elsif ( $data->{messages}->{withdrawn} && !$circ->ok ) { $circ->screen_msg("Item withdrawn, return not allowed"); syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item withdrawn"); - } elsif ( $data->{messages}->{WasLost} && !$circ->ok ) { + } elsif ( $data->{messages}->{WasLost} && !$circ->ok && C4::Context->preference("BlockReturnOfLostItems") ) { $circ->screen_msg("Item lost, return not allowed"); syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - item lost"); } elsif ( !$item->{patron} ) { -- 2.39.5