Description
Marc Véron
2015-10-05 12:34:17 UTC
Created attachment 43123 [details] [review] Bug 14956 - C4::Dates from files opac/*.pl Remove C4::Dates from files: - opac/opac-memberentry.pl - opac/opac-reserve.pl - opac/opac-search-history.pl - opac/opac-showreviews.pl - opac/opac-suggestions.pl - opac/opac-serial-issues.pl - opac/opac-alert-subscribe.pl - opac/opac-ics.pl To test: - Apply patch - Verify, that self registration and holds work as before - Verify that tabs in catalog item detail work and display as before - For serials: Verify that subscriptions work as before. It is a little bit hidden, in tab Subscriptions, then 'More details', then tab 'Brief history', button 'Subscribe to email notificatin on new issues' - For ics: Can not be tested at the moment, not yet used (Bug 5456), pls. have a look at the code changes Hi Marc After applying patch I've found this: /opac/opac-showreviews.pl got C4::Dates declaration in line 59, 116 and patch only eliminate the declaration 'use C4::Dates' Regards Created attachment 43356 [details] [review] Bug 14956 - C4::Dates from files opac/*.pl Remove C4::Dates from files: - opac/opac-memberentry.pl - opac/opac-reserve.pl - opac/opac-search-history.pl - opac/opac-showreviews.pl - opac/opac-suggestions.pl - opac/opac-serial-issues.pl - opac/opac-alert-subscribe.pl - opac/opac-ics.pl To test: - Apply patch - Verify, that self registration and holds work as before - Verify that tabs in catalog item detail work and display as before - For serials: Verify that subscriptions work as before. It is a little bit hidden, in tab Subscriptions, then 'More details', then tab 'Brief history', button 'Subscribe to email notificatin on new issues' - For ics: Can not be tested at the moment, not yet used (Bug 5456), pls. have a look at the code changes (Amended following comment #2) Hi Marc When you go to "your personal details" (opac/opac-memberentry.pl) and if you alter to an invalid date the form it doesn't fail but when you go to staff in Home > Patrons requesting modifications, at the bottom of screen this redirect to members/members-update.pl and you get noticed that the date sent is '0000-00-00' (depends in which format you have dateformat syspref) this data shown in a table: Field From To Date of birth 2015-11-01 0000-00-00 To prevent this (IMHO) I suggest to add readonly="" to the input text or follow the example as koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt Patch follow Created attachment 43357 [details] [review] Bug 14956 - (follow) Prevent patrons to insert invalid dates in opac/opac-memberentry.pl Prevent to insert dates like 0000-00-00, 1970-32-10, etc., according with comment 4. To test 1) Apply last patch 2) Go to 'your personal details in opac' (opac/opac-memberentry.pl) observe that field is readonly and patrons can't insert invalid dates. Created attachment 43359 [details] [review] Bug 14956 - (follow) Prevent patrons to insert invalid dates in opac-memberentry.tt Prevent to insert invalid dates in opac-memberentry.tt. To test 1) Apply last patch (interactive) 2) Goto 'your personal details in opac' and modify date of birth with 2015-10-32 3) Goto staff in Home > Patrons requesting modifications, at the bottom of screen this redirect to members/members-update.pl and you get noticed that the date sent is '0000-00-00' 4) Apply patch 5) Go to 'your personal details in opac' (opac/opac-memberentry.pl) observe that field is readonly and patrons can't insert invalid dates. Created attachment 43362 [details] [review] Bug 14956 - (follow) Prevent patrons to insert invalid dates in opac-memberentry.tt Prevent to insert invalid dates in opac-memberentry.tt. To test 1) Apply last patch (interactive) 2) Goto 'your personal details in opac' and modify date of birth with 2015-10-32 3) Goto staff in Home > Patrons requesting modifications, at the bottom of screen this redirect to members/members-update.pl and you get noticed that the date sent is '0000-00-00' 4) Apply patch 5) Go to 'your personal details in opac' (opac/opac-memberentry.pl) observe that field is readonly and patrons can't insert invalid dates. Field 'Date of birth' in Opac is now restricted to date picker. Works as advertised. Signed-off-by: Marc Véron <veron@veron.ch> http://bugs.koha-community.org/show_bug.cgi?id=14920 The second patch is not the way to do, especially at the OPAC: if the user turned off JS, he cannot enter a date. Comment on attachment 43362 [details] [review] Bug 14956 - (follow) Prevent patrons to insert invalid dates in opac-memberentry.tt Obsoleted this patch becaues of comment #8, replacment patch follows. Created attachment 43408 [details] [review] Bug 14956 - (follow) Validate incoming birth date This patch validates the birthdate and resets it to empty if date is not valid. Still applies Still applies Created attachment 44352 [details] [review] [SIGNED-OFF]Bug 14956 - C4::Dates from files opac/*.pl Remove C4::Dates from files: - opac/opac-memberentry.pl - opac/opac-reserve.pl - opac/opac-search-history.pl - opac/opac-showreviews.pl - opac/opac-suggestions.pl - opac/opac-serial-issues.pl - opac/opac-alert-subscribe.pl - opac/opac-ics.pl To test: - Apply patch - Verify, that self registration and holds work as before - Verify that tabs in catalog item detail work and display as before - For serials: Verify that subscriptions work as before. It is a little bit hidden, in tab Subscriptions, then 'More details', then tab 'Brief history', button 'Subscribe to email notificatin on new issues' - For ics: Can not be tested at the moment, not yet used (Bug 5456), pls. have a look at the code changes (Amended following comment #2) Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Created attachment 44353 [details] [review] [SIGNED-OFF]Bug 14956 - (follow) Validate incoming birth date This patch validates the birthdate and resets it to empty if date is not valid. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised After long, long test, finally signed off Define a date of birth at the opac, validate the changes. Clear the date, go and see the changes: the new date is today. Created attachment 44518 [details] [review] Bug 14956: (followup) Fix birthday date validation in Opac To reproduce / test: - In Opac: Go to 'your personal details' - Enter a valid birtday date - In Staff client: Go to Home > Patrons > Update patron records (Link on start page: Patrons requesting modification) - Verify that the birtday date is correct - Back in Opac, clear the birthday date, try to submit => Validation message appears - Enter an invalid date (32/32/2999 or 00/00/0000), try to submit => Birthday date field is cleared, validation message appears. Created attachment 44534 [details] [review] [SIGNED-OFF]Bug 14956: (followup) Fix birthday date validation in Opac To reproduce / test: - In Opac: Go to 'your personal details' - Enter a valid birtday date - In Staff client: Go to Home > Patrons > Update patron records (Link on start page: Patrons requesting modification) - Verify that the birtday date is correct - Back in Opac, clear the birthday date, try to submit => Validation message appears - Enter an invalid date (32/32/2999 or 00/00/0000), try to submit => Birthday date field is cleared, validation message appears. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Wrong today corrected Just one comment, Marc The Patrons requesting modification (Home > Patrons > Update patron records) does not follow dateformat syspref. file: members/members-update.pl (In reply to Héctor Eduardo Castro Avalos from comment #19) > Just one comment, Marc > > The Patrons requesting modification (Home > Patrons > Update patron records) > does not follow dateformat syspref. > > file: members/members-update.pl Thanks, Héctor, I filed Bug14956 (needs sign-off) Sorry, mistaked: Bug 15146 (Need a double espresso) Created attachment 44593 [details] [review] [PASSED QA] Bug 14956 - C4::Dates from files opac/*.pl Remove C4::Dates from files: - opac/opac-memberentry.pl - opac/opac-reserve.pl - opac/opac-search-history.pl - opac/opac-showreviews.pl - opac/opac-suggestions.pl - opac/opac-serial-issues.pl - opac/opac-alert-subscribe.pl - opac/opac-ics.pl To test: - Apply patch - Verify, that self registration and holds work as before - Verify that tabs in catalog item detail work and display as before - For serials: Verify that subscriptions work as before. It is a little bit hidden, in tab Subscriptions, then 'More details', then tab 'Brief history', button 'Subscribe to email notificatin on new issues' - For ics: Can not be tested at the moment, not yet used (Bug 5456), pls. have a look at the code changes (Amended following comment #2) Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 44594 [details] [review] [PASSED QA] Bug 14956: (followup) Fix birthday date validation in Opac To reproduce / test: - In Opac: Go to 'your personal details' - Enter a valid birtday date - In Staff client: Go to Home > Patrons > Update patron records (Link on start page: Patrons requesting modification) - Verify that the birtday date is correct - Back in Opac, clear the birthday date, try to submit => Validation message appears - Enter an invalid date (32/32/2999 or 00/00/0000), try to submit => Birthday date field is cleared, validation message appears. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised. Wrong today corrected Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Patches pushed to master. Thanks Marc! Created attachment 88203 [details] [review] Bug 14957: Put database updates in perl script Also add schema changes to kohastructure.sql and syspref to sysprefs.sql Created attachment 88204 [details] [review] Bug 14957: Add tests and pod for new options param to ModBiblio Sorry about that, mistyped the bug-number. |