Bug 14016 - Due dates in OPAC show 0:00 when it should be 23:59
Summary: Due dates in OPAC show 0:00 when it should be 23:59
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 13601
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-19 21:49 UTC by Katrin Fischer
Modified: 2016-09-14 12:30 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14016: Restore correct date format on issue date (00:00 vs 23:59) (3.32 KB, patch)
2015-04-20 09:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14016: Restore correct date format on issue date (00:00 vs 23:59) (3.35 KB, patch)
2015-04-20 15:11 UTC, Nicolas Legrand
Details | Diff | Splinter Review
[PASSED QA] Bug 14016: Restore correct date format on issue date (00:00 vs 23:59) (3.41 KB, patch)
2015-04-20 19:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 14016: (follow-up) Restore correct date format on issue date (00:00 vs 23:59) (1.33 KB, patch)
2015-04-21 08:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 14016: (follow-up) Restore correct date format on issue date (00:00 vs 23:59) (1.40 KB, patch)
2015-04-21 20:14 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2015-04-19 21:49:19 UTC
The due dates on the checkouts tab in the patron account in the OPAC currently show as 04/08/2015 00:00 when the due date is actually 23:59.

Staff and database are correct.
Comment 1 Jonathan Druart 2015-04-20 09:03:03 UTC Comment hidden (obsolete)
Comment 2 Nicolas Legrand 2015-04-20 15:11:26 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-04-20 19:50:50 UTC
Going to pass this patch as it fixes the checkouts tab, but the problem is still visible on the overdues tab - repeat test plan, but check out an item with a due date in the past, so that you get an overdues tab in the patron account.
Comment 4 Katrin Fischer 2015-04-20 19:51:26 UTC
Created attachment 38210 [details] [review]
[PASSED QA] Bug 14016: Restore correct date format on issue date (00:00 vs 23:59)

Introduced by bug 13601, and same fix used in bug 10423 and bug 12847:
the date_due retrieved from the DB is modified.

There are some problems:
1/ There is confusion between the iso and sql formats in the codebase.
2/ Since bug 13601, dt_from_string does not manage the iso format (there
are occurrences of 'iso' but it assumes that both formats are
identical).

To solve the issue, 2 solutions:
1/ Same as bug 10423 and bug 12847: try to get rid of the change done on
date_due in C4::Members::GetPendingIssues, it should be kept as the sql
value.
2/ Too many errors found and another fallback should be added to
dt_from_string (if 'iso' is passed, try sql then iso).

Test plan:
Go on the checkout list at the OPAC and confirm that the due dates are
correctly formatted.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2015-04-21 08:45:33 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2015-04-21 08:46:04 UTC
(In reply to Katrin Fischer from comment #3)
> Going to pass this patch as it fixes the checkouts tab, but the problem is
> still visible on the overdues tab - repeat test plan, but check out an item
> with a due date in the past, so that you get an overdues tab in the patron
> account.

Yep, see last patch.
It should be corrected in the same patchset.
Comment 7 Katrin Fischer 2015-04-21 20:14:29 UTC
Created attachment 38292 [details] [review]
[PASSED QA] Bug 14016: (follow-up) Restore correct date format on issue date (00:00 vs 23:59)

Same for the overdues.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi (tcohen) 2015-04-23 15:13:38 UTC
Patches pushed to master.

Thanks Jonathan!
Comment 9 Chris Cormack 2015-05-11 21:41:04 UTC
Pushed to 3.18.x will be in 3.18.7