Bug 25341

Summary: When adding a single item to course reserves, ignore whitespace
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Course reservesAssignee: Lucas Gass <lucas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11
Attachments: Bug 25341: Remove whitespace from barcode in add_items.pl
Bug 25341: Remove whitespace from barcode in add_items.pl

Description Katrin Fischer 2020-05-01 14:15:33 UTC
Especially when copying your barcodes from other pages in Koha, you easily end up with a bit of whitespace in front and/or after the barcode when you paste it.

In circulation, this doesn't matter, but when adding to the course reserves, the whitepace is not ignored and you end up with "barcode not found". It would be nice if circ and course reserves behaved the same here.
Comment 1 Lucas Gass 2020-05-01 17:03:28 UTC
Created attachment 104131 [details] [review]
Bug 25341: Remove whitespace from barcode in add_items.pl

TEST PLAN:
1. Go to course reserves and trying adding a course with a barcode that has some leading/trailing whitespace.
2. It doesnt work
3. Apply patch and restart_all
4. Try again with leading/trailing whitespace, it should work.
Comment 2 Katrin Fischer 2020-05-02 01:14:38 UTC
Created attachment 104164 [details] [review]
Bug 25341: Remove whitespace from barcode in add_items.pl

TEST PLAN:
1. Go to course reserves and trying adding a course with a barcode that has some leading/trailing whitespace.
2. It doesnt work
3. Apply patch and restart_all
4. Try again with leading/trailing whitespace, it should work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Katrin Fischer 2020-05-02 01:15:33 UTC
The same as used in other spots - one line change. Taking liberty to pass this one directly.
Comment 4 Martin Renvoize 2020-05-04 08:31:11 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-05-11 20:36:43 UTC
Backported to 19.11.x for 19.11.06
Comment 6 Lucas Gass 2020-05-15 20:20:22 UTC
backported to 19.05.x for 19.05.11