<div dir="ltr"><div><div>Thanks for the reply on this issue. I&#39;ve tried the &quot;bugzilla&quot; 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&#39;s workable, but not ideal. <br><br></div><div>Can anyone think of a better option / workaround to obtain an &quot;advanced query&quot; 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">&lt;<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>&gt;</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&#39;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 &quot;advanced&quot; query format. The error message is complaining about the use of<br>
&quot;v1&quot; and sometimes &quot;o2&quot;. Is it the use of Regex ? Is it my bugzilla instance ?<br>
<br>
Message and code snips below.<br>
<br>
--- Error Message ---<br>
Fault: &lt;Fault 53: &#39;v1 is not a valid parameter for the Bugzilla::Bug::match<br>
function.&#39;&gt;<br>
<br>
--- Error Message ---<br>
Fault: &lt;Fault 53: &#39;o2 is not a valid parameter for the Bugzilla::Bug::match<br>
function.&#39;&gt;<br>
<br>
<br>
--- CODE SNIP ---<br>
q_url=&quot;<a href="https://bugzilla.local/query.cgi?bug_status=New&amp;bug_status=Accepted&amp;bug_status=Reopened&amp;f1=cf_custom_field_here&amp;f2=bug_id&amp;f3=alias&amp;o1=regexp&amp;o2=greaterthan&amp;o3=notsubstring&amp;query_format=advanced&amp;v1=" target="_blank">https://bugzilla.local/<u></u>query.cgi?bug_status=New&amp;bug_<u></u>status=Accepted&amp;bug_status=<u></u>Reopened&amp;f1=cf_custom_field_<u></u>here&amp;f2=bug_id&amp;f3=alias&amp;o1=<u></u>regexp&amp;o2=greaterthan&amp;o3=<u></u>notsubstring&amp;query_format=<u></u>advanced&amp;v1=</a>^%24&amp;v2=410000&amp;v3=<u></u>-&quot;<br>
<br>
Returns the values in a dictionary with this command --<br>
bz.url_to_query(q_url)<br>
<br>
{&#39;bug_status&#39;: [&#39;New&#39;, &#39;Accepted&#39;, &#39;Reopened&#39;],<br>
  &#39;f1&#39;: &#39;cf_custom_field_here&#39;,<br>
  &#39;f2&#39;: &#39;bug_id&#39;,<br>
  &#39;f3&#39;: &#39;alias&#39;,<br>
  &#39;o1&#39;: &#39;regexp&#39;,<br>
  &#39;o2&#39;: &#39;greaterthan&#39;,<br>
  &#39;o3&#39;: &#39;notsubstring&#39;,<br>
  &#39;query_format&#39;: &#39;advanced&#39;,<br>
  &#39;v1&#39;: &#39;^$&#39;,<br>
  &#39;v2&#39;: &#39;410000&#39;,<br>
  &#39;v3&#39;: &#39;-&#39;}<br>
<br>
This is the actual code that will produce the error message. bz is my bugzilla<br>
connection.<br>
&quot;&quot;&quot; bz.query(bz.url_to_query(q_<u></u>url)) &quot;&quot;&quot;. As you can see, I am using the<br>
&quot;advanced&quot; formatting.  If I don&#39;t include the &quot;f*, v*, o*&quot; 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&#39;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&#39;t exist yet.<span class="HOEnZb"><font color="#888888"><br>
<br>
- Cole<br>
<br>
</font></span></blockquote></div><br></div></div></div>