summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-09-20 16:24:39 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-09-20 16:24:39 +0200
commit65bab56090893769427982353767bc41bca975e6 (patch)
tree4cd2a71974f4e7ccdff5627ed115f7492875f850 /Bugzilla
parentd04946d0f70d9734debb239a6a34f0253c8dc38f (diff)
downloadbugzilla-65bab56090893769427982353767bc41bca975e6.tar.gz
bugzilla-65bab56090893769427982353767bc41bca975e6.tar.xz
Bug 918362 - The "order" parameter passed to Bug.search is ignored
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/WebService/Bug.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 0d78dbb28..8461b3d97 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -518,7 +518,7 @@ sub search {
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;
my $search = new Bugzilla::Search(%options);
@@ -530,9 +530,9 @@ sub search {
# 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_objects = Bugzilla::Bug->new_from_list(\@bug_ids);
-
- my @bugs = map { $self->_bug_to_hash($_, $params) } @$bug_objects;
+ my %bug_objects = map { $_->id => $_ } @{ Bugzilla::Bug->new_from_list(\@bug_ids) };
+ my @bugs = map { $bug_objects{$_} } @bug_ids;
+ @bugs = map { $self->_bug_to_hash($_, $params) } @bugs;
return { bugs => \@bugs };
}