简体   繁体   English

如何从python-bugzilla xml-rpc检索字段值

[英]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. 我在Bugzilla 4.2的xml-rpc Web服务中使用“ python-bugzilla 0.8.0 ”。

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 ? 即,如果bugzilla严重性字段具有以下值:Critical,Significant,Medium,Uncritical等。那么我如何通过python代码获取这些值?

getbugfields() method returns the names of the fields but how I could get the values of the fields ? getbugfields()方法返回字段的名称,但是如何获取字段的值呢?

Thanks in advance, 提前致谢,

Here is a reply from "redhat" (supplier of python-bugzilla tool) that 这是来自“ redhat”(python-bugzilla工具的供应商)的答复,

"*there is no wrapper for what I want. The bugzilla XMLRPC call is 'fields' for bugzilla4+ “ *没有我想要的包装器。bugzillaXMLRPC调用是bugzilla4 +的“字段”

http://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/WebService/Bug.html#fields 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: 可以通过直接访问xmlrpc代理并自己处理调用来解决此问题,例如:

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.*" 当然,不支持该功能,因此有一天它可能会停止为您工作,但是对于个人脚本和其他东西,则是另一种选择。*”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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