[Bug 6782] New: Move autoi member cardnumber generation to occur when record is "Saved"
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Bug #: 6782 Summary: Move autoi member cardnumber generation to occur when record is "Saved" Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_6 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Patrons AssignedTo: kyle.m.hall@gmail.com ReportedBy: savitra.sirohi@osslabs.biz QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com 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. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Savitra Sirohi <savitra.sirohi@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Move autoi member |Move auto member cardnumber |cardnumber generation to |generation to occur when |occur when record is |record is "Saved" |"Saved" | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Savitra Sirohi <savitra.sirohi@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |amit.gupta@osslabs.biz AssignedTo|kyle.m.hall@gmail.com |meenakshi.r@osslabs.biz -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Gaetan Boisson <gaetan.boisson@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gaetan.boisson@biblibre.com --- Comment #1 from Gaetan Boisson <gaetan.boisson@biblibre.com> --- Confirmed. The method described by Savitra is the way it works when generating barcodes for items and it should indeed be the one used to generate card numbers as well. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Gaetan Boisson <gaetan.boisson@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Move auto member cardnumber |Move auto member cardnumber |generation to occur when |generation to occur when |record is "Saved" |record is "Saved" (avoid | |collisions) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Savitra Sirohi <savitra.sirohi@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|rel_3_6 |master -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 --- Comment #2 from Meenakshi <meenakshi.r@osslabs.biz> --- Created attachment 9945 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9945&action=edit Attaching Patch. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Meenakshi <meenakshi.r@osslabs.biz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Michael Davis <m.r.davis@cranfield.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |m.r.davis@cranfield.ac.uk --- Comment #3 from Michael Davis <m.r.davis@cranfield.ac.uk> --- The field is still marked as required, so fails the javascript validation on form submit. The comment under the field would be better if it followed the style under the other form elements - <div class="hint"> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Gaetan Boisson <gaetan.boisson@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #4 from Gaetan Boisson <gaetan.boisson@biblibre.com> --- Michael, you can choose which fields are mandatory in the BorrowerMandatoryField syspref, cardnumber is mandatory by default. So with this patch if you activate autoMemberNum then you need to remove cardnumber form BorrowerMandatoryField. I would say either we just add it in the text that goes with the syspref : "Do / Don't default the card number field on the patron addition screen to the next available card number (for example, if the largest currently used card number is 26345000012941, then this field will default to 26345000012942). ++Remember to remove cardnumber from the BorrowerMandatoryField syspref if you switch this on++", or we remove it from BorrowerMandatoryField's default value (i think this would be a bad idea), or we find a way to bypass the mandatory behaviour on this field when autoMemberNum is on (This sounds like a complicated idea). I'll sign this off for now, and leave it to the QA team to decide wether we need to add something to make things clearer. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 --- Comment #5 from Gaetan Boisson <gaetan.boisson@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@biblibre.com> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Gaetan Boisson <gaetan.boisson@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |7068 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9945|0 |1 is obsolete| | --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- Comment on attachment 9945 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9945 Attaching Patch. This patch obsoleted by the signed-off one -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |paul.poulain@biblibre.com --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: some Perl comments: + if(C4::Context->preference("autoMemberNum")) { + if ($data{'cardnumber'} eq '') { + $data{'cardnumber'}= fixup_cardnumber($data{'cardnumber'},C4::Context->userenv->{'branch'}, $data{'categorycode'}); + } + } => you should write + if (C4::Context->preference("autoMemberNum") && $data{'cardnumber'} eq '') { + $data{'cardnumber'}= fixup_cardnumber($data{'cardnumber'},C4::Context->userenv->{'branch'}, $data{'categorycode'}); + } and +if (C4::Context->preference("autoMemberNum")) { + $template->param( autoMemberNum => 1); +} else { + $template->param( autoMemberNum => 0); +} could be set + $template->param( autoMemberNum => C4::Context->preference("autoMemberNum")); Marking failed QA for that reason, please fix & resubmit, i'll push quickly -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|koha-bugs@lists.koha-commun |paul.poulain@biblibre.com |ity.org | -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org