From 53a49f84b521ea0682ec46fee0d040d3ed312189 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 15 Jun 2015 16:24:58 +0800 Subject: Bug 1174644: fields are not sorted when shown on bug-modal --- extensions/BugModal/lib/ActivityStream.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'extensions/BugModal/lib') diff --git a/extensions/BugModal/lib/ActivityStream.pm b/extensions/BugModal/lib/ActivityStream.pm index a69790044..58ac25472 100644 --- a/extensions/BugModal/lib/ActivityStream.pm +++ b/extensions/BugModal/lib/ActivityStream.pm @@ -58,10 +58,12 @@ sub activity_stream { $change_set->{id} = $change_set->{comment} ? 'c' . $change_set->{comment}->count : 'a' . ($change_set->{time} - $base_time) . '_' . $change_set->{user_id}; - $change_set->{activity} = [ - sort { $a->{fieldname} cmp $b->{fieldname} } - @{ $change_set->{activity} } - ]; + foreach my $activity (@{ $change_set->{activity} }) { + $activity->{changes} = [ + sort { $a->{fieldname} cmp $b->{fieldname} } + @{ $activity->{changes} } + ]; + } } my $order = Bugzilla->user->setting('comment_sort_order'); if ($order eq 'oldest_to_newest') { -- cgit v1.2.3-24-g4f1b