[Bug 27937] New: Date of birth entered without correct format causes internal server error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Bug ID: 27937 Summary: Date of birth entered without correct format causes internal server error Change sponsored?: --- Product: Koha Version: 20.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: bwsdonna@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com In 20.05 when a birthdate is entered in patron registration form (memberentry.pl) incorrectly, and save button is clicked, you receive an Internal Server Error and all the data is lost. To recreate: 1. Add new patron 2. Enter birthdate as 2/11/1986 3. Complete required fields 4. Save 5. Get ISE Yes, the text below the birthdate does specify MM/DD/YYYY but an incorrect entry should not cause all the data entered to be lost. Perhaps a warning instead that the birthdate format is incorrect? -- 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=27937 Donna <bwsdonna@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |kelly@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=27937 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 118315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118315&action=edit Bug 27937: Unit test -- 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=27937 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 118316 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118316&action=edit Bug 23937: Allow for single date day or month When validating dates in JavaScript it is acceptable to have single digit days or months e.g,: 2011-6-16 When parsing in Koha::DateUtils->dt_from_string we die on these This patch changes the logic to allow for one or two digits in the days and months To test: 1 - Add new patron 2 - Enter birthdate as 2/11/1986 3 - Complete required fields 4 - Save 5 - Get ISE The given date (2/11/1986) does not match the date format (us) at /kohadevbox/koha/Koha/DateUtils.pm line 175 6 - Apply patch 7 - Repeat 1-4 8 - Patron successfully added 9 - Edit patron, try setting DOB to 2/1/1986 10 - Success! 11 - Repeat with other settings of system preference 'dateformat' -- 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=27937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |nick@bywatersolutions.com Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Another option here would be to validate/normalize the data in the JS before passing to Koha -- 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=27937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118315|0 |1 is obsolete| | Attachment #118316|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 118317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118317&action=edit Bug 27937: Set datepicker when date is valid When validating dates in JavaScript it is acceptable to have single digit days or months e.g,: 2011-6-16 When parsing in Koha::DateUtils->dt_from_string we die on these This patch uses JS to set the datepicker which normalizes the date as Koha expects To test: 1 - Add new patron 2 - Enter birthdate as 2/11/1986 3 - Complete required fields 4 - Save 5 - Get ISE The given date (2/11/1986) does not match the date format (us) at /kohadevbox/koha/Koha/DateUtils.pm line 175 6 - Apply patch 7 - Repeat 1-2 8 - Note that when you change focus (click on another field) the date is formatted as '02/11/1986' 9 - Save patron, success! 10 - Edit patron, try setting DOB to 2/1/1986 11 - Change focus and note date is formatted as '02/01/1986', save 12 - Repeat with other settings of system preference 'dateformat' Current status: Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22805 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118317|0 |1 is obsolete| | --- Comment #5 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 118368 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118368&action=edit Bug 27937: Set datepicker when date is valid When validating dates in JavaScript it is acceptable to have single digit days or months e.g,: 2011-6-16 When parsing in Koha::DateUtils->dt_from_string we die on these This patch uses JS to set the datepicker which normalizes the date as Koha expects To test: 1 - Add new patron 2 - Enter birthdate as 2/11/1986 3 - Complete required fields 4 - Save 5 - Get ISE The given date (2/11/1986) does not match the date format (us) at /kohadevbox/koha/Koha/DateUtils.pm line 175 6 - Apply patch 7 - Repeat 1-2 8 - Note that when you change focus (click on another field) the date is formatted as '02/11/1986' 9 - Save patron, success! 10 - Edit patron, try setting DOB to 2/1/1986 11 - Change focus and note date is formatted as '02/01/1986', save 12 - Repeat with other settings of system preference 'dateformat' Signed-off-by: Donna <donna@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Donna <bwsdonna@gmail.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=27937 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|20.05 |unspecified -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |joonas.kylmala@helsinki.fi |y.org | CC| |joonas.kylmala@helsinki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Joonas Kylmälä <joonas.kylmala@helsinki.fi> 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=27937 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118368|0 |1 is obsolete| | --- Comment #6 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 119069 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119069&action=edit Bug 27937: Set datepicker when date is valid When validating dates in JavaScript it is acceptable to have single digit days or months e.g,: 2011-6-16 When parsing in Koha::DateUtils->dt_from_string we die on these This patch uses JS to set the datepicker which normalizes the date as Koha expects To test: 1 - Add new patron 2 - Enter birthdate as 2/11/1986 3 - Complete required fields 4 - Save 5 - Get ISE The given date (2/11/1986) does not match the date format (us) at /kohadevbox/koha/Koha/DateUtils.pm line 175 6 - Apply patch 7 - Repeat 1-2 8 - Note that when you change focus (click on another field) the date is formatted as '02/11/1986' 9 - Save patron, success! 10 - Edit patron, try setting DOB to 2/1/1986 11 - Change focus and note date is formatted as '02/01/1986', save 12 - Repeat with other settings of system preference 'dateformat' Signed-off-by: Donna <donna@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 --- Comment #7 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 119070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119070&action=edit Bug 27937: (QA follow-up) Fix indentation Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119069|0 |1 is obsolete| | Attachment #119070|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 119084 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119084&action=edit Bug 27937: Set datepicker when date is valid When validating dates in JavaScript it is acceptable to have single digit days or months e.g,: 2011-6-16 When parsing in Koha::DateUtils->dt_from_string we die on these This patch uses JS to set the datepicker which normalizes the date as Koha expects To test: 1 - Add new patron 2 - Enter birthdate as 2/11/1986 3 - Complete required fields 4 - Save 5 - Get ISE The given date (2/11/1986) does not match the date format (us) at /kohadevbox/koha/Koha/DateUtils.pm line 175 6 - Apply patch 7 - Repeat 1-2 8 - Note that when you change focus (click on another field) the date is formatted as '02/11/1986' 9 - Save patron, success! 10 - Edit patron, try setting DOB to 2/1/1986 11 - Change focus and note date is formatted as '02/01/1986', save 12 - Repeat with other settings of system preference 'dateformat' Signed-off-by: Donna <donna@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Bug 27937: (QA follow-up) Fix indentation Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.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=27937 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Margaret Hade <margaret@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |margaret@bywatersolutions.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |28538 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28538 [Bug 28538] Regression - Date of birth entered without correct format causes internal server error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27937 Daniel Cordova <danieldaba@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |danieldaba@gmail.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org