Summary: | Non-numeric cardnumbers screw up autoMemberNum | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Patrons | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | P5 - low | CC: | chris, gmcharlt, jonathan.druart, kyle.m.hall, mtj, paul.poulain |
Version: | 3.8 | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26035 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum
Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum |
Description
Kyle M Hall (khall)
2012-07-31 12:10:08 UTC
Created attachment 11217 [details] [review] Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum 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. Created attachment 11221 [details] [review] Bug 8533 - Non-numeric cardnumbers screw up autoMemberNum 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 ? 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 :) Created attachment 11249 [details] [review] 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' (In reply to comment #6) > Created attachment 11249 [details] [review] > 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 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) Pushed to 3.8.x will be in 3.8.5 |