Bugzilla – Attachment 94259 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: fix previous checkouts sort order
Bug-23427-fix-previous-checkouts-sort-order.patch (text/plain), 2.30 KB, created by
Michal Denar
on 2019-10-16 08:21:13 UTC
(
hide
)
Description:
Bug 23427: fix previous checkouts sort order
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2019-10-16 08:21:13 UTC
Size:
2.30 KB
patch
obsolete
>From a9ce704b7839e56071c46aa94e33a21645e33af5 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 5 Aug 2019 15:11:49 +0200 >Subject: [PATCH] Bug 23427: fix previous checkouts sort order > >In patron circulation or details page, previous checkouts are displayed sorted by due date. >Actual sort order is not honoring system preference "previousIssuesDefaultSortOrder". Todays's checkouts is correct thanks to Bug 13908. > >Patch adds comments that refer to the text of system preferences "previousIssuesDefaultSortOrder" and "TodayIssuesDefaultSortOrder" : > latest to earliest = asc > earliest to latest = desc > >Test plan : >1) Create for a patron two old issues with a few days between them >2) Set preference previousIssuesDefaultSortOrder = "latest to earliest" >3) Go to patron circulation page and check sort order is OK >4) Go to patron details page and check sort order is OK >5) Set preference previousIssuesDefaultSortOrder = "earliest to latest" >6) Go to patron circulation page and check sort order is OK >7) Go to patron details page and check sort order is OK > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > svc/checkouts | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/svc/checkouts b/svc/checkouts >index 892eab84fe..d965930a37 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -243,13 +243,13 @@ while ( my $c = $sth->fetchrow_hashref() ) { > } > > >-@checkouts_today = sort { $a->{timestamp} cmp $b->{timestamp} } @checkouts_today; >+@checkouts_today = sort { $a->{timestamp} cmp $b->{timestamp} } @checkouts_today; # latest to earliest > @checkouts_today = reverse(@checkouts_today) >- unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); >+ unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest > >-@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous; >+@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous; # latest to earliest > @checkouts_previous = reverse(@checkouts_previous) >- if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); >+ unless ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest > > my @checkouts = ( @checkouts_today, @checkouts_previous ); > >-- >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