Bug 22790 - The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
Summary: The system preference itemBarcodeInputFilter is not applied for barcodes inpu...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: 18.11
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-26 19:42 UTC by Andreas Jonsson
Modified: 2019-05-16 14:13 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
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 (928 bytes, patch)
2019-04-26 19:46 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2 (972 bytes, patch)
2019-05-06 19:05 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2 (1.02 KB, patch)
2019-05-08 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22790: Add a test (1.84 KB, patch)
2019-05-08 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.