Bugzilla – Attachment 54119 Details for
Bug 17001
filtering overdue report by due date can fail if TimeFormat is 12hr
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
k
PASSED-QA-Bug-17001-fix-due-date-filter-on-the-ove.patch (text/plain), 2.13 KB, created by
Katrin Fischer
on 2016-08-07 11:54:24 UTC
(
hide
)
Description:
k
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-08-07 11:54:24 UTC
Size:
2.13 KB
patch
obsolete
>From f63c81f55b901c43a3d8eae277039f9726d3b924 Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmcharlt@gmail.com> >Date: Fri, 29 Jul 2016 20:41:19 +0000 >Subject: [PATCH] [PASSED QA] Bug 17001: fix due date filter on the overdue > report > >When the TimeFormat system preference is set to "12 hour", >setting a filter on the due date can result in: > >- no overdue loans being reported, even if there are some > that meet the criteria > >OR > >- overdue loans being omitted from the report if they > are due on the "until" date in the filter > >This patch fixes this by replacing output_pref() with >DateTime::Format::MySQL to format the date filter values >to pass to the SQL query. > >To test >------- >[1] Run the overdue report (circ/overdue.pl) and set a filter > on due date, using values that should bring up one or > more overdue loans. >[2] Note that zero overdue loans are returned (if using MySQL > 5.5, 5.6, or 5.7 or MariaDB 5) or that loans due on the > "until" date are omitted (if using MarioDB 10). >[3] Apply the patch and repeat step 1. This time, the correct > set of overdue loans should be reported. > >Signed-off-by: Galen Charlton <gmcharlt@gmail.com> > >Signed-off-by: Your Name <jrobb@sekls.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > circ/overdue.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/circ/overdue.pl b/circ/overdue.pl >index 8e06013..047e073 100755 >--- a/circ/overdue.pl >+++ b/circ/overdue.pl >@@ -29,6 +29,7 @@ use C4::Debug; > use Text::CSV_XS; > use Koha::DateUtils; > use DateTime; >+use DateTime::Format::MySQL; > > my $input = new CGI; > my $order = $input->param('order') || ''; >@@ -321,8 +322,8 @@ if ($noreport) { > $template->param(sql=>$strsth); > my $sth=$dbh->prepare($strsth); > $sth->execute( >- ($dateduefrom ? output_pref({ dt => $dateduefrom, dateformat => 'iso' }) : ()), >- ($datedueto ? output_pref({ dt => $datedueto, dateformat => 'iso' }) : ()), >+ ($dateduefrom ? DateTime::Format::MySQL->format_datetime($dateduefrom) : ()), >+ ($datedueto ? DateTime::Format::MySQL->format_datetime($datedueto) : ()), > ); > > my @overduedata; >-- >1.9.1
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 17001
:
53814
|
54077
|
54119
|
54120