Created attachment 13063 [details] 1912 due date When renewing an item for a patron. If you enter a two digit year (11/01/12) Koha defaults to 1912 and gives you an enormous fine. Koha performs correctly if you enter a four digit year (11/01/2012).
Created attachment 13064 [details] Screen Shot 2
I'm updating this bug to "critical" because every time this happens, patrons are charged for 100 years worth of fines, which is obviously a problem.
I think the fix here is to remove the ability to type, ie they have to use the datepicker. Or refuse to accept 2 digit dates. Trying to guess if the person means 1912, 2012, 2112 .. is just building technical debt. So i vote force them to enter a valid date.
Created attachment 13287 [details] [review] Bug 8972 - Due Date set to 100 years ago In order to prevent submission of dates with ambiguous two-digit years this patch makes date-due input fields read-only so that users must use date/time picker. Other minor fixes: - Adding missing labels - Adding common class wrapper to datepicker for checkout and renewal - Correcting focus handling on "specify due date" field (should focus on barcode field after a date has been selected). - Removing trailing comma from JavaScript (breaks IE) To test, try typing an invalid number in any of the date due entry fields: Under 'specify due date,' 'renewal due date,' or the confirm "invalid" date dialog (after specifying a date in the past). Manual entry should not work. Choosing a date/time using the widget should work.
Created attachment 13295 [details] [review] [Signed off] Bug 8972 - Due Date set to 100 years ago In order to prevent submission of dates with ambiguous two-digit years this patch makes date-due input fields read-only so that users must use date/time picker. Other minor fixes: - Adding missing labels - Adding common class wrapper to datepicker for checkout and renewal - Correcting focus handling on "specify due date" field (should focus on barcode field after a date has been selected). - Removing trailing comma from JavaScript (breaks IE) To test, try typing an invalid number in any of the date due entry fields: Under 'specify due date,' 'renewal due date,' or the confirm "invalid" date dialog (after specifying a date in the past). Manual entry should not work. Choosing a date/time using the widget should work. Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
I tested this patch by following Owen's test plan. It worked beautifully in all three cases (specify due date, renewal date, and confirm invalid date). And I like the little slide bars for the hours and minutes. Thanks, Owen!
Created attachment 13312 [details] [review] Bug 8972 - Due Date set to 100 years ago In order to prevent submission of dates with ambiguous two-digit years this patch makes date-due input fields read-only so that users must use date/time picker. Other minor fixes: - Adding missing labels - Adding common class wrapper to datepicker for checkout and renewal - Correcting focus handling on "specify due date" field (should focus on barcode field after a date has been selected). - Removing trailing comma from JavaScript (breaks IE) To test, try typing an invalid number in any of the date due entry fields: Under 'specify due date,' 'renewal due date,' or the confirm "invalid" date dialog (after specifying a date in the past). Manual entry should not work. Choosing a date/time using the widget should work. Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
QA comments: * passes koha-qa.pl * I think, even if I couldn't check it, that there's no string change (the "Specify due date..." is not translated in french for 3.10 * I don't think libraries will complain that the behaviour changed, but I just wanted to point that this patch introduces a small change in circulation workflow. * the severity is not critical, because it's a bug only when the librarian put silly data in the date. Lowering severity Overall, not sure it should be pushed for 3.10.0 because of string freeze, but for 3.10.1 yes. passed QA
This patch has been pushed to master.
Does not apply to 3.8.x, please create a rebased patch if it is needed in 3.8.x
Patch pushed to branch 3.10.x
Released in 3.10.0