[Bug 8533] New: Non-numeric cardnumbers screw up autoMemberNum
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Priority: P5 - low Change sponsored?: --- Bug ID: 8533 CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: Non-numeric cardnumbers screw up autoMemberNum Severity: enhancement Classification: Unclassified OS: All Reporter: kyle@bywatersolutions.com Hardware: All Status: NEW Version: master Component: Patrons Product: Koha Non-numeric cardnumbers screw up autoMemberNum. Even though autoMemberNum assumes a library is using numeric cardnumbers, it shouldn't go haywire if one ends up in the database. A simple fix is to select only on numeric cardnumbers only when getting the 'max' current cardnumber. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11217 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11217&action=edit Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Test Plan: 1) Enable autoMemberNum 2) Check the value of the automatically generated cardnumber in memberentry.pl 3) Create a borrower with a cardnumber such as 'P13000' 4) Repeat step 2, your next automatic cardnumber should be way out of order. 5) Apply patch 6) Check the value of the automatic cardnumber in memberentry.pl, it should now be a sane value. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Severity|enhancement |minor -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11217|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 11221 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11221&action=edit Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Hi Kyle, I can't reproduce the issue without your patch. I am under the impression, your patch is useless: mysql> SELECT CAST( "P13000" AS SIGNED ); +----------------------------+ | CAST( "P13000" AS SIGNED ) | +----------------------------+ | 0 | +----------------------------+ Indeed, a non-numeric cast as SIGNED is equal to 0 Maybe I missed something ? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- However, mysql raises a warning with the previous query: | Warning | 1292 | Truncated incorrect INTEGER value: 'P13000' | Which it does not exist with your patch. Then I will sign off your patch :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11221|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 11249 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11249&action=edit Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Removes a warning from mysql: Truncated incorrect INTEGER value: 'P13000' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Jonathan Druart <jonathan.druart@biblibre.com> 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |mtj@kohaaloha.com --- Comment #7 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #6)
Created attachment 11249 [details] Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Removes a warning from mysql: Truncated incorrect INTEGER value: 'P13000'
patch looks good, passing QA - nice regex Kyle! :) mason@xen1:~/git/head$ koha-qa.pl * 38c7808 Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum C4/Members.pm - perlcritic-progressive tests... OK - perl -c syntax tests... OK - xt/tt_valid.t tests... OK - xt/author/valid-template.t tests... OK -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_8 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed. Please not that the query will be long to execute on a large borrowers table, as it's not well optimized by the SQL parser. (But that was already the case before your patch) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8533 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x will be in 3.8.5 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org