Francois Gouget : testbot/web: Fix the sort order of a job's tasks.
Module: tools Branch: master Commit: b339f509deb5fe6c859da9b27b310a2f202333b6 URL: http://source.winehq.org/git/tools.git/?a=commit;h=b339f509deb5fe6c859da9b27... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jan 17 16:04:24 2017 +0100 testbot/web: Fix the sort order of a job's tasks. Each entry's id is a numeric value that's equal to step.no*100+task.no. But by default sort performs a string comparison resulting in task (10,1), aka "1001", coming before (1,1), aka "101", which comes before (11,1), aka "1101", etc. Also note that sorting is normally the job of the CollectionBlock but the JobDetails page is bypassing it. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/web/JobDetails.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index b43d375..cf3b4a8 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -213,7 +213,7 @@ sub SortKeys($$$) { my ($self, $CollectionBlock, $Keys) = @_; - my @SortedKeys = sort @$Keys; + my @SortedKeys = sort { $a <=> $b } @$Keys; return \@SortedKeys; }
participants (1)
-
Alexandre Julliard