Bug 814712 - Cannot get bug flags in Bug::search call
Cannot get bug flags in Bug::search call
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
Unspecified Unspecified
high Severity medium (vote)
: ---
: ---
Assigned To: Simon Green
Depends On:
Blocks: BZ42
  Show dependency treegraph
Reported: 2012-04-20 09:56 EDT by Martin Kosek
Modified: 2014-10-12 18:47 EDT (History)
2 users (show)

See Also:
Fixed In Version: 4.2.1-0.b27
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-24 02:04:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Kosek 2012-04-20 09:56:55 EDT
Description of problem:

With 3.6.x Bugzilla version we were able to search bugs and get the respective flags. This is important for us, because we can get all bugs that are of our interest along with their flags (which are further processed) in one call.

Getting a list of bugs via Bug::search call and then requesting flags via Flags::get would decrease the speed of our application and lower user experience.

XMLRPC call with 3.6.x Bugzilla:
$ python
>>> print proxy.Bug.search({'bug_status' : ['NEW'], \
                            'product': 'Red Hat Enterprise Linux 6', \
                            'component': 'ipa', \
                            'column_list' : ['id', 'flags']})
{'displaycolumns': ['flags'], 'bugs': [{'bug_id': 689021, 'product': 'Red Hat Enterprise Linux 6', 'flags': 'pm_ack?, rhel-6.4.0?'}, ...

I can no longer get Bugzilla flags with Bugzilla 4.2 because "column_list" is deprecated and "include_fields" does not recognize "flags" field.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Call Bug::search with "include_fields = ['id', 'flags']"
Actual results:
Call returns just a list of IDs

Expected results:
Call returns both Bug IDs and flags in the list.

Additional info:
Comment 1 Simon Green 2012-04-23 03:19:11 EDT
Filed upstream with a patch

Will work on getting this into our code tomorrow. We need to make some modifications from upstream because (a) we restrict flag visibility, and (b) if you are not logged in, you only see the name of the flag setter and requestee, not their login.

  -- simon
Comment 2 Simon Green 2012-04-24 02:04:56 EDT
Upstream rejected my patch as this change has already been made (by dkl no less) in trunk. I have back ported that code with our extensions to maintain compatibility with Bugzilla 4.4 (assuming there is no change between now and feature freeze of 4.4)

  -- simon

Note You need to log in before you can comment on or make changes to this bug.