Bug 13441 - Branchcodes should not be allowed to have spaces in them
Summary: Branchcodes should not be allowed to have spaces in them
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords: rel_3_16_candidate
Depends on:
Blocks:
 
Reported: 2014-12-11 15:49 UTC by Kyle M Hall
Modified: 2015-12-03 22:02 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13441 - Branchcodes should not be allowed to have spaces in them (2.92 KB, patch)
2015-01-02 12:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13441 - Branchcodes should not be allowed to have spaces in them (2.92 KB, patch)
2015-01-02 12:17 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13441 - Branchcodes should not be allowed to have spaces in them (3.11 KB, patch)
2015-01-02 13:20 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 13441 - Branchcodes should not be allowed to have spaces in them (3.23 KB, patch)
2015-01-04 22:24 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 Kyle M Hall 2014-12-11 15:49:09 UTC
In multiple cases I've seen issues arise in Koha where a librarian accidentally puts a space at the end of a new branchcode. This of course causes endless confusion because the branchcode looks perfectly fine in every case unless you wrap the code with some characters to reveal the hidden space!
Comment 1 Kyle M Hall 2015-01-02 12:16:33 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2015-01-02 12:17:41 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-01-02 12:19:36 UTC
Please note this patch only stops the creation of new branchcodes with whitespace in them, so this should not cause any issues for existing Koha installations where the branchcodes may already contain spaces.
Comment 4 Marc Véron 2015-01-02 13:20:25 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2015-01-04 22:24:21 UTC
Created attachment 34918 [details] [review]
[PASSED QA] Bug 13441 - Branchcodes should not be allowed to have spaces in them

In multiple cases I've seen issues arise in Koha where a librarian
accidentally puts a space at the end of a new branchcode. This of course
causes endless confusion because the branchcode looks perfectly fine in
every case unless you wrap the code with some characters to reveal the
hidden space!

Test Plan:
1) Try creating a new branch with one or more spaces in the branchcode
2) Note you are able to
3) Apply this patch
4) Repeat step 1
5) Note you are no longer able to

Followed test plan with cache cleared. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Comment 6 Tomás Cohen Arazi 2015-02-05 18:28:50 UTC
Patch pushed to master.

Thanks Kyle!
Comment 7 Chris Cormack 2015-02-10 21:51:48 UTC
Pushed to 3.18.x will be in 3.18.4
Comment 8 Mason James 2015-02-26 03:30:35 UTC
Possible selection for 3.16.9