Bugzilla – Attachment 95151 Details for
Bug 23427
Better sorting of previous checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23427: Simplify sort logic
Bug-23427-Simplify-sort-logic.patch (text/plain), 1.16 KB, created by
Jonathan Druart
on 2019-11-07 12:37:13 UTC
(
hide
)
Description:
Bug 23427: Simplify sort logic
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-07 12:37:13 UTC
Size:
1.16 KB
patch
obsolete
>From 701a76162516165082bf3f53a6b1c7c023b78050 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Nov 2019 13:34:31 +0100 >Subject: [PATCH] Bug 23427: Simplify sort logic > >This is the usual syntax. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > svc/checkouts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/svc/checkouts b/svc/checkouts >index dc559a207f..f8fd541f36 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -270,7 +270,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest > > @checkouts_previous = >- sort { $a->{date_due} eq $b->{date_due} ? $a->{timestamp} cmp $b->{timestamp} : $a->{date_due} cmp $b->{date_due} } >+ sort { $a->{date_due} cmp $b->{date_due} || $a->{timestamp} cmp $b->{timestamp} } > @checkouts_previous; # latest to earliest > @checkouts_previous = reverse(@checkouts_previous) > unless ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest >-- >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 23427
:
91993
|
91994
|
94259
|
94260
|
95149
|
95150
| 95151