Commit 9daa109f authored by Dave Lawrence's avatar Dave Lawrence

Bug 918362 - The "order" parameter passed to Bug.search is ignored

r=LpSolit,a=glob
parent edd2afc7
...@@ -504,7 +504,7 @@ sub search { ...@@ -504,7 +504,7 @@ sub search {
ThrowUserError('buglist_parameters_required'); ThrowUserError('buglist_parameters_required');
} }
$options{order_columns} = [ split(/\s*,\s*/, delete $match_params{order}) ] if $match_params{order}; $options{order} = [ split(/\s*,\s*/, delete $match_params{order}) ] if $match_params{order};
$options{params} = \%match_params; $options{params} = \%match_params;
my $search = new Bugzilla::Search(%options); my $search = new Bugzilla::Search(%options);
...@@ -516,9 +516,9 @@ sub search { ...@@ -516,9 +516,9 @@ sub search {
# Search.pm won't return bugs that the user shouldn't see so no filtering is needed. # Search.pm won't return bugs that the user shouldn't see so no filtering is needed.
my @bug_ids = map { $_->[0] } @$data; my @bug_ids = map { $_->[0] } @$data;
my $bug_objects = Bugzilla::Bug->new_from_list(\@bug_ids); my %bug_objects = map { $_->id => $_ } @{ Bugzilla::Bug->new_from_list(\@bug_ids) };
my @bugs = map { $bug_objects{$_} } @bug_ids;
my @bugs = map { $self->_bug_to_hash($_, $params) } @$bug_objects; @bugs = map { $self->_bug_to_hash($_, $params) } @bugs;
return { bugs => \@bugs }; return { bugs => \@bugs };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment