Bug 30140 - Allow for autoMemberNum to generate cardnumbers with leading zeros
Summary: Allow for autoMemberNum to generate cardnumbers with leading zeros
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-21 01:30 UTC by Fernando Soares
Modified: 2023-06-17 15:38 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Soares 2022-02-21 01:30:18 UTC
If you have autoMemberNum turned on it doesn't check the CardnumberLength system preference when generating a number.

Example:

- last cardNumber is '002150'.
- CardnumberLength set to '6'.
- autoMemberNum turned on.

When I create new patron and save it, then the new cardNumber generated by system via autoMemberNum will be '2151' and not '002151' as expected due CardnumberLength set to '6'.
Comment 1 Katrin Fischer 2022-02-21 08:10:20 UTC
Hi Fernando, 

CardnumberLength is supposed to be used for checking that entered cardnumbers are valid. It doesn't work the way you want to in adding the leading zeros. The autoMemberNum is just made to add 1 to the biggest cardnumbernumber in your system. At the moment it can't handle adding leading zeros, but I think that would have to be a separate pref or option.
Comment 2 Anke Bruns 2022-11-29 16:34:26 UTC
This would be a great enhancement!