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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to