I would expect the filter specified by the system preference itemBarcodeInputFilter to be applied to any item barcode inputed to the system. As equipment connected via SIP2 is used to input item barcodes, the filter should be applied.
Created attachment 88966 [details] [review] Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
Testplan for kohadevbox: 1. Set syspref itemBarcodeInputFilter to "Remove spaces from" 2. Disable syspref RequireStrongPassword 3. Add a bibliographic record 4. Add an item with barcode '12' 5. Add a borrower with cardnumber 2 and password aaa 6 Add a borrower with username term1 and password term1 and grant circulate permissions 7. Confirm that this input match the item added in step 2. 8. Login to server via ssh and run 'sudo koha-sip-enable kohadev && sudo koha-start-sip kohadev' 9. Try checking out an item using sip: /usr/share/koha/bin/sip_cli_emulator.pl --sip_user=term1 --sip_pass=term1 --patron=2 --password=aaa --item='1 2' -m checkout -a 127.0.0.1 -p 6001 -l MAIN 10. Without patch, the sip response will be 'Invalid item' 11. With patch, the sip response will be 'Item cannot be issued: TOO_MANY' (or any other response indicating that the item was at least found)
Can I just say this test plan is A+ very good, thank you!
Created attachment 89394 [details] [review] Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2 Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Created attachment 89476 [details] [review] Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2 Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 89477 [details] [review] Bug 22790: Add a test Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Awesome work all! Pushed to master for 19.05
This bugfix results in a change of behaviour that some systems may not be expecting in a stable release, as such I've chosen not to backport for the 18.11.x series.