From 8e9f89e92b48f1aac786e9b5608338a14603f52f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 29 May 2015 09:36:34 -0400 Subject: [PATCH] Bug 14299: Today's checkouts not always sorting correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sometimes the today's checkouts do not sort correctly. This is due to a simple typo in the comparison line where the bad key 'timstamp' is compared against the correct key 'timestamp'. Test Plan: 1) Check out a decent number of items in a row ( 5+ ) 2) Hopefully you will see they are sorted incorrectly 3) Apply this patch 4) Reload the page 5) Note they are now sorted correctly Followed test plan. Works as expected. Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- svc/checkouts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svc/checkouts b/svc/checkouts index d2eb8eec38..cc703aeaeb 100755 --- a/svc/checkouts +++ b/svc/checkouts @@ -210,7 +210,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { } -@checkouts_today = sort { $a->{timstamp} cmp $b->{timestamp} } @checkouts_today; +@checkouts_today = sort { $a->{timestamp} cmp $b->{timestamp} } @checkouts_today; @checkouts_today = reverse(@checkouts_today) unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' ); -- 2.39.2