Bug 1384737

Summary: Webservice returning optional fields all the time
Product: [Community] Bugzilla Reporter: Rony Gong 🔥 <qgong>
Component: Bugzilla GeneralAssignee: Matt Tyson 🤬 <mtyson>
Status: CLOSED NEXTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.0CC: huiwang, mtyson, qgong
Target Milestone: 5.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.0.3.rh12 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-27 05:21:11 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:

Description Rony Gong 🔥 2016-10-14 02:57:34 UTC
Description of problem:
Webservice of bug.get method could list dependent_products without specified in the include_fields argument.

But in the documentation 
https://bz-web.host.qe.eng.pek2.redhat.com/docs/en/html/integrating/api/Bugzilla/WebService/Bug.html

It said:
dependent_products

    array-of-strings The names of the products that this bug affects.

    This value must be specified in the include_fields or extra_fields argument.

    This is a Red Hat customization


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

How reproducible:
100%

Steps to Reproduce:
1.Execute below xmlrpc method:
Bug.get({'ids': [1285446], 'Bugzilla_login': 'qgong', 'Bugzilla_password': '****'})

2.
3.

Actual results:
==>the result contains 'dependent_products': ['Bugzilla']

Expected results:
Please update the documentation or update this method.

Additional info:

Comment 1 Matt Tyson 🤬 2016-10-17 03:23:45 UTC
This seems to be true for any usage of the filter_wants function.  All our fields that are optional are being unconditionally returned

Comment 2 Rony Gong 🔥 2016-10-18 07:17:14 UTC
Try to execute xmlrpc of Bug.get with extra_fields set like below:

{'login':'${Login_Redhat}','password':'${Password_All}','ids':['bne-${Random1}'], 'extra_fields':['dependent_products']}

==>The return doesn't contain the value of dependent_products

Comment 3 Rony Gong 🔥 2016-10-26 02:28:54 UTC
Tested on QA environment(5.0.3-rh12)
Result: Pass