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 <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
parent
29941cd761
commit
ba69672ace
|
|
@ -51,7 +51,7 @@ Circulation:
|
|||
choices:
|
||||
asc: earliest to latest
|
||||
desc: latest to earliest
|
||||
- due date.
|
||||
- checkout time.
|
||||
-
|
||||
- pref: SpecifyDueDate
|
||||
choices:
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue