Arun,
Thanks for the reply and recommendation. Yes, the web gui search works
fine and is how I was sourcing the query string. My methodology has been to
build the search in the web gui, choose "Edit Search" on the result set,
and copy that URI for processing in the python-bugzilla module. The path
for the URI I was testing "/query.cgi" with some variance on the parameters
you saw in my previous example.
I also tried to pass a different Bugzilla instance such as "RHBugzilla"
just for fun. FYI, in my test environment I am using Bugzilla44. It
didn't work either way.....
I'll give the "Saved Searches a shot and let you know how that works out. I
did try to pass that URI previously but it did not include the parameters
you mentioned. "cmdtype" was what I passed and that also failed with the
same fault code of 53.
Thanks for that tip !!!
Mildred.
On Wed, Nov 12, 2014 at 7:24 PM, Arun Babu Neelicattu <abn(a)redhat.com>
wrote:
Never mind, forgot to add --bugzilla=
https://landfill.bugzilla.org/bugzilla-4.0-branch/xmlrpc.cgi but it works
via buglist.cgi :(
Got:
Server error: <Fault 53: 'v1 is not a valid parameter for the
Bugzilla::Bug::match function.'>
Hopefully savedsearches work!
-arun
----- Original Message -----
> From: "Arun Babu Neelicattu" <abn(a)redhat.com>
> To: "Mildred Clarke" <gargoyle.python(a)gmail.com>
> Cc: "Cole Robinson" <crobinso(a)redhat.com>,
python-bugzilla(a)lists.fedorahosted.org
> Sent: Thursday, November 13, 2014 1:22:24 PM
> Subject: Re: [python-bugzilla] Fwd: Complex Query Support
>
> MC; asking the obvious here but does [1] work via the web interface? As
Cole
> pointed out, this is mostly to do with the instance.
>
> I tried the following on landfill,
>
> $ bugzilla query
> --from-url="
https://landfill.bugzilla.org/bugzilla-4.4-branch/buglist.cgi?f1=bug_id&a...
"
> Server error: <Fault 108: "Can't use cf_free_text as a field
name.">
>
> $ bugzilla query
> --from-url="
https://landfill.bugzilla.org/bugzilla-4.4-branch/buglist.cgi?f1=bug_id&a...
"
> --snip results--
>
> So stock bugzilla should work file with that query (the custom field
issue
> seems to be independent), so I suspect your instance will need to be
looked
> at.
>
> That being said, you could try using a saved search by passing in the
> savedsearch or savedsearch_sharer_id parameter when building the query
as a
> workaround.
>
> hth
>
> -arun
>
> [1]
>
https://bugzilla.local/query.cgi?bug_status=New&bug_status=Accepted&a...
> ^%24&v2=410000&v3=-
>
> ----- Original Message -----
> > From: "Mildred Clarke" <gargoyle.python(a)gmail.com>
> > To: "Cole Robinson" <crobinso(a)redhat.com>
> > Cc: python-bugzilla(a)lists.fedorahosted.org
> > Sent: Thursday, November 13, 2014 3:37:08 AM
> > Subject: Re: [python-bugzilla] Fwd: Complex Query Support
> >
> > 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.
> >
> > Can anyone think of a better option / workaround to obtain an "advanced
> > query" result set ?
> >
> > Thanks
> >
> > MC
> >
> > On Wed, Nov 12, 2014 at 8:18 AM, Cole Robinson <crobinso(a)redhat.com>
wrote:
> >
> > > On 11/12/2014 11:12 AM, Mildred Clarke wrote:
> > >
> > >> 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.
> > >>
> > >
> > > The query_format=advanced support is a
bugzilla.redhat.com 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.
> > >
> > > - Cole
> > >
> > >
> >
> > _______________________________________________
> > python-bugzilla mailing list
> > python-bugzilla(a)lists.fedorahosted.org
> >
https://lists.fedorahosted.org/mailman/listinfo/python-bugzilla
> >