From 2060e799e3304b635148764690fcd3a71d7a62d7 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 17 Jan 2020 22:12:11 +0000 Subject: [PATCH] Bug 24456: change default sort orders/make wording clearer TEST PLAN: 1. Apply patch 2. Have some checkout from today and some from multiple previous days. 3. Set todaysIssuesDefaultSortOrder & previousIssuesDefaultSortOrder to 'earliest to latest' and confirm it sorts correctly. 4. Reverse the 2 system preferences and see that it is now sorting the opposite way. 5. Also look at the wording of each system prefence and make sure it makes sense Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Jonathan Druart --- .../prog/en/modules/admin/preferences/circulation.pref | 2 +- svc/checkouts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 3134f23a63..fefa8e79bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -50,7 +50,7 @@ Circulation: choices: asc: earliest to latest desc: latest to earliest - - due date. + - checkout time. - - pref: SpecifyDueDate choices: diff --git a/svc/checkouts b/svc/checkouts index a749494028..fa470b3a2a 100755 --- a/svc/checkouts +++ b/svc/checkouts @@ -267,13 +267,13 @@ while ( my $c = $sth->fetchrow_hashref() ) { @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' ); # earliest to latest + if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest @checkouts_previous = 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 + if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' ); # earliest to latest my @checkouts = ( @checkouts_today, @checkouts_previous ); -- 2.20.1