The default bug view has changed. See this FAQ.

Bug.search ignores the "limit" parameter

RESOLVED FIXED in Bugzilla 5.0

Status

()

Bugzilla
WebService
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: tiziana, Assigned: dkl)

Tracking

Bugzilla 5.0
x86
Mac OS X
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
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)

Updated

4 years ago
Assignee: webservice → dkl
Status: NEW → ASSIGNED
(Assignee)

Comment 2

4 years ago
Created attachment 806099 [details] [diff] [review]
916979_1.patch

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+
(Assignee)

Comment 4

4 years ago
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
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.