From b9e87622a34e6943e9b9fcb43581c9fa34fa70e4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 21 Apr 2020 07:11:08 -0400 Subject: [PATCH] Bug 25227: SIP server returns wrong error message if item was lost and not checked out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 --- 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.17.1