简体   繁体   中英

how to retrieve field values from python-bugzilla xml-rpc

I am using ” python-bugzilla 0.8.0 ” for xml-rpc web service of bugzilla 4.2.

Anyone knows how to retrieve field values. ie If bugzilla Severity field have following values: Critical, Significant, Medium, Uncritical etc. then how I can get these values via python code ?

getbugfields() method returns the names of the fields but how I could get the values of the fields ?

Thanks in advance,

Here is a reply from "redhat" (supplier of python-bugzilla tool) that

"*there is no wrapper for what I want. The bugzilla XMLRPC call is 'fields' for bugzilla4+

http://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/WebService/Bug.html#fields

It can be a work around this by accessing the xmlrpc proxy directly and handling the calls yourself, ex:

import bugzilla
bz = bugzilla.Bugzilla(url="https://bugzilla.kernel.org")

print bz._proxy.Bug.fields({"names" : ["rep_platform"]})

Of course, that's not supported, so it could stop working on you one day, but for personal scripts and stuff it's an alternative.*"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM