[Bug 14924] New: Remove C4::Dates from members/memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Bug ID: 14924 Summary: Remove C4::Dates from members/memberentry.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org This patch removes C4::Dates from members/memberentry.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 42953 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42953&action=edit Bug 14924 - Remove C4::Dates from members/memberentry.pl This patch removes C4::Dates from members/memberentry.pl To test: - Apply patch - Add and edit patrons with and without birthdate as mandatory field (syspref BorrowerMandatoryField) - Verify that dates (birtdate, registration, expiration) display and are stored correctly -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14870 Assignee|gmcharlt@gmail.com |veron@veron.ch Status|NEW |Needs Signoff Patch complexity|--- |Small patch Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14870 [Bug 14870] Delete C4/Dates.pm from System -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42953|0 |1 is obsolete| | --- Comment #2 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 42964 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42964&action=edit [SIGNED-OFF]Bug 14924 - Remove C4::Dates from members/memberentry.pl This patch removes C4::Dates from members/memberentry.pl To test: - Apply patch - Add and edit patrons with and without birthdate as mandatory field (syspref BorrowerMandatoryField) - Verify that dates (birtdate, registration, expiration) display and are stored correctly Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Tested with syspref BorrowerMandatoryField and table borrowers.dateofbirth -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |hector.hecaxmmx@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 42964 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42964 [SIGNED-OFF]Bug 14924 - Remove C4::Dates from members/memberentry.pl Review of attachment 42964: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14924&attachment=42964) ----------------------------------------------------------------- ::: members/memberentry.pl @@ +170,5 @@
foreach (qw(dateenrolled dateexpiry dateofbirth)) { next unless exists $newdata{$_}; my $userdate = $newdata{$_} or next; + if ( $userdate ) { + $newdata{$_} = output_pref({ dt => dt_from_string( $userdate ), dateformat => 'iso', dateonly => 1 });
You have to care of bad formatted dates, otherwise the user will get a software error. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #4 from Marc Véron <veron@veron.ch> --- Hi Jonathan, I tried to enter an invalid date, but we have the date picker for this date - it seems no longer to be possible to enter invalid dates for the due date. Or do I miss a way to enter an invalid date? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #4)
Hi Jonathan,
I tried to enter an invalid date, but we have the date picker for this date - it seems no longer to be possible to enter invalid dates for the due date.
Or do I miss a way to enter an invalid date?
I have tried with the date of birth on creating/updating a patron. You get a JS alert box but are able to submit the form. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #6 from Marc Véron <veron@veron.ch> --- Ok, I can make it explode if I enter 0000-00-00 for date of birth: --- Can't locate object method "ymd" via package "dateformat" (perhaps you forgot to load "dateformat"?) at /usr/share/kohaclone/Koha/DateUtils.pm line 206. --- I think we need a generic function in Koha::DateUtils to test a date string against the 'dateformat' syspref. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- You can try with: 32/01/1970 Actually it will explode if the date is not correct. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14936 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14936 [Bug 14936] Add validation for date strings to Koha::DateUtils -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #8 from Marc Véron <veron@veron.ch> --- Created attachment 43028 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43028&action=edit Bug 14924 - (follow-up) Add date validation This patch adds a date validation (see comment #3). To test: - Make sure that you test on top of Bug 14936 (Add validation for date strings to Koha::DateUtils - Apply patch - Create a new user or edit an existing user - Try valid dates for date of birth - Try invalid dates as 0000-00-00 or 32/01/1970. You can can copy/paste such strings to the date field, ignore the warning message and submit. Verify that after submit you get a message "Date of birth is invalid" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |BLOCKED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #9 from Marc Véron <veron@veron.ch> --- Created attachment 43065 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43065&action=edit Bug 14924 - (follow-up) Add date validation using eval This patch adds a date validation (see comment #3). To test: - Apply patch - Create a new user or edit an existing user - Try valid dates for date of birth - Try invalid dates as 0000-00-00 or 32/01/1970. You can can copy/paste such strings to the date field, ignore the warning message and submit. Verify that after submit you get a message "Date of birth is invalid" - Try the same with enrollement /expiry dates -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43028|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Needs Signoff Depends on|14936 | Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14936 [Bug 14936] Add validation for date strings to Koha::DateUtils -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43065|0 |1 is obsolete| | --- Comment #10 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Created attachment 43217 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43217&action=edit [SIGNED-OFF]Bug 14924 - (follow-up) Add date validation using eval This patch adds a date validation (see comment #3). To test: - Apply patch - Create a new user or edit an existing user - Try valid dates for date of birth - Try invalid dates as 0000-00-00 or 32/01/1970. You can can copy/paste such strings to the date field, ignore the warning message and submit. Verify that after submit you get a message "Date of birth is invalid" - Try the same with enrollement /expiry dates Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Tested with invalid dates. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42964|0 |1 is obsolete| | Attachment #43217|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43220 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43220&action=edit Bug 14924 - Remove C4::Dates from members/memberentry.pl This patch removes C4::Dates from members/memberentry.pl To test: - Apply patch - Add and edit patrons with and without birthdate as mandatory field (syspref BorrowerMandatoryField) - Verify that dates (birtdate, registration, expiration) display and are stored correctly Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Tested with syspref BorrowerMandatoryField and table borrowers.dateofbirth Bug 14924 - (follow-up) Add date validation using eval This patch adds a date validation (see comment #3). To test: - Apply patch - Create a new user or edit an existing user - Try valid dates for date of birth - Try invalid dates as 0000-00-00 or 32/01/1970. You can can copy/paste such strings to the date field, ignore the warning message and submit. Verify that after submit you get a message "Date of birth is invalid" - Try the same with enrollement /expiry dates Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Tested with invalid dates. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Amended patch: I have splitted them to make them much more readable (some lines were removed then added). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #11)
Amended patch: I have splitted them to make them much more readable (some lines were removed then added).
s/splitted/squashed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14924 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Resolution|--- |FIXED Status|Pushed to Master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org