[Bug 19466] New: Cardnumber auto calc is broken because field is required
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Bug ID: 19466 Summary: Cardnumber auto calc is broken because field is required Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: david.bourgault@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 68099 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68099&action=edit Cardnumber cannot be blank When trying to register a new user, it says Cardnumber is a required field, but it also says to "leave blank for auto calc during registration". -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #1 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 69298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69298&action=edit Bug 19466 - Check if cardnumber mandatory Turns out this isn't a bug, since it is caused by 'cardnumber' being in the 'BorrowerMandatoryField' syspref. It is however confusing for the user that it suggested to leave the field blank when the field is required. To alleviate this I added a condition to the code; it will not suggest leaving the field blank if 'BorrowerMandatoryField' contains 'cardnumber'. To test: Before: 0) Enable autoMemberNum 1) Add 'cardnumber' to BorrowerMandatoryField 2) Go to create a user: a message will appear suggesting you leave the cardnumber field blank for autocalc, but when submitting the form it will show as required. Apply patch 2) Go to create a user: if 'cardnumber' is in BorrowerMandatoryField, the suggestion will not be shown. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Dilan Johnpullé <dilan@calyx.net.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Dilan Johnpullé <dilan@calyx.net.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69298|0 |1 is obsolete| | --- Comment #2 from Dilan Johnpullé <dilan@calyx.net.au> --- Created attachment 69299 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69299&action=edit Bug 19466 - Check if cardnumber mandatory Followed test plan and patch applies and functions as expected. Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|koha-bugs@lists.koha-commun |david.bourgault@inlibro.com |ity.org | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- David, do not forget to set the different fields of the bug report (at least severity and assignee). You should also start your commit messages with 'Bug XXXXX: ' instead of 'Bug XXXXX - ' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |6782 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> ---
From bug 6782, Marc Véron raised this problem: """ Note: Syspref PorrowerMandatoryField must not include cardnumber, otherwise you can not save. Maybe that should be mentioned in the comment for syspref autoMemberNum. """
Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6782 [Bug 6782] Move auto member cardnumber generation to occur when record is "Saved" (avoid collisions) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |kyle@bywatersolutions.com --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- I don't think this is a complete enough solution. We have two choices: A) Hide auto-calc if cardnumber is mandatory B) Strip cardnumber from mandatory fields if auto calc is enabled This patch does A, which is fine. But what I think either solution needs is to display a warning to the library that autocalc and BorrowerMandatoryField are in conflict with each other. Otherwise libraries won't understand why autocalc isn't working even though it's enabled. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69299|0 |1 is obsolete| | --- Comment #6 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 70056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70056&action=edit Bug 19466: Check if cardnumber is mandatory Changes the appearance of the cardnumber entry field in memberentrygen.tt The "Leave empty for autocalc" message has been moved to the hint div under the input field. If AutoMemberNum and BorrowerMandatoryField interfere with each other, the auto calc hint is replace by a warning telling the user that auto calc has been disabled. Cardnumber should now correctly appear as mandatory if marked as such in BorrowerMandatoryField. Test plan: 0] Apply patch 1} Disable AutoMemberNum, remove cardnumber from BorrowerMandatoryField 2) Edit or create a patron, scroll down to cardnumber input field Hint is some form of "Cardnumber must be this long" Cardnumber input is not marked as required There is no mention of auto calc 3> Enable AutoMemberNum Hint includes "Leave empty for auto calc" message 4~ Add cardnumber to BorrowerMandatoryField Hint warns you that your sysprefs are conflicting. Cardnumber input is marked as required 5: Disable AutoMemberNum Hint is some form of "Cardnumber must be this long" Cardnumber input is marked as required -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #7 from David Bourgault <david.bourgault@inlibro.com> --- (In reply to Kyle M Hall from comment #5)
I don't think this is a complete enough solution. We have two choices: A) Hide auto-calc if cardnumber is mandatory B) Strip cardnumber from mandatory fields if auto calc is enabled
I don't think we should be changing SysPrefs without explicitly telling the user, that would simply lead to more confusion. I changed my patch to make the behavior more explicit to the user by warning him if syspref are interfering with each other, and correctly marking the input field as required. I think this is the most simple option for this problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Claire Gravely <claire_gravely@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Claire Gravely <claire_gravely@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70056|0 |1 is obsolete| | --- Comment #8 from Claire Gravely <claire_gravely@hotmail.com> --- Created attachment 71473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71473&action=edit Bug 19466: Check if cardnumber is mandatory Changes the appearance of the cardnumber entry field in memberentrygen.tt The "Leave empty for autocalc" message has been moved to the hint div under the input field. If AutoMemberNum and BorrowerMandatoryField interfere with each other, the auto calc hint is replace by a warning telling the user that auto calc has been disabled. Cardnumber should now correctly appear as mandatory if marked as such in BorrowerMandatoryField. Test plan: 0] Apply patch 1} Disable AutoMemberNum, remove cardnumber from BorrowerMandatoryField 2) Edit or create a patron, scroll down to cardnumber input field Hint is some form of "Cardnumber must be this long" Cardnumber input is not marked as required There is no mention of auto calc 3> Enable AutoMemberNum Hint includes "Leave empty for auto calc" message 4~ Add cardnumber to BorrowerMandatoryField Hint warns you that your sysprefs are conflicting. Cardnumber input is marked as required 5: Disable AutoMemberNum Hint is some form of "Cardnumber must be this long" Cardnumber input is marked as required Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71473|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 71534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71534&action=edit Bug 19466: Warn about conflicting settings of autoMemberNum and BorrowerMandatoryField for cardnumber Changes the appearance of the cardnumber entry field in memberentrygen.tt The "Leave empty for autocalc" message has been moved to the hint div under the input field. If AutoMemberNum and BorrowerMandatoryField interfere with each other, the auto calc hint is replace by a warning telling the user that auto calc has been disabled. Cardnumber should now correctly appear as mandatory if marked as such in BorrowerMandatoryField. Test plan: 0] Apply patch 1} Disable AutoMemberNum, remove cardnumber from BorrowerMandatoryField 2) Edit or create a patron, scroll down to cardnumber input field Hint is some form of "Cardnumber must be this long" Cardnumber input is not marked as required There is no mention of auto calc 3> Enable AutoMemberNum Hint includes "Leave empty for auto calc" message 4~ Add cardnumber to BorrowerMandatoryField Hint warns you that your sysprefs are conflicting. Cardnumber input is marked as required 5: Disable AutoMemberNum Hint is some form of "Cardnumber must be this long" Cardnumber input is marked as required Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |katrin.fischer@bsz-bw.de Patch complexity|--- |Small patch --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please remember that the commit message subject should describe what has been fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- "Leave blank for auto calc during registration" vs "Leave empty for auto calc during registration" Is it really needed? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- 13:31 < kidclamp_dnd> I would lean towards 'blank' over 'empty' - makes more sense for a form, but either works -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 71558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71558&action=edit Bug 19466: Restore original sentence to avoid additional translation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- On a fresh install, I edit a patron and see: "AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled." That sounds wrong, what can we do? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Because it's on a fresh installation? I think either remove autocalc... or mandatory. I'd lean towards removing the autocalc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19225 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- David, can you have a look? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Can someone explain me the point of the pref autoMemberNum? With BorrowerMandatoryField, it's like we could remove the autoMemberNum: If the cardnumber should not be auto calculated you mark the field as mandatory If it is not mandatory, then we autocalculate it Does it make sense? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #19 from David Bourgault <david.bourgault@inlibro.com> --- That makes sense to me. Would that be a new bug or keep it here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to David Bourgault from comment #19)
That makes sense to me. Would that be a new bug or keep it here?
Actually I got the answer on IRC: some libraries do not use it and they are not defined in DB. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #21 from Barton Chittenden <barton@bywatersolutions.com> --- I would like to see this back-ported, if possible. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #15)
On a fresh install, I edit a patron and see: "AutoMemberNum is set to enabled, but cardnumber is marked as mandatory in BorrowerMandatoryField: auto calc has been disabled." That sounds wrong, what can we do?
Still valid, please fix for 18.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #23 from David Bourgault <david.bourgault@inlibro.com> --- The default value (in syspref.sql) is to set AutoCalc on and have cardnumber be mandatory. Which one should be turned off by default? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think turn off autocalc, it seems the less likely use case and it doesn't work well when you are using your own numbers. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #25 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 74957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74957&action=edit Bug 19466: AutoCalc is off for new installs Default value of AutoMemberNum is now 0. TEST PLAN: 0. Do a fresh install of Koha 1. In system preferences AutoMemberNum should be off 2. No warning should be shown next to the cardnumber field in the patron creation form. Sorry for the late patch. Also I'm not sure which status to use here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 --- Comment #26 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Last patch pushed to master, thanks David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19466 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #27 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 19225 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org