Bugzilla – Attachment 91766 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]
[PATCH] Bug 12388: IssueSlip output should be sorted by date_due, not
0001-Bug-12388-IssueSlip-output-should-be-sorted-by-date_.patch (text/plain), 2.11 KB, created by
Emmi Takkinen
on 2019-07-25 09:49:13 UTC
(
hide
)
Description:
[PATCH] Bug 12388: IssueSlip output should be sorted by date_due, not
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2019-07-25 09:49:13 UTC
Size:
2.11 KB
patch
obsolete
>From a7dd3ed764affafe92400839117aad4a9e0c881d 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> >--- > C4/Members.pm | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 205f45bd7b..0edb8d8dc9 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -534,6 +534,11 @@ sub IssueSlip { > lastreneweddate => > { '>=' => $today_start, '<=' => $today_end, } > } >+ }, { >+ order_by => [ >+ { -asc => 'date_due' }, >+ { -asc => 'issuedate' }, >+ ] > } > ); > my @checkouts; >@@ -557,7 +562,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; >@@ -570,7 +580,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