Closed
Bug 918362
Opened 11 years ago
Closed 11 years ago
The "order" parameter passed to Bug.search is ignored
Categories
(Bugzilla :: WebService, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: dkl, Assigned: dkl)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
1.24 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Not sure how I missed this but here is the fix:
=== modified file 'Bugzilla/WebService/Bug.pm'
--- Bugzilla/WebService/Bug.pm 2013-09-18 15:08:32 +0000
+++ Bugzilla/WebService/Bug.pm 2013-09-19 15:45:02 +0000
@@ -504,7 +504,7 @@
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);
Will do a proper patch for hopefully quick review.
dkl
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #807233 -
Flags: review?(LpSolit)
Comment 2•11 years ago
|
||
Comment on attachment 807233 [details] [diff] [review]
Patch to fix sorting in Bug.search (v1)
Despite this change is correct, it has no effect as you then call new_from_list() which always sorts the buglist by ID.
Attachment #807233 -
Flags: review?(LpSolit) → review-
Assignee | ||
Updated•11 years ago
|
Summary: Sorting by order using Bug.search is not working due to improperly names parameter to Bugzilla::Search->new → Sorting by order using Bug.search is not working due to improperly named parameter to Bugzilla::Search and use of new_from_list
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #807233 -
Attachment is obsolete: true
Attachment #807329 -
Flags: review?(LpSolit)
Comment 4•11 years ago
|
||
Comment on attachment 807329 [details] [diff] [review]
Patch to fix sorting in Bug.search (v2)
>+ # Bugzilla::Bug->new_from_list always sorts by bug id so we need to use a hash
>+ # to get the bugs back in the order requested by the client before converting
>+ # to bug hashes.
I honestly don't think this comment is useful. The trick used here is used "everywhere" now, for performance reasons. You can simply drop it, IMO. r=LpSolit
Attachment #807329 -
Flags: review?(LpSolit) → review+
Updated•11 years ago
|
Flags: approval?
Summary: Sorting by order using Bug.search is not working due to improperly named parameter to Bugzilla::Search and use of new_from_list → The "order" parameter passed to Bug.search is ignored
Assignee | ||
Comment 5•11 years ago
|
||
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk
modified Bugzilla/WebService/Bug.pm
Committed revision 8749.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•