Closed Bug 916979 Opened 11 years ago Closed 11 years ago

Bug.search ignores the "limit" parameter

Categories

(Bugzilla :: WebService, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: tiziana, Assigned: dkl)

Details

Attachments

(1 file)

I'm using json-rpc interface to access Bugzilla API. It seems that from yesterday the "limit" and "creation_time" parameters don't work;

https://bugzilla.mozilla.org/jsonrpc.cgi?method=Bug.search&params=[{"limit":3,"product":"Firefox","component":"Untriaged","status":"UNCONFIRMED","include_fields":["creation_time","id","status","summary","last_change_time" ]}]

and the "creation_time" doesn't return anything:

https://bugzilla.mozilla.org/jsonrpc.cgi?method=Bug.search&params=[{"limit":3,"creation_time":"2011-07-09T17:56:00Z","product":"Firefox","component":"Untriaged","status":"UNCONFIRMED","include_fields":["creation_time","id","status","summary","last_change_time" ]}]


These searches worked fine up to two days ago. 
I've looked at this bug 785565 asking if it could be related.
nothing was changed on production two days ago (the last update was Sep 11 00:15:35 PDT).

as there are two issues reported here, i've split the bug - the creation_time issue is in bug 917157.


the problem with limit is Bugzilla::Bug::map_fields() is converting $params->{limit} to $params->{LIMIT}, however Bugzilla::Search is expecting lowercase {limit} (this also applies to offset).
Assignee: nobody → webservice
Component: API → WebService
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Summary: parameters "limit" and "creation_time" in Bug.search using jsonrpc don't work → Bug.search ignores the "limit" parameter
Target Milestone: --- → Bugzilla 5.0
Version: Production → 4.5
Assignee: webservice → dkl
Status: NEW → ASSIGNED
Attached patch 916979_1.patchSplinter Review
Simple remove LIMIT/OFFSET from FIELD_MAP in Bugzilla::Bug. Also cleaned up my variable naming in Bug.search as it was backwards.

dkl
Attachment #806099 - Flags: review?(glob)
Comment on attachment 806099 [details] [diff] [review]
916979_1.patch

r=glob
Attachment #806099 - Flags: review?(glob) → review+
Flags: approval+
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk
modified Bugzilla/Bug.pm
modified Bugzilla/WebService/Bug.pm
Committed revision 8741.
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.

Attachment

General

Created:
Updated:
Size: