[Bug 15702] New: Patron details: Problems with leading and trailing blanks (surname, firstname, etc.)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Bug ID: 15702 Summary: Patron details: Problems with leading and trailing blanks (surname, firstname, etc.) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com It is possible to enter leading and trailing blanks in patron's surname, firstname (and in other fields as well). This leads to visible and invisible symptoms like wrong sorting, name not findable if you browse by last name, display of blanks where you do not expect them. -- 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=15702 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 47424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47424&action=edit Leading / trailing blanks in patron information (screenshots) -- 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=15702 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=10177 -- 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=15702 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=14509 -- 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=15702 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Thanks for filing this bug--I should have done so ages ago. This is enough of a problem for us that I regularly run a report to catch these records and correct them. I'm not sure why librarians here are so trigger-happy on the keyboard. We addressed this issue a long time ago with barcodes. See in returns.pl, line 253: $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace Is there any reason not to trim leading and trailing whitespace from all the data submitted during patron entry? -- 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=15702 --- Comment #3 from Marc Véron <veron@veron.ch> --- (In reply to Owen Leonard from comment #2)
Thanks for filing this bug--I should have done so ages ago. This is enough of a problem for us that I regularly run a report to catch these records and correct them. I'm not sure why librarians here are so trigger-happy on the keyboard.
We addressed this issue a long time ago with barcodes. See in returns.pl, line 253: $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
Is there any reason not to trim leading and trailing whitespace from all the data submitted during patron entry?
I think there is no any reason to not trim trailin and leading whte spaces. Please go ahead and I will be to signoff. -- 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=15702 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron details: Problems |Trim whitespace from patron |with leading and trailing |details upon submission |blanks (surname, firstname, | |etc.) | -- 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=15702 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- +1. No reason not to -- 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=15702 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- 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=15702 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 58717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58717&action=edit Bug 15702: Trim whitespace from fields with non-whitespace data Since space may be a valid value for something, trimming what has non-whitespace was done. TEST PLAN --------- 1) Enter patron with spaces before, after, and both. 2) Apply patch. 3) Attempt to enter another patron with spaces before, after, and both. -- attempting to edit after saving will demonstrate the spaces were trimmed. 4) Attempt to edit the patron initially entered. -- while there may be spaces before, after, and both initially, after saving and trying to edit again, there will not be. 5) run koha qa test tools. -- 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=15702 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy CC| |mtompset@hotmail.com -- 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=15702 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=15702 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58717|0 |1 is obsolete| | --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 58768 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58768&action=edit [SIGNED-OFF] Bug 15702: Trim whitespace from fields with non-whitespace data Since space may be a valid value for something, trimming what has non-whitespace was done. TEST PLAN --------- 1) Enter patron with spaces before, after, and both. 2) Apply patch. 3) Attempt to enter another patron with spaces before, after, and both. -- attempting to edit after saving will demonstrate the spaces were trimmed. 4) Attempt to edit the patron initially entered. -- while there may be spaces before, after, and both initially, after saving and trying to edit again, there will not be. 5) run koha qa test tools. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- 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=15702 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Keywords|Academy | -- 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=15702 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think this should be done in ModMember and AddMember, covered by tests. -- 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=15702 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |mtompset@hotmail.com |ity.org | -- 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=15702 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 62519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62519&action=edit Bug 15702: Add test cases for modified code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58768|0 |1 is obsolete| | --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 62520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62520&action=edit Bug 15702: Recommended Counter-patch As per comment #7, this patch affects AddMember and ModMember. The test plan should be the same as comment #6. Secondary patch with tests still to come. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- TEST PLAN ---------- 1) Apply first patch 2) Run prove -v t/db_dependent/Members.t -- expecting failures 3) Apply second patch 4) Run prove -v t/db_dependent/Members.t -- expecting success 5) run koha qa test tools -- two files modified with no issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62519|0 |1 is obsolete| | --- Comment #11 from Marc Véron <veron@veron.ch> --- Created attachment 62527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62527&action=edit Bug 15702: Add test cases for modified code Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62520|0 |1 is obsolete| | --- Comment #12 from Marc Véron <veron@veron.ch> --- Created attachment 62528 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62528&action=edit Bug 15702: Recommended Counter-patch As per comment #7, this patch affects AddMember and ModMember. The test plan should be the same as comment #6. Secondary patch with tests still to come. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 --- Comment #13 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Marc Véron from comment #12)
As per comment #7, this patch affects AddMember and ModMember.
Yes. :)
The test plan should be the same as comment #6.
No, the test plan is comment #10. TEST PLAN ---------- 1) Apply first patch 2) Run prove -v t/db_dependent/Members.t -- expecting failures 3) Apply second patch 4) Run prove -v t/db_dependent/Members.t -- expecting success 5) run koha qa test tools -- two files modified with no issues
Secondary patch with tests still to come.
Because I purposefully changed two tests, there are no additional tests. The initial failures are because I purposefully changed the add and mod to include an extra space (. q{ }) at the end in two of the tests. With the new code, that will not change anything, because they are filtered. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 --- Comment #14 from Marc Véron <veron@veron.ch> --- (In reply to M. Tompsett from comment #13)
(In reply to Marc Véron from comment #12)
As per comment #7, this patch affects AddMember and ModMember.
Yes. :)
The test plan should be the same as comment #6.
No, the test plan is comment #10.
Sorry, I did not edit the original commit messages. I expected them to be up to date.
TEST PLAN ---------- 1) Apply first patch 2) Run prove -v t/db_dependent/Members.t -- expecting failures 3) Apply second patch 4) Run prove -v t/db_dependent/Members.t -- expecting success 5) run koha qa test tools -- two files modified with no issues
Secondary patch with tests still to come.
Because I purposefully changed two tests, there are no additional tests. The initial failures are because I purposefully changed the add and mod to include an extra space (. q{ }) at the end in two of the tests. With the new code, that will not change anything, because they are filtered. :)
Not sure, is my Sign-off OK or should I do more testing? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Marc Véron from comment #14)
Sorry, I did not edit the original commit messages. I expected them to be up to date.
Sorry, I failed to update them. That's my fault.
Not sure, is my Sign-off OK or should I do more testing?
If you ran the prove, your sign off is okay. If not, run the prove. :) And feel free to update the test plan. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 --- Comment #16 from Marc Véron <veron@veron.ch> --- (In reply to M. Tompsett from comment #15)
(In reply to Marc Véron from comment #14)
Sorry, I did not edit the original commit messages. I expected them to be up to date.
Sorry, I failed to update them. That's my fault.
Not sure, is my Sign-off OK or should I do more testing?
If you ran the prove, your sign off is okay. If not, run the prove. :) And feel free to update the test plan. :)
No problem, proves were OK, QA tools as well. :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=15702 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62527|0 |1 is obsolete| | Attachment #62528|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 62613 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62613&action=edit Bug 15702: Add test cases for modified code Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 62614 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62614&action=edit Bug 15702: Recommended Counter-patch As per comment #7, this patch affects AddMember and ModMember. The test plan should be the same as comment #6. Secondary patch with tests still to come. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Mark! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18494 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 [Bug 18494] Fix Letters.t (follow-up of 15702) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.08. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #21 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.13 release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org