Bug 1372132

Summary: RPC API for Dependent Products bug information
Product: [Community] Bugzilla Reporter: Matt Tyson 🤬 <mtyson>
Component: Bugzilla GeneralAssignee: Matt Tyson 🤬 <mtyson>
Status: CLOSED NEXTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.0CC: huiwang, mtahir, 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:02 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 Matt Tyson 🤬 2016-09-01 01:32:05 UTC
The new Dependent Products extension doesn't behave well with the current RPC.

When you fetch a bug using Bug.get you should be able to get the list of dependent products that is set against that bug.

When you update a bug using Bug.update, you should be able to set a list of dependent products, either by name or product ID.

Comment 1 Matt Tyson 🤬 2016-09-15 05:31:01 UTC
Added dependent_product fields to Bug.get and Bug.update calls.

See the Bug.get and Bug.update docs for information on how to use these fields.

Comment 2 Rony Gong 🔥 2016-10-09 07:20:55 UTC
@Matt, where could I find the related xmlrpc doc about this feature? And I can't find the doc about dependent_products in below link:

https://bz-web.host.qe.eng.pek2.redhat.com/docs/en/html/api/core/v1/bug.html

Comment 3 Matt Tyson 🤬 2016-10-10 01:28:18 UTC
I wrote the docs for the old API.  I'll need to also modify the docs for the new REST API.

Comment 4 Rony Gong 🔥 2016-10-18 06:36:05 UTC
Try to update product's dependent_products, get error:

=================Executed XML-RPC================= xmlrpc.DependentProducts.update({'products': [{'dm_contacts': {'set': ['qgong']}, 'depends_on': {'add': ['Red Hat Database', 'Errata Tool']}, 'pm_contacts': {'set': ['qgong']}, 'name': 'OpenShift Online', 'qe_contacts': {'set': ['qgong']}}], 'Bugzilla_login': 'admin1', 'Bugzilla_password': '*****'}) 

=============XMLRPC Execution Results============= {'fault_code': -32000, 'fault_string': 'Can\'t call method "qe_contacts_as_email" on an undefined value at /loader/0x7f924c92b760/Bugzilla/Extension/DependentProducts/WebService/DependentProducts.pm line 76.\n'}

Comment 5 Rony Gong 🔥 2016-10-27 03:09:00 UTC
Tested on QA environment(5.0.3-rh12)
Result: Pass