Bug 1384737 - Webservice returning optional fields all the time
Summary: Webservice returning optional fields all the time
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 5.0
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: 5.0
Assignee: Matt Tyson 🤬
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-14 02:57 UTC by Rony Gong 🔥
Modified: 2018-12-09 06:29 UTC (History)
3 users (show)

Fixed In Version: 5.0.3.rh12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-27 05:21:11 UTC


Attachments (Terms of Use)

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


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