Bug 25341 - When adding a single item to course reserves, ignore whitespace
Summary: When adding a single item to course reserves, ignore whitespace
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-01 14:15 UTC by Katrin Fischer
Modified: 2020-05-15 20:20 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
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 (1.10 KB, patch)
2020-05-01 17:03 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25341: Remove whitespace from barcode in add_items.pl (1.16 KB, patch)
2020-05-02 01:14 UTC, Katrin Fischer
Details | Diff | Splinter Review

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