Bug 22790

Summary: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
Product: Koha Reporter: Andreas Jonsson <andreas.jonsson>
Component: SIP2Assignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: colin.campbell, martin.renvoize, nick, wizzyrea
Version: 18.11   
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 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
Bug 22790: Add a test

Description Andreas Jonsson 2019-04-26 19:42:48 UTC
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.
Comment 1 Andreas Jonsson 2019-04-26 19:46:35 UTC
Created attachment 88966 [details] [review]
Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
Comment 2 Andreas Jonsson 2019-04-26 19:48:51 UTC
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)
Comment 3 Liz Rea 2019-05-06 18:58:51 UTC
Can I just say this test plan is A+ very good, thank you!
Comment 4 Liz Rea 2019-05-06 19:05:41 UTC
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>
Comment 5 Jonathan Druart 2019-05-08 15:28:56 UTC
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>
Comment 6 Jonathan Druart 2019-05-08 15:28:59 UTC
Created attachment 89477 [details] [review]
Bug 22790: Add a test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Nick Clemens 2019-05-09 18:21:46 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-05-16 14:13:27 UTC
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.