Bug 814712

Summary: Cannot get bug flags in Bug::search call
Product: [Community] Bugzilla Reporter: Martin Kosek <mkosek>
Component: WebServiceAssignee: Simon Green <sgreen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 4.2CC: ebaak, sgreen
Target Milestone: 4.2-1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.2.1-0.b27 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-24 06:04:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 786624    

Description Martin Kosek 2012-04-20 13:56:55 UTC
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):
4.2.0-0.b25

How reproducible:


Steps to Reproduce:
1. Call Bug::search with "include_fields = ['id', 'flags']"
2.
3.
  
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 07:19:11 UTC
Filed upstream with a patch
https://bugzilla.mozilla.org/show_bug.cgi?id=747841

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 06:04:56 UTC
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