Closed Bug 1270227 Opened 9 years ago Closed 9 years ago

REST API methods return integers as strings

Categories

(bugzilla.mozilla.org :: API, defect)

Merge
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kohei, Assigned: dylan)

References

(Depends on 1 open bug)

Details

(Keywords: regression)

The response of the bug_user_last_visit method, both from POST and GET requests, has the id field in a string, instead of an integer as explained in the doc: https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug-user-last-visit.html
Assignee: webservice → dylan
Against which server/instance/version? trying to replicate.
Flags: needinfo?(kohei.yoshino)
Forgot to mention: I'm currently testing bugzilla-merge.allizom.org.
Flags: needinfo?(kohei.yoshino)
(In reply to Kohei Yoshino [:kohei] from comment #3) > Here it says 'int' :? > > https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/Bugzilla/ > WebService/BugUserLastVisit.pm#L95 bugzilla-merge.allizom.org would be: https://github.com/mozilla/webtools-bmo-bugzilla/blob/upstream-merge/Bugzilla/API/1_0/Resource/BugUserLastVisit.pm#L127 Hmm we are setting as_int there as well, so will need to dig in to see where it is getting converted back to before returning. dkl
Hmm, the issue can be seen not only with bug_user_last_visit but also other methods. All integers are strings: https://bugzilla-merge.allizom.org/rest/bug/1188818 https://bugzilla-merge.allizom.org/rest/bug/1188818/comment
Summary: /rest/bug_user_last_visit returns bug IDs in string not integer → REST API methods return bug IDs in string not integer
Summary: REST API methods return bug IDs in string not integer → REST API methods return integers as strings
And I believe this started very recently...
Component: WebService → API
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa
Version: unspecified → Merge
Keywords: regression
Depends on: 1275331
Blocks: 974387
So, weird enough, we cannot reproduce the issue any more... Will reopen if I see the bug again.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.