Bugzilla – Attachment 38198 Details for
Bug 14016
Due dates in OPAC show 0:00 when it should be 23:59
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14016: Restore correct date format on issue date (00:00 vs 23:59)
Bug-14016-Restore-correct-date-format-on-issue-dat.patch (text/plain), 3.35 KB, created by
Nicolas Legrand
on 2015-04-20 15:11:26 UTC
(
hide
)
Description:
Bug 14016: Restore correct date format on issue date (00:00 vs 23:59)
Filename:
MIME Type:
Creator:
Nicolas Legrand
Created:
2015-04-20 15:11:26 UTC
Size:
3.35 KB
patch
obsolete
>From 95161784ad4776d6dfa41d979d61ad0321c3e975 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 20 Apr 2015 10:41:19 +0200 >Subject: [PATCH] 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> >--- > C4/Members.pm | 2 ++ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 605787c..249cf5e 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -1199,6 +1199,8 @@ sub GetPendingIssues { > if ($_->{issuedate}) { > $_->{issuedate} = dt_from_string($_->{issuedate}, 'sql'); > } >+ $_->{date_due_sql} = $_->{date_due}; >+ # FIXME no need to have this value > $_->{date_due} or next; > $_->{date_due_sql} = $_->{date_due}; > # FIXME no need to have this value >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 2e8d18f..4487b6f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -191,14 +191,14 @@ > <td class="date_due overdue"> > <span title="[% ISSUE.date_due %]"> > <span class="tdlabel">Date due:</span> >- [% ISSUE.date_due | $KohaDates as_due_date => 1 %] >+ [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %] > </span> > </td> > [% ELSE %] > <td class="date_due"> > <span title="[% ISSUE.date_due %]"> > <span class="tdlabel">Date due:</span> >- [% ISSUE.date_due | $KohaDates as_due_date => 1 %] >+ [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %] > </span> > </td> > [% END %] >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14016
:
38161
|
38198
|
38210
|
38232
|
38292