From d2aa55b91102214de15cc1700f3606004a46fc84 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 15 Nov 2018 09:51:16 -0500 Subject: [PATCH] Bug 21745: Checkin of withdrawn items marked successful via SIP2 when BlockReturnOfWithdrawnItems is enabled If an item is marked withdrawn, and the syspref BlockReturnOfWithdrawnItems is enabled, checking in a withdrawn items will fail but not be indicated by the SIP response. To recreate: 1 - Mark an item withdrawn 2 - Set up sip server: https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 3 - Set 'BlockReturnOfWithdrawnItems' to block 4 - Use the sip_cli_emulator to checkin the withdrawn item 5 - There is no error in the checkin --- C4/SIP/ILS.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm index 1bd23c6429..3fb64e69c0 100644 --- a/C4/SIP/ILS.pm +++ b/C4/SIP/ILS.pm @@ -219,6 +219,8 @@ sub checkin { if( !$circ->ok && $circ->alert_type && $circ->alert_type == 98 ) { # data corruption $circ->screen_msg("Checkin failed: data problem"); syslog( "LOG_WARNING", "Problem with issue_id in issues and old_issues; check the about page" ); + } elsif( !$circ->ok && $circ->alert_type && $circ->alert_type == 99 ) { # withdrawn cannot be returned + $circ->screen_msg("Checkin failed: item withdrawn"); } elsif( !$item->{patron} ) { if( $checked_in_ok ) { # Mark checkin ok although book not checked out $circ->ok( 1 ); -- 2.17.2 (Apple Git-113)