[Bug 33684] New: Able to save patron without date of birth when field is set as mandatory
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Bug ID: 33684 Summary: Able to save patron without date of birth when field is set as mandatory 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: emmi.takkinen@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com One is able to save patron without date of birth even if "dateofbirth" is set mandatory in syspref BorrowerMandatoryField. This doesn't seem to happen with other fields. To reproduce: 1. Add "dateofbirth" to syspref BorrowerMandatoryField. 2. Add patron and leave date of birth input field empty. 3. Save. => Patron is saved succesfully. -- 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=33684 --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Tested this a bit and it seems that any field with flatpicker attached to it has this same problem, e.g. expiration date. -- 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=33684 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Summary|Able to save patron without |Able to save patron with |date of birth when field is |empty mandatory date fields |set as mandatory | -- 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=33684 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Jonathan Druart <jonathan.druart+koha@gmail.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=33684 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150823 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150823&action=edit Bug 33684: Make mandatory date fields required when editing a patron Date fields in BorrowerMandatoryField are not required by the validation form when a new patron is added or modified. This is because the 'required' prop does not exist on the input element when the flatpickr instance is created. We should either add it in the DOM directly (tt), but it will require to do it "manually" for each date fields, or add it when we add it to the inputs. This patch implements the second option. Test plan: 1. Add "dateofbirth" to syspref BorrowerMandatoryField. 2. Add patron and leave date of birth input field empty. 3. Save. => Form is not submitted and you are asked to fill in a date of birth -- 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=33684 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- 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=33684 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150823|0 |1 is obsolete| | --- Comment #3 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 150826 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150826&action=edit Bug 33684: Make mandatory date fields required when editing a patron Date fields in BorrowerMandatoryField are not required by the validation form when a new patron is added or modified. This is because the 'required' prop does not exist on the input element when the flatpickr instance is created. We should either add it in the DOM directly (tt), but it will require to do it "manually" for each date fields, or add it when we add it to the inputs. This patch implements the second option. Test plan: 1. Add "dateofbirth" to syspref BorrowerMandatoryField. 2. Add patron and leave date of birth input field empty. 3. Save. => Form is not submitted and you are asked to fill in a date of birth Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=33684 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150826|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 150831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150831&action=edit Bug 33684: Make mandatory date fields required when editing a patron Date fields in BorrowerMandatoryField are not required by the validation form when a new patron is added or modified. This is because the 'required' prop does not exist on the input element when the flatpickr instance is created. We should either add it in the DOM directly (tt), but it will require to do it "manually" for each date fields, or add it when we add it to the inputs. This patch implements the second option. Test plan: 1. Add "dateofbirth" to syspref BorrowerMandatoryField. 2. Add patron and leave date of birth input field empty. 3. Save. => Form is not submitted and you are asked to fill in a date of birth Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> https://bugs.koha-community.org/show_bug.cgi?id=33648 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.06 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 --- Comment #6 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.05.00,22.11.06 |23.05.00,22.11.06,22.05.14 released in| | CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33684 Danyon Sewell <danyonsewell@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |danyonsewell@catalyst.net.n | |z Status|Pushed to oldstable |RESOLVED --- Comment #8 from Danyon Sewell <danyonsewell@catalyst.net.nz> --- Not backporting to 21.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org