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

Jonathan Druart <jonathan.dru...@bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55964|0                           |1
        is obsolete|                            |

--- Comment #14 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> 
---
Created attachment 58173
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58173&action=edit
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.

Followed test plan, works as expected.
Note: Syspref PorrowerMandatoryField must not include cardnumber, otherwise
      you can not save. Maybe that should be mentioned in the comment for
      syspref autoMemberNum.
Signed-off-by: Marc VĂ©ron <ve...@veron.ch>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://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