Closed
Bug 579514
Opened 15 years ago
Closed 15 years ago
Bug.attachments should also return attachment data
Categories
(Bugzilla :: WebService, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.0
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file)
|
6.64 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
The Bug.attachments WebService method should also be able to return attachment data.
I'm going to make it do so optionally, with an extra_fields argument (like Gerv and I discussed on the developers list a while ago).
Flags: blocking4.0+
| Assignee | ||
Comment 1•15 years ago
|
||
All right, this adds "data" to the return value. I decided not to make it optional, because I thought that would make it confusing. People who don't want it can still put it in exclude_fields to speed things up.
I also put creator/attacher inside of a filter_wants block, just for the tiny bit of additional performance it could get us.
This patch also includes the filter_wants patch from bug 573195.
Comment 2•15 years ago
|
||
(In reply to comment #1)
> All right, this adds "data" to the return value. I decided not to make it
> optional, because I thought that would make it confusing. People who don't
> want it can still put it in exclude_fields to speed things up.
Won't that make it bulky and slow it down for people using the API that didn't define it yet that aren't expecting it?
Comment 3•15 years ago
|
||
Yeah, why are you including data by default, yet requiring users to include creator/attacher if they want that field. Personally, I think it should be the opposite.
| Assignee | ||
Comment 4•15 years ago
|
||
I'm not requiring users to include creator/attacher if they want it. All fields are being sent by default. Read the docs for include_fields and exclude_fields in Bugzilla::WebService to understand how filter_wants works.
It will slightly slow down the API for users who don't need the attachment data, but this is a change that's going into a major new release, and this fact will be in the release notes. People can choose not to get it using exclude_fields, and it's perfectly safe to specify exclude_fields => ['data'] on all branches, also, so people can write cross-version apps that don't get data.
I figured it was more important to make it discoverable (avoid the people coming and asking us, "Why can't I get attachment data?") than to make it send less data in the default case.
Comment 5•15 years ago
|
||
Comment on attachment 457983 [details] [diff] [review]
v1
Looks good and works as expected. r=dkl
Attachment #457983 -
Flags: review?(dkl) → review+
Updated•15 years ago
|
Flags: approval?
Flags: approval4.0?
| Assignee | ||
Updated•15 years ago
|
| Assignee | ||
Comment 6•15 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/WebService.pm
modified Bugzilla/WebService/Bug.pm
modified Bugzilla/WebService/Util.pm
modified Bugzilla/WebService/Server/JSONRPC.pm
Committed revision 7390.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/WebService.pm
modified Bugzilla/WebService/Bug.pm
modified Bugzilla/WebService/Util.pm
modified Bugzilla/WebService/Server/JSONRPC.pm
Committed revision 7335.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•