Bug 14299: Today's checkouts not always sorting correctly
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 May 2015 13:36:34 +0000 (09:36 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 5 Jun 2015 15:53:03 +0000 (12:53 -0300)
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 <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
svc/checkouts

index d2eb8ee..cc703ae 100755 (executable)
@@ -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' );