[python-bugzilla] Fwd: Complex Query Support

Mildred Clarke gargoyle.python at gmail.com
Wed Nov 12 16:12:01 UTC 2014


All,

The python-bugzilla implementation is great but I have one issue that I
cannot seem to find resolution on. Was hoping that someone here could shed
some light on the situation. I have attempted a few different ways and upon
review of the source I don't think* what I am attempting to do is supported
in the version I am using (1.1.0)

When I attempt to build a complex query, the url_to_query method returns a
dictionary object that appears to contain the appropriate values. However,
when attempting to query the remote bugzilla instance an error message is
displayed and no results are returned.  I believe this is due to the use of
the "advanced" query format. The error message is complaining about the use
of "v1" and sometimes "o2". Is it the use of Regex ? Is it my bugzilla
instance ?

Message and code snips below.

--- Error Message ---
Fault: <Fault 53: 'v1 is not a valid parameter for the Bugzilla::Bug::match
function.'>

--- Error Message ---
Fault: <Fault 53: 'o2 is not a valid parameter for the Bugzilla::Bug::match
function.'>


--- CODE SNIP ---
q_url="
https://bugzilla.local/query.cgi?bug_status=New&bug_status=Accepted&bug_status=Reopened&f1=cf_custom_field_here&f2=bug_id&f3=alias&o1=regexp&o2=greaterthan&o3=notsubstring&query_format=advanced&v1=
^%24&v2=410000&v3=-"

Returns the values in a dictionary with this command --
bz.url_to_query(q_url)

{'bug_status': ['New', 'Accepted', 'Reopened'],
 'f1': 'cf_custom_field_here',
 'f2': 'bug_id',
 'f3': 'alias',
 'o1': 'regexp',
 'o2': 'greaterthan',
 'o3': 'notsubstring',
 'query_format': 'advanced',
 'v1': '^$',
 'v2': '410000',
 'v3': '-'}

This is the actual code that will produce the error message. bz is my
bugzilla connection.
""" bz.query(bz.url_to_query(q_url)) """. As you can see, I am using the
"advanced" formatting.  If I don't include the "f*, v*, o*" parameters
queries return a result set.

Let me know if you need more details to help figure out this issue.

Thanks

Mildred.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/python-bugzilla/attachments/20141112/70bc3c10/attachment.html>


More information about the python-bugzilla mailing list