[python-bugzilla] Examples of querying with a flag?
Cole Robinson
crobinso at redhat.com
Sun Mar 23 21:21:28 UTC 2014
On 03/23/2014 04:08 PM, Bryan Kearney wrote:
> I am trying to use the python api to query based on flags. I have tried
> build_qeury with lines like:
>
> flag = ["sat-6.0.3+"],
>
> and
>
> flag = [{"name": "sat-6.0.3", "status": "+"}],
>
> neither of which seem to work. Are there examples of using the API to query
> via flags?
>
> Thanks in advance.
Passing build_query(flag=["needinfo?"]) works for me... what's your full
build_query invocation? Also make sure you are logged in.
print bzapi.build_query(product="Fedora", version="20", component="qemu",
flag=["needinfo?"])
{'product': ['Fedora'], 'value0-0-0': 'needinfo?', 'version': '20',
'query_format': 'advanced', 'type0-0-0': 'substring', 'component': ['qemu'],
'field0-0-0': 'flagtypes.name'}
If I just do query(build_query(flag=["sat-6.0.3+"])) it produces results for me.
- Cole
More information about the python-bugzilla
mailing list