<div dir="ltr"><div><div>Thanks for the reply on this issue. I've tried the "bugzilla" command line with --from-url option and the results are basically the same. At this point it looks like I will need to perform the advanced query from the Web UI, export the result set to CSV file, then import into my script for processing which is not ideal. It's workable, but not ideal. <br><br></div><div>Can anyone think of a better option / workaround to obtain an "advanced query" result set ?<br></div><div><br></div>Thanks<br><br></div>MC<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 8:18 AM, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 11/12/2014 11:12 AM, Mildred Clarke wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
All,<br>
<br>
The python-bugzilla implementation is great but I have one issue that I cannot<br>
seem to find resolution on. Was hoping that someone here could shed some light<br>
on the situation. I have attempted a few different ways and upon review of the<br>
source I don't think* what I am attempting to do is supported in the version I<br>
am using (1.1.0)<br>
<br>
When I attempt to build a complex query, the url_to_query method returns a<br>
dictionary object that appears to contain the appropriate values. However,<br>
when attempting to query the remote bugzilla instance an error message is<br>
displayed and no results are returned. I believe this is due to the use of<br>
the "advanced" query format. The error message is complaining about the use of<br>
"v1" and sometimes "o2". Is it the use of Regex ? Is it my bugzilla instance ?<br>
<br>
Message and code snips below.<br>
<br>
--- Error Message ---<br>
Fault: <Fault 53: 'v1 is not a valid parameter for the Bugzilla::Bug::match<br>
function.'><br>
<br>
--- Error Message ---<br>
Fault: <Fault 53: 'o2 is not a valid parameter for the Bugzilla::Bug::match<br>
function.'><br>
<br>
<br>
--- CODE SNIP ---<br>
q_url="<a href="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=" target="_blank">https://bugzilla.local/<u></u>query.cgi?bug_status=New&bug_<u></u>status=Accepted&bug_status=<u></u>Reopened&f1=cf_custom_field_<u></u>here&f2=bug_id&f3=alias&o1=<u></u>regexp&o2=greaterthan&o3=<u></u>notsubstring&query_format=<u></u>advanced&v1=</a>^%24&v2=410000&v3=<u></u>-"<br>
<br>
Returns the values in a dictionary with this command --<br>
bz.url_to_query(q_url)<br>
<br>
{'bug_status': ['New', 'Accepted', 'Reopened'],<br>
'f1': 'cf_custom_field_here',<br>
'f2': 'bug_id',<br>
'f3': 'alias',<br>
'o1': 'regexp',<br>
'o2': 'greaterthan',<br>
'o3': 'notsubstring',<br>
'query_format': 'advanced',<br>
'v1': '^$',<br>
'v2': '410000',<br>
'v3': '-'}<br>
<br>
This is the actual code that will produce the error message. bz is my bugzilla<br>
connection.<br>
""" bz.query(bz.url_to_query(q_<u></u>url)) """. As you can see, I am using the<br>
"advanced" formatting. If I don't include the "f*, v*, o*" parameters queries<br>
return a result set.<br>
<br>
Let me know if you need more details to help figure out this issue.<br>
<br>
Thanks<br>
<br>
Mildred.<br>
</blockquote>
<br></div></div>
The query_format=advanced support is a <a href="http://bugzilla.redhat.com" target="_blank">bugzilla.redhat.com</a> custom extension, so probably doesn't work for your local bugzilla instance. There was some talk at one point of extending upstream bugzilla to support something similar, but AFAICT that doesn't exist yet.<span class="HOEnZb"><font color="#888888"><br>
<br>
- Cole<br>
<br>
</font></span></blockquote></div><br></div></div></div>