Bugzilla – Attachment 79788 Details for
Bug 21176
decreaseLoanHighHolds does not properly calculate date when TimeFormat set to 12 hour
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21176: Fix due date calculation when high holds and TimeFormat is 12hr
Bug-21176-Fix-due-date-calculation-when-high-holds.patch (text/plain), 3.41 KB, created by
Chris Cormack
on 2018-10-01 22:11:05 UTC
(
hide
)
Description:
Bug 21176: Fix due date calculation when high holds and TimeFormat is 12hr
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2018-10-01 22:11:05 UTC
Size:
3.41 KB
patch
obsolete
>From 59db06ac492aa6916fec872c6d1327ceb8b8fc49 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 13 Aug 2018 13:23:00 -0300 >Subject: [PATCH] Bug 21176: Fix due date calculation when high holds and > TimeFormat is 12hr > >What we were doing was wrong and is still wrong. The output_pref should not be done >in modules or script, only template side. >Much more work would be needed to clean the situation. This patch provides less changes >as possible to, hopefully, not introduce side-effects. > >To recreate: >1 - Enable decreaseLoanHighHolds, set to 1 day and more than 0 holds >2 - Set TimeFormat to 12 hour >3 - Find or create a record with two items >4 - Place a hold on one of them >5 - Checkout the other to a different patron >6 - Note the warning message display correct time >7 - Confirm the checkout >8 - Note the item is due at 11:59AM > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/Circulation.pm | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index dce77eaaf7..9c8d5ba13e 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1034,14 +1034,14 @@ sub CanBookBeIssued { > $alerts{HIGHHOLDS} = { > num_holds => $check->{outstanding}, > duration => $check->{duration}, >- returndate => output_pref( $check->{due_date} ), >+ returndate => output_pref( { dt => dt_from_string($check->{due_date}), dateformat => 'iso', timeformat => '24hr' }), > }; > } > else { > $needsconfirmation{HIGHHOLDS} = { > num_holds => $check->{outstanding}, > duration => $check->{duration}, >- returndate => output_pref( $check->{due_date} ), >+ returndate => output_pref( { dt => dt_from_string($check->{due_date}), dateformat => 'iso', timeformat => '24hr' }), > }; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index bec7d1dfe8..2b273e047a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -72,7 +72,7 @@ > [% END %] > > [% IF alert.HIGHHOLDS %] >- <div class="dialog message">High demand item. <b>Loan period was not shortened due to override.</b> Shortened due date would have been [% alert.HIGHHOLDS.returndate | html %] ([% alert.HIGHHOLDS.duration | html %] days).</div> >+ <div class="dialog message">High demand item. <b>Loan period was not shortened due to override.</b> Shortened due date would have been [% alert.HIGHHOLDS.returndate | $KohaDates %] ([% alert.HIGHHOLDS.duration | html %] days).</div> > [% END %] > > [% IF ( nopermission ) %] >@@ -181,7 +181,7 @@ > [% END %] > > [% IF HIGHHOLDS %] >- <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration | html %] days (due [% HIGHHOLDS.returndate | html %]). Check out anyway?</li> >+ <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration | html %] days (due [% HIGHHOLDS.returndate | $KohaDates %]). Check out anyway?</li> > [% END %] > > [% IF PREVISSUE %] >-- >2.11.0
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 21176
:
77761
|
79326
| 79788