Closed Bug 606511 Opened 14 years ago Closed 13 years ago

Bug.search should allow use of include_fields and exclude_fields

Categories

(Bugzilla :: WebService, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: dkl, Assigned: dkl)

References

Details

Attachments

(1 file, 1 obsolete file)

Since Bug.search is calling _bug_to_hash for each returned bug, it should also then allow the use of include_fields and exclude_fields. Currently if you pass in those params, you will get an error that those are not allow param values for match(). The attached patch allows the new params to be used properly.

Dave
Attachment #485312 - Flags: review?(mkanat)
Thank you so much for writing this patch, I totally wanted it to happen. :-)
Target Milestone: --- → Bugzilla 4.0
Comment on attachment 485312 [details] [diff] [review]
Patch to allow include/exclude_fields to be used with Bug.search (v1)

I think a simpler piece of code would be to copy the entire input $params to another hash, then delete the two items from the original hash, and pass the copied hash to _bug_to_hash.
Attachment #485312 - Flags: review?(mkanat) → review-
Flags: blocking4.0+
OS: Mac OS X → All
Hardware: x86 → All
Assignee: webservice → dkl
Thanks for the review Max. Here is an updated patch with your suggested change.

Dave
Attachment #485312 - Attachment is obsolete: true
Attachment #485656 - Flags: review?(mkanat)
Comment on attachment 485656 [details] [diff] [review]
Patch to allow include/exclude_fields to be used with Bug.search (v2)

Beautiful. :-)
Attachment #485656 - Flags: review?(mkanat) → review+
Flags: approval4.0+
Flags: approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk
modified Bugzilla/WebService/Bug.pm
Committed revision 7573.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Needs checking in on 4.0 also.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
4.0:
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/4.0/   modified Bugzilla/WebService/Bug.pm
Committed revision 7546.
Status: REOPENED → RESOLVED
Closed: 14 years ago13 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: