Closed Bug 637642 Opened 13 years ago Closed 10 years ago

Web-service (XML-RPC, JSON-RPC) Bug.search method has no "order_by" parameter

Categories

(Bugzilla :: WebService, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: petr, Assigned: dkl)

References

()

Details

(Whiteboard: [fixed by blocker])

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13
Build Identifier: 

When asking for bug list using the XML-RPC interface, I am able to specify "limit" and "offset". However, these are not very useful without being able to specify "order_by" too - I need to get all issues in order to sort them on my side anyway.

It would be nice if the WS allowed me to specify how to sort the bug list, for example in this fashion:

{"order_by":
  [
  {"first_field": "ASC"},
  {"second_field": "DESC"}
  ]
}

Reproducible: Always
Status: UNCONFIRMED → NEW
Depends on: 475754
Ever confirmed: true
What fields should be accepted to do the sort on? Are all of the returned fields acceptable?
(In reply to Koosha Khajeh Moogahi [:koosha] from comment #1)
> What fields should be accepted to do the sort on? Are all of the returned
> fields acceptable?

They should be valid column names returned by Bugzilla::Search::COLUMNS with the allowance of ASC or DESC after the column name. Just mimic how Bugzilla::Search does it at lines 907-922 in _validate_order_columns.

dkl
'order' is available since Bugzilla 5.0, see bug 477601.
Assignee: webservice → dkl
Status: NEW → RESOLVED
Closed: 10 years ago
Depends on: 477601
No longer depends on: 475754
Resolution: --- → FIXED
Whiteboard: [fixed by blocker]
Target Milestone: --- → Bugzilla 5.0
You need to log in before you can comment on or make changes to this bug.