https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26035 Bug ID: 26035 Summary: AutoMemberNum fails on very large cardnumbers 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: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To recreate: - create a borrower with cardnumber 603628999632182575912 - turn on automembernum - create a new patron, save without a cardnumber - see that your new patron has cardnumber 0 As part of the fixup_cardnumber sub in Patron.pm, we CAST(cardnumber AS SIGNED), which tries to make the cardnumber into a 64 bit integer. Way back in bug 13178, we increased the max length of a cardnumber to 32 characters, which is longer than a 64 bit integer can handle. So the CAST spits out a -1, to which Koha adds 1, arriving at cardnumber 0. Why do we cast it as signed in the first place? I don't understand enough about integers to see what purpose this is serving. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.