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>
(cherry picked from commit ba69672ace)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
5d0a186b07
commit
ed09fd488d
|
|
@ -51,7 +51,7 @@ Circulation:
|
|||
choices:
|
||||
asc: earliest to latest
|
||||
desc: latest to earliest
|
||||
- due date.
|
||||
- checkout time.
|
||||
-
|
||||
- pref: SpecifyDueDate
|
||||
choices:
|
||||
|
|
|
|||
|
|
@ -241,13 +241,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