Bug 13441

Summary: Branchcodes should not be allowed to have spaces in them
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: chris, mtj, tomascohen, veron
Version: unspecified   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10177
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 13441 - Branchcodes should not be allowed to have spaces in them
Bug 13441 - Branchcodes should not be allowed to have spaces in them
Bug 13441 - Branchcodes should not be allowed to have spaces in them
[PASSED QA] Bug 13441 - Branchcodes should not be allowed to have spaces in them

Description Kyle M Hall (khall) 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 (khall) 2015-01-02 12:16:33 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2015-01-02 12:17:41 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall (khall) 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 (tcohen) 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