<div dir="ltr"><div style>Hi,</div><div style><br></div>I&#39;m trying to write a simple python program that would search for all bugs with a specific set of flags.  Using the bugzilla cli the boolean query works.
<div><br></div><div style>&lt;cli&gt;</div><div style>bugzilla query --product=&#39;Red Hat Enterprise MRG&#39; --component=&#39;distribution, qpid-cpp, qpid-java, qpid-jca&#39; --boolean_query=&#39;flagtypes.name-substring-mrg-2.4.0 &amp; flagtypes.name-notsubstring-mrg-2.4.0-&#39;<br>
</div><div style>&lt;/cli&gt;</div><div style><br></div><div style>When I try to use the following, I receive a malformed boolean error.</div><div style><br></div><div style>&lt;code&gt;</div><div style>bz_boolean = &#39;flagtypes.name-substring-mrg-2.4.0 &amp; flagtypes.name-notsubstring-mrg-2.4.0-&#39;<br>
</div><div style>bz = bugzilla.Bugzilla(url = bzurl)<br></div><div style><div>query_in = bz.build_query(</div><div>                              product = &quot;Red Hat Enterprise MRG&quot;,</div><div>                              component = MRGM,</div>
<div>                              boolean_query = bz_boolean)</div><div><div>query_out = bz.query(query_in)</div><div>for i in query_out:</div><div>    print i</div></div><div style>&lt;/code&gt;</div><div style><br></div>
<div style>RuntimeError: Malformed boolean query: flagtypes.name-substring-mrg-2.4.0 &amp; flagtypes.name-notsubstring-mrg-2.4.0-<br></div><div style><br></div><div style>What am I doing wrong here or is it possible there is a bug in the library?  Also, I see that there is a option to use &#39;flag&#39; for boolean search; however, there is no example of how to do this.  Is there possibly a way to translate the the boolean query I&#39;m attempting into a flag query?</div>
<div style><br></div><div style>Thanks!</div><div style>Eric</div><div style><br></div></div></div>