[Koha-bugs] [Bug 6782] Move auto member cardnumber generation to occur when record is "Saved" (avoid collisions)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jul 3 14:45:21 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782

--- Comment #5 from Gaetan Boisson <gaetan.boisson at biblibre.com> ---
Created attachment 10625
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10625&action=edit
[SIGNED-OFF] Bug 6782 - Move auto member cardnumber generation to occur when
record is "Saved" (avoid collisions).

Currently the card number is generated when the user enters the patron creation
form. This creates a problem of concurrency - when two or more simulataneous
users are registering members, the error "card no. in use" can occur.

This change moves the card number generation to occur after the "Save" button
is pressed.

Changes:
-C4/Members.pm:
Added code to fixup_cardnumber,If the cardnumber is blank and "autoMemberNum"
ON.
-koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:
Added code to display "leave blank for auto calc during registration" in
cardnumber label in patron registration form only if "autoMemberNum" ON.
-members/memberentry.pl:
Added code to get weather or not "autoMemberNum" is on or off and removed
fixup_cardnumber generation.

Test cases:
-If "autoMemberNum" ON:
->In blank case, must generate auto card number in simulataneous users.
->If user entered, check for unique card number.

-If "autoMemberNum" OFF:
Must work normal.

Signed-off-by: Gaetan Boisson <gaetan.boisson at biblibre.com>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list