Bug.search should allow use of include_fields and exclude_fields

RESOLVED FIXED in Bugzilla 4.0

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: dkl, Assigned: dkl)

Tracking

unspecified
Bugzilla 4.0
Bug Flags:
approval +
approval4.0 +
blocking4.0 +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

8 years ago
Created attachment 485312 [details] [diff] [review]
Patch to allow include/exclude_fields to be used with Bug.search (v1)

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-

Updated

8 years ago
Flags: blocking4.0+
OS: Mac OS X → All
Hardware: x86 → All

Updated

8 years ago
Assignee: webservice → dkl
(Assignee)

Comment 3

8 years ago
Created attachment 485656 [details] [diff] [review]
Patch to allow include/exclude_fields to be used with Bug.search (v2)

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+

Updated

8 years ago
Flags: approval4.0+
Flags: approval+
(Assignee)

Comment 5

8 years ago
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk
modified Bugzilla/WebService/Bug.pm
Committed revision 7573.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

8 years ago
Duplicate of this bug: 633354
Needs checking in on 4.0 also.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 8

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