Bug 706795 - Bug.update of Bugzilla XMLRPC API
Summary: Bug.update of Bugzilla XMLRPC API
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: devel
Hardware: Unspecified
OS: Unspecified
unspecified
urgent vote
Target Milestone: ---
Assignee: Simon Green
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 704398
TreeView+ depends on / blocked
 
Reported: 2011-05-23 03:09 UTC by Huan Zhang
Modified: 2014-10-12 22:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-25 07:37:10 UTC


Attachments (Terms of Use)

Description Huan Zhang 2011-05-23 03:09:30 UTC
Scripts:
updateArguments = {updates={target_milestone=beta1, product=AMS, platform=sh4, bug_status=CLOSED, component=Database, priority=high, resolution=NOTABUG, serverity=high, version=2.8}, ids=[738034]}

rpcClient.execute("Bug.update", new Object[] { updateArguments });

There is a exception while executing the scripts above.

com.redhat.gss.andreas.AndreasException: Exception while updating bug.
	at 
...
Caused by: org.apache.xmlrpc.XmlRpcException: Missing required information to change a product of a bug. You must specify all the following: component name, version, and target milestone.
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
	at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:137)
	at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:126)
	at com.redhat.gss.common.bugzilla.BugzillaClientImpl.update(BugzillaClientImpl.java:356)
	... 25 more

I am puzzled that,bugzilla still threw a exception although I have set the component name, version, and target milestone.

Recently, the bugzilla xmlrpc changes happened in partner-bugzilla.redhat.com. 
I learned that the component, version, target_release fields are changing from single value to multi-value. But I don't know how to use multi-value to execute xmlrpc client.

Who can help me?

Comment 1 Huan Zhang 2011-05-23 04:32:20 UTC
I have tested the Bug.get method.

Multi-valued component appears as "Bug Import/Export/Moving", the multi-value of component is split by "/" as one string.

For the multi-value of version, there are "version" and "cf_extra_version" which split the multi-value. For example, version field are 2.18, 3.2 & 3.4, the result via xmlrpc appears that version: 2.18, cf_extra_version: [3.2, 3.4].

Comment 2 Huan Zhang 2011-05-24 06:30:32 UTC
With the help of Simon Green,

When execute "Bug.update", we should not only set product, component, version and target_milestone but also need to set the target_release.

component, version and target_release should be multi-value.( Object[] )

Comment 3 Simon Green 2011-05-25 07:37:10 UTC
This (fixing the error message) has been fixed on a partner-bugzilla release done at 4pm AEST / 2am EDT Wednesday. Let me know if you still experience problems.

  -- simon


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