Bugzilla – Attachment 68055 Details for
Bug 19438
Sorting by due date in overdues listing does not work as expected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19438: Fix sorting by date due in overdues.pl
Bug-19438-Fix-sorting-by-date-due-in-overduespl.patch (text/plain), 3.36 KB, created by
Marcel de Rooy
on 2017-10-13 09:31:26 UTC
(
hide
)
Description:
Bug 19438: Fix sorting by date due in overdues.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-13 09:31:26 UTC
Size:
3.36 KB
patch
obsolete
>From a545ae44cc6b067b987cbca70e2f382dcc2ef020 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 9 Oct 2017 08:07:29 +0000 >Subject: [PATCH] Bug 19438: Fix sorting by date due in overdues.pl >Content-Type: text/plain; charset=utf-8 > >Test plan: >0) Do not apply the patch >1) Have some overdued checkouts in your database >2) Go to circulation -> overdues (overdues.pl) >3) Try to sort the overdues table by due date and notice it is sorted >alphabetically, not by date >4) Apply the patch >5) Try again and confirm, it is sorted by date > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > circ/overdue.pl | 3 +-- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt | 10 +++++++--- > 2 files changed, 8 insertions(+), 5 deletions(-) > >diff --git a/circ/overdue.pl b/circ/overdue.pl >index 68abc84..eea9e05 100755 >--- a/circ/overdue.pl >+++ b/circ/overdue.pl >@@ -294,10 +294,9 @@ if ($noreport) { > my @displayvalues = map { $_->[1] } @{ $pattrs->{$pattr_filter->{code}} }; # grab second value from each subarray > push @patron_attr_value_loop, { value => join(', ', sort { lc $a cmp lc $b } @displayvalues) }; > } >- my $dt = dt_from_string($data->{date_due}, 'sql'); > > push @overduedata, { >- duedate => output_pref($dt), >+ duedate => $data->{date_due}, > borrowernumber => $data->{borrowernumber}, > barcode => $data->{barcode}, > cardnumber => $data->{cardnumber}, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >index 5e5f466..8bc2cee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -64,7 +64,11 @@ > > $(document).ready(function(){ > $("#overduest").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sPaginationType": "four_button" >+ "sPaginationType": "four_button", >+ "aaSorting": [[0, 'asc']], >+ "aoColumnDefs": [ >+ { "sType": "title-string", "aTargets": [ "title-string" ] } >+ ] > })); > }); > //]]> >@@ -107,7 +111,7 @@ > <table id="overduest"> > <thead> > <tr> >- <th>Due date</th> >+ <th class="title-string">Due date</th> > <th>Patron</th> > <th>Library</th> > <th>Title</th> >@@ -120,7 +124,7 @@ > <tbody> > [% FOREACH overdueloo IN overdueloop %] > <tr> >- <td>[% overdueloo.duedate %]</td> >+ <td><span title="[% overdueloo.duedate %]">[% overdueloo.duedate | $KohaDates %]</span></td> > <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overdueloo.borrowernumber %]">[% overdueloo.surname %][% IF (overdueloo.firstname) %], [% overdueloo.firstname %][% END %] ([% overdueloo.cardnumber %])</a> > [% IF ( overdueloo.email ) %][<a href="mailto:[% overdueloo.email %]?subject=[% INCLUDE subject %] [% overdueloo.title |html %]">email</a>][% END %] > [% IF ( overdueloo.phone ) %]([% overdueloo.phone %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro %])[% END %]</td> >-- >2.1.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 19438
:
67831
|
67971
| 68055