Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 816953 - include_fields does not work consistently
Summary: include_fields does not work consistently
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 4.2
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: 4.2-1
Assignee: Simon Green
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: BZ42
TreeView+ depends on / blocked
 
Reported: 2012-04-27 10:58 UTC by Martin Kosek
Modified: 2018-12-09 06:29 UTC (History)
2 users (show)

Fixed In Version: 4.2.1-0.b30
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-30 00:27:07 UTC


Attachments (Terms of Use)

Description Martin Kosek 2012-04-27 10:58:31 UTC
Description of problem:

include_fields option of Bug::search XMLRPC call does not work consistently across this call options. For simple Bug::search it works OK:

$ python
Python 2.7.2 (default, Oct 27 2011, 01:40:22) 
[GCC 4.6.1 20111003 (Red Hat 4.6.1-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
...
>>> proxy
<ServerProxy for partner-bugzilla.redhat.com/xmlrpc.cgi>
>>> pp.pprint(proxy.Bug.search({'status' : ['MODIFIED'],'product': 'Red Hat Enterprise Linux 6','component': 'ipa','include_fields': [ 'id', 'summary']}))
{ 'bugs': [ { 'id': 688765,
              'summary': '[RFE] afsdb records to not seem to be resolvable.'},
            { 'id': 738049,
              'summary': '[ipa webui] Remove Rule type info from HBAC page'},
            { 'id': 738788,
              'summary': 'ipa dnsrecord-add allows invalid kx records'},
...

But for savedsearch and quicksearch searches it seems not to affect the returned fields:

>>> pp.pprint(proxy.Bug.search({'savedsearch':'mkosek: processed IPA bugs', 'include_fields': [ 'id', 'summary']}))
{ 'bugs': [ { 'alias': [],
              'assigned_to': 'rcritten@redhat.com',
              'blocks': [565950, 767819],
              'cc': [ 'agk@redhat.com',
                      'bstein@redhat.com',
                      'ddumas@redhat.com',
                      'dlehman@redhat.com',
                      'dpal@redhat.com',
                      'esammons@redhat.com',
                      'jgalipea@redhat.com',
                      'jhunt@redhat.com',
                      'kevinu@redhat.com',
                      'mbroz@redhat.com',
                      'mkosek@redhat.com',
                      'ngalvin@redhat.com',
                      'notting@redhat.com',
                      'sgrubb@redhat.com',
                      'snagar@redhat.com',
                      'tao@redhat.com',
                      'tscherf@redhat.com'],
              'cf_build_id': '',
              'cf_clone_of': '',
              'cf_conditional_nak': [],
              'cf_crm': '',
...

Also if I request "flags" field, it is not returned.

Search by quicksearch does not work at all:
>>> pp.pprint(proxy.Bug.search({'quicksearch':'product:"Red Hat Enterprise Linux 6" component:"ipa" flag:rhel-6.3.0+', 'include_fields': [ 'id', 'summary']}))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1575, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "bz/proxy.py", line 281, in parse_response
    return xmlrpclib.SafeTransport.parse_response(self, response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1473, in parse_response
    return u.close()
  File "/usr/lib64/python2.7/xmlrpclib.py", line 793, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -32000: 'DBD::mysql::st execute failed: FUNCTION bugs.0AND does not exist [for Statement "SELECT bugs.bug_id AS bug_id\n  FROM bugs\nLEFT JOIN bug_group_map AS security_map ON bugs.bug_id = security_map.bug_id AND NOT ( security_map.group_id IN (7,94,147,76,68,144,15,155,146,123,122,21,12,152,106,150,243,41,210,58,85,92,50,83,183,133,79,81,182,192,25,200,201,75,148,91,108,119,145,218,124,11,149,161,142,140,80,44,134,215,22,139,138,127,78,126,93,10,48,217,208,209,74,121) )\nLEFT JOIN cc AS security_cc ON bugs.bug_id = security_cc.bug_id AND security_cc.who = 308696\n WHERE bugs.creation_ts IS NOT NULL\n   AND (security_map.group_id IS NULL\n        OR (bugs.reporter_accessible = 1 AND bugs.reporter = 308696)\n        OR (bugs.cclist_accessible = 1 AND security_cc.who IS NOT NULL)\n        OR bugs.assigned_to = 308696\n        OR bugs.qa_contact = 308696)\n   AND  bugs.bug_status IN (\'NEW\',\'VERIFIED\',\'ASSIGNED\',\'MODIFIED\',\'ON_DEV\',\'ON_QA\',\'RELEASE_PENDING\',\'POST\')  AND ( bugs.product_id IN (SELECT products.id FROM products WHERE INSTR(products.name, \'Red Hat Enterprise Linux 6\') > 0) AND ( ( (bugs.component_id IN (SELECT components.id FROM components WHERE INSTR(components.name, \'ipa\') > 0) OR bugs.bug_id IN (SELECT bug_cf_extra_component.bug_id FROM bug_cf_extra_component WHERE INSTR(bug_cf_extra_component.value, \'ipa\') > 0)) ) ) AND ( ( ( bugs.bug_id IN (SELECT bug_id FROM flags INNER JOIN flagtypes ON flags.type_id = flagtypes.id WHERE INSTR(CONCAT(flagtypes.name, flags.status), \'rhel-6.3.0+\') > 0AND (flagtypes.view_group_id IS NULL  OR flagtypes.view_group_id IN (7,94,147,76,68,144,15,155,146,123,122,21,12,152,106,150,243,41,210,58,85,92,50,83,183,133,79,81,182,192,25,200,201,75,148,91,108,119,145,218,124,11,149,161,142,140,80,44,134,215,22,139,138,127,78,126,93,10,48,217,208,209,74,121))) ) ) ) )\nGROUP BY bugs.bug_id\nLIMIT 20000\n"] at Bugzilla/DB.pm line 1276\n\tBugzilla::DB::__ANON__() called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/DBIx/Timeout.pm line 31\n\tDBIx::Timeout::call_with_timeout(\'undef\', \'dbh\', \'Bugzilla::DB::Mysql=HASH(0xfb3e4b0)\', \'code\', \'CODE(0xfd1f9d0)\', \'timeout\', 300) called at Bugzilla/DB.pm line 1277\n\tBugzilla::DB::bz_call_with_timeout(\'Bugzilla::DB::Mysql=HASH(0xfb3e4b0)\', \'DBI::st=HASH(0xfd1f0c0)\') called at Bugzilla/WebService/Bug.pm line 561\n\tBugzilla::WebService::Bug::_do_advanced_search(\'Bugzilla::WebService::Bug\', \'HASH(0xf81a6c0)\') called at Bugzilla/WebService/Bug.pm line 465\n\tBugzilla::WebService::Bug::search(\'Bugzilla::WebService::Bug\', \'HASH(0xf81a6c0)\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2740\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2725\n\teval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2691\n\tSOAP::Server::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0xf6bead0)\', \'<?xml version=\\\'1.0\\\'?>\\x{a}<methodCall>\\x{a}<methodName>Bug.search</...\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 387\n\tSOAP::Transport::HTTP::Server::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0xf6bead0)\') called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 508\n\tSOAP::Transport::HTTP::CGI::handle(\'Bugzilla::WebService::Server::XMLRPC=HASH(0xf6bead0)\') called at /var/www/html/bugzilla/xmlrpc.cgi line 48\n'>


Version-Release number of selected component (if applicable):
4.2.1-0.b28

How reproducible:


Steps to Reproduce:
1. Run Bug::search XMLRPC call with "savedsearch" or "quicksearch" option and specify include_fields
2.
3.
  
Actual results:
savedsearch does not respect include_fields
quicksearch fails

Expected results:
Bugs returned by savedsearch respect include_fields
Bugs returned by quicksearch respect include_fields

Additional info:

Comment 1 Simon Green 2012-04-27 11:42:57 UTC
Good spotting. quicksearch, savedsearch and query_format searches currently won't honour *_fields values. I'll work on fixing this on Monday.

Comment 2 Simon Green 2012-04-30 00:27:07 UTC
Will be fixed in the next update.

  -- simon


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