[Bug 28495] New: Add validation to branchcode upon library creation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Bug ID: 28495 Summary: Add validation to branchcode upon library creation Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Since hyphens and trailing spaces can cause issues in the branchcode (see bug 28492), I propose we add a validation to the branchcode when a user creates a new library. I would limit it to letters and numbers only. Is there something else? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 121737 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121737&action=edit Bug 28495: Improve validation of library entry form This patch adds validation of the "Library code" field so that entry is limited to letters and numbers. Also changed: Updated the email fields to add the "email" type attribute (see also Bug 27805). To test, apply the patch and go to Administration -> Libraries -> New library. - Try entering various strings in the "Library code" field. If you enter anything other than letters and numbers an error message should be displaed on blur or on submit. - Try submitting the form with no data in the "Library code" and/or "Name" field. The fields should be required. - Test entering various strings in the email-type fields: Email, Ill staff email, Reply-To, and Return-Path. Non-email entries should trigger a message, "Please enter a valid email address." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Salman Ali <salman.ali@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |salman.ali@inLibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Is this really signed off? It looks like you may have forgotten to attach the signed-off patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Salman Ali <salman.ali@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121737|0 |1 is obsolete| | --- Comment #3 from Salman Ali <salman.ali@inLibro.com> --- Created attachment 121867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121867&action=edit Bug 28495: Improve validation of library entry form This patch adds validation of the "Library code" field so that entry is limited to letters and numbers. Also changed: Updated the email fields to add the "email" type attribute (see also Bug 27805). To test, apply the patch and go to Administration -> Libraries -> New library. - Try entering various strings in the "Library code" field. If you enter anything other than letters and numbers an error message should be displaed on blur or on submit. - Try submitting the form with no data in the "Library code" and/or "Name" field. The fields should be required. - Test entering various strings in the email-type fields: Email, Ill staff email, Reply-To, and Return-Path. Non-email entries should trigger a message, "Please enter a valid email address." Signed-off-by: Salman Ali <salman@outaouais> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Underscores? I know we have many libraries that have these in existing libraries and may want to continue with their naming pattern. I like preventing problems, but am we can limit this far -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 123318 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123318&action=edit Bug 28495: (QA follow-up) Enable the use of underscores in branch codes This patch adds underscores to the list of valid characters in the branch code field. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121867|0 |1 is obsolete| | Attachment #123318|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 123332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123332&action=edit Bug 28495: Improve validation of library entry form This patch adds validation of the "Library code" field so that entry is limited to letters and numbers. Also changed: Updated the email fields to add the "email" type attribute (see also Bug 27805). To test, apply the patch and go to Administration -> Libraries -> New library. - Try entering various strings in the "Library code" field. If you enter anything other than letters and numbers an error message should be displaed on blur or on submit. - Try submitting the form with no data in the "Library code" and/or "Name" field. The fields should be required. - Test entering various strings in the email-type fields: Email, Ill staff email, Reply-To, and Return-Path. Non-email entries should trigger a message, "Please enter a valid email address." Signed-off-by: Salman Ali <salman.ali@inLibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 123333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123333&action=edit Bug 28495: (QA follow-up) Enable the use of underscores in branch codes This patch adds underscores to the list of valid characters in the branch code field. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | Status|Signed Off |Passed QA --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- We cannot edit existing branchcodes, so should nto cause issues for previously entered names, and prevents issues with new ones -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |jonathan.druart+koha@gmail. | |com --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Why this limitation? I would exclude a list of special characters but not to anything that is not a-Z0-9, "❤" is a valid branchcode and is known (by me, at least) to work perfectly. It will certainly be considered as a regression by users not using Latin alphabet. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123332|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123333|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The initial issue was with search here. If you have A-B and A as branch codes, limiting to A will also bring up A-B. Could be adding a hint that using _ space and - might lead to unexpected search results an alternative? That said, there _IS_ validation on the branchcode in the onboarding tool that is not reflected in the normal GUI - so instead of adding validation here, we could remove it there and add hints in both spots. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Eric Bégin <eric.begin@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|salman.ali@inLibro.com |eric.begin@inLibro.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #11 from Blou <philippe.blouin@inlibro.com> --- Some variation of this issue poped up again, this time with categories. Rereading the comments from the QAs, I see a resistance to putting restrictions on the branchcode (or other auth values, as well), but I see no trace of a solution. Underscores, hyphens, trailing spaces are breaking the search, and it's ok ? I don't see why Koha should accept *everything* for a CODE(!!). Yeah, we want the description to be flexible, in any language, but I don't get it for the code. We don't have to be uberrestrictive, but at least known problems should be avoided. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #12 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 183340 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183340&action=edit Bug 28495: Add hint to branchcode input -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183340|0 |1 is obsolete| | --- Comment #13 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183346&action=edit Bug 28495: Add hint to branchcode input This patch adds a hint to the library creation form warning the user about what characters are valid in the "Library code" field. To test, apply the patch and go to Administration -> Libraries -> New library. Under the "Library code" input you should see a hint, "Note: Whitespace is not permitted. The use of hyphens, dashes, or other punctuation may cause searching issues." Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- If we're going with just a hint, we should probably rename this report. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Summary|Add validation to |Add hint about whitespace |branchcode upon library |usage upon library creation |creation | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|nick@bywatersolutions.com |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183346|0 |1 is obsolete| | --- Comment #15 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 190994 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190994&action=edit Bug 28495: Add hint to branchcode input This patch adds a hint to the library creation form warning the user about what characters are valid in the "Library code" field. To test, apply the patch and go to Administration -> Libraries -> New library. Under the "Library code" input you should see a hint, "Note: Whitespace is not permitted. The use of hyphens, dashes, or other punctuation may cause searching issues." Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #16 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.02 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 --- Comment #17 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28495 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #18 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Not backporting to 25.05 as this is an enhancement. Happy to revisit if needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org