Bug 1372132 - RPC API for Dependent Products bug information
Summary: RPC API for Dependent Products bug information
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: 5.0
Assignee: Matt Tyson 🤬
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-01 01:32 UTC by Matt Tyson 🤬
Modified: 2018-12-09 06:29 UTC (History)
4 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:02 UTC


Attachments (Terms of Use)

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


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