Bug 21745

Summary: Checkin of withdrawn items marked successful via SIP2 when BlockReturnOfWithdrawnItems is enabled
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: SIP2Assignee: Kyle M Hall <kyle>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: colin.campbell, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 21745: Checkin of withdrawn items marked successful via SIP2 when BlockReturnOfWithdrawnItems is enabled
Bug 21745: Checkin of withdrawn items marked successful via SIP2 when BlockReturnOfWithdrawnItems is enabled

Description Nick Clemens (kidclamp) 2018-11-01 12:00:58 UTC
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
Comment 1 Nick Clemens (kidclamp) 2018-11-01 12:35:42 UTC
Some more details:

C4/SIP/ILS/Transaction/Checkin.pm does set a 'CV' field to 99 if the item is withdrawn - this doesn't cause a screen message, or set the 'ok' flag to 0

C4/SIP/ILS.pm does not check the CV for 99, or check the value of 'BlockReturnOfLostItems'
Comment 2 Kyle M Hall 2018-11-15 14:56:09 UTC
Created attachment 82364 [details] [review]
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
Comment 3 Kyle M Hall 2018-11-15 15:44:49 UTC
Created attachment 82366 [details] [review]
Bug 21745: Checkin of withdrawn items marked successful via SIP2 when BlockReturnOfWithdrawnItems is enabled
Comment 4 Colin Campbell 2018-11-19 12:56:22 UTC
The intention in the code is unclear. we copy all of messages to error_messages, but only ever are interested in one value in it. Then in ILS do the weird unexplained test that this is the only message. Its unclear whats going on here, and that what the case is. I dont think this is maintainable code. Could we set a flag rather than flinging a hashref around and set it using clearer criteria?
Comment 5 Kyle M Hall 2019-01-07 17:50:01 UTC

*** This bug has been marked as a duplicate of bug 22076 ***