Bugzilla – Attachment 104033 Details for
Bug 12388
IssueSlip output should be sorted by date_due, not timestamp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12388: IssueSlip output should be sorted by date_due, not timestamp
Bug-12388-IssueSlip-output-should-be-sorted-by-dat.patch (text/plain), 2.17 KB, created by
Bernardo Gonzalez Kriegel
on 2020-04-30 13:21:39 UTC
(
hide
)
Description:
Bug 12388: IssueSlip output should be sorted by date_due, not timestamp
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-04-30 13:21:39 UTC
Size:
2.17 KB
patch
obsolete
>From 9803709224708b61c3ed1e56906c4ff1755f15c1 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Wed, 19 Apr 2017 11:27:45 +0000 >Subject: [PATCH] Bug 12388: IssueSlip output should be sorted by date_due, not > timestamp > >Sponsored-by: Koha-Suomi Oy >Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com> >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > C4/Members.pm | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 6c10eeeb2c..d8abc75c00 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -532,6 +532,11 @@ sub IssueSlip { > lastreneweddate => > { '>=' => $today_start, '<=' => $today_end, } > } >+ }, { >+ order_by => [ >+ { -asc => 'date_due' }, >+ { -asc => 'issuedate' }, >+ ] > } > ); > my @checkouts; >@@ -555,7 +560,12 @@ sub IssueSlip { > else { > my $today = Koha::Database->new->schema->storage->datetime_parser->format_datetime( dt_from_string ); > # Checkouts due in the future >- my $checkouts = $pending_checkouts->search({ date_due => { '>' => $today } }); >+ my $checkouts = $pending_checkouts->search({ date_due => { '>' => $today } }, { >+ order_by => [ >+ { -asc => 'date_due' }, >+ { -asc => 'issuedate' }, >+ ] >+ }); > my @checkouts; my @overdues; > while ( my $c = $checkouts->next ) { > my $all = $c->unblessed_all_relateds; >@@ -568,7 +578,12 @@ sub IssueSlip { > } > > # Checkouts due in the past are overdues >- my $overdues = $pending_checkouts->search({ date_due => { '<=' => $today } }); >+ my $overdues = $pending_checkouts->search({ date_due => { '<=' => $today } }, { >+ order_by => [ >+ { -asc => 'date_due' }, >+ { -asc => 'issuedate' }, >+ ] >+ }); > while ( my $o = $overdues->next ) { > my $all = $o->unblessed_all_relateds; > push @overdues, { >-- >2.17.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 12388
:
41784
|
62361
|
91522
|
91766
|
102977
| 104033 |
104034
|
114180