Description
Marc Véron
2015-10-04 16:23:45 UTC
Created attachment 43094 [details] [review] Bug 14949 - Remove C4::Dates from admin/smart-rules.pl and admin/categorie.pl Bug to remove C4::Dates from - admin/smart-rules.pl - admin/categorie.pl To test: - Apply patch - Go to Home > Administration > Circulation and fine rules (smart-rules.pl) - Edit or add a rule - Verify that 'Hard due date' displays and saves fine - Go to Home > Administration > Patron categories - Edit or add a category - Verify that 'Until date' displays and saves fine Note: The date picker does not warn about wrong date formats as e.g. while editing patrons, but that is not in the scope of this bug Created attachment 43101 [details] [review] Bug 14949 - Remove C4::Dates from admin/smart-rules.pl and admin/categorie.pl Test plan works, code looks good. Bug to remove C4::Dates from - admin/smart-rules.pl - admin/categorie.pl To test: - Apply patch - Go to Home > Administration > Circulation and fine rules (smart-rules.pl) - Edit or add a rule - Verify that 'Hard due date' displays and saves fine - Go to Home > Administration > Patron categories - Edit or add a category - Verify that 'Until date' displays and saves fine Note: The date picker does not warn about wrong date formats as e.g. while editing patrons, but that is not in the scope of this bug Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Regression found: There is no way to reset a hard due date. To reproduce: Don't apply this patch, go on smart-rules.pl and edit a line. Do not define a Hard due date, save. The value is "None defined". Apply this patch, edit the line, do not change anything and save. The value is now "before 06/10/2015" Created attachment 43169 [details] [review] Bug 14949 - (followup) Fix regression with hard due date This patch fixes the regresseion as described in comment #3 To test: - Go on smart-rules.pl and edit a line. Do not define a Hard due date, save. The value is "None defined". - Edit the line, do not change anything and save. The value should be "None defined" - Edit the line, define a hard due date, save. The date should display as expected. - Edit the line agein, remove the hard due date, save. The value should be "None defined" Hi Marc Yet another line with C4::Dates in admin/categorie.pl $category->enrolmentperioddate( C4::Dates::format_date( $category->enrolmentperioddate() ) ); This in line 286 Hi Héctor, Thaks for this catch. The date formatting is not necessary here. Additionally, there is a bug: enrolmentperiod and enrolmentperioddate are not transmitted to the template. To verify, try to delete some categories. The confirmation screen will always display Enrollment period: until instead of Enrollment period: 99 months or Enrollment period: until (a date) Patch follows. Created attachment 43409 [details] [review] Bug 14949 - Remove remaining C4::Dates and fix display in admin/categorie.pl This patch removes a remaining C4::Dates from admin/categroie.pl and fixes the display of "Enrollment period" on the confirmation screen for deleting. To verify and test pls. refer to comments #5 and #6 Still applies / Auto merging Created attachment 43884 [details] [review] [SIGNED-OFF]Bug 14949 - (followup) Fix regression with hard due date This patch fixes the regresseion as described in comment #3 To test: - Go on smart-rules.pl and edit a line. Do not define a Hard due date, save. The value is "None defined". - Edit the line, do not change anything and save. The value should be "None defined" - Edit the line, define a hard due date, save. The date should display as expected. - Edit the line agein, remove the hard due date, save. The value should be "None defined" Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Created attachment 43885 [details] [review] [SIGNED-OFF]Bug 14949 - Remove remaining C4::Dates and fix display in admin/categorie.pl This patch removes a remaining C4::Dates from admin/categroie.pl and fixes the display of "Enrollment period" on the confirmation screen for deleting. To verify and test pls. refer to comments #5 and #6 Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Created attachment 43934 [details] [review] [PASSED QA] Bug 14949 - Remove C4::Dates from admin/smart-rules.pl and admin/categorie.pl Bug to remove C4::Dates from - admin/smart-rules.pl - admin/categorie.pl To test: - Apply patch - Go to Home > Administration > Circulation and fine rules (smart-rules.pl) - Edit or add a rule - Verify that 'Hard due date' displays and saves fine - Go to Home > Administration > Patron categories - Edit or add a category - Verify that 'Until date' displays and saves fine Note: The date picker does not warn about wrong date formats as e.g. while editing patrons, but that is not in the scope of this bug Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 43935 [details] [review] [PASSED QA] Bug 14949 - (followup) Fix regression with hard due date This patch fixes the regresseion as described in comment #3 To test: - Go on smart-rules.pl and edit a line. Do not define a Hard due date, save. The value is "None defined". - Edit the line, do not change anything and save. The value should be "None defined" - Edit the line, define a hard due date, save. The date should display as expected. - Edit the line agein, remove the hard due date, save. The value should be "None defined" Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 43936 [details] [review] [PASSED QA] Bug 14949 - Remove remaining C4::Dates and fix display in admin/categorie.pl This patch removes a remaining C4::Dates from admin/categroie.pl and fixes the display of "Enrollment period" on the confirmation screen for deleting. To verify and test pls. refer to comments #5 and #6 Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Patches pushed to master. Thanks Marc! |