Bug 28050

Summary: SIP doesn't handle incorrect locations in CP field
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: SIP2Assignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Nick Clemens (kidclamp) 2021-03-29 14:57:33 UTC
In AddReturn we check that the branch for a return exists and force to the userenv if it does not.

In SIP we accept the incoming field from CP in a 93 message with no checking.

This can create a strange situation where holds are marked as 'In transit'

To recreate:
1 - Place a hold for a patron on an item in your catalog
2 - Use the sip cli emulator with a bad location code to check in that item
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CLP -m checkin --item TESTER
3 - Note the typoed 'CLP' instead of 'CPL'
4 - Check the hold in the staff client - it is in transit