summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-09-20 16:20:52 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-09-20 16:20:52 +0200
commit9daa109fb9dd2e3d5b88ad84ae89bf2cadbb5a49 (patch)
tree420baa1db62d1b71b9d56588136f79563a0d886c /Bugzilla/WebService
parentedd2afc779290d1af2d571ab0cb3f534135576d6 (diff)
downloadbugzilla-9daa109fb9dd2e3d5b88ad84ae89bf2cadbb5a49.tar.gz
bugzilla-9daa109fb9dd2e3d5b88ad84ae89bf2cadbb5a49.tar.xz
Bug 918362 - The "order" parameter passed to Bug.search is ignored
r=LpSolit,a=glob
Diffstat (limited to 'Bugzilla/WebService')
-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 14d56713c..eaca97f91 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -504,7 +504,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);
@@ -516,9 +516,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 };
}