Bug 986389 - python-bugzilla url_to_query aborts on url containing 'cmdtype=...' - Server error: <Fault 53: 'cmdtype is not a valid parameter for the Bugzilla::Bug::match function.'>
python-bugzilla url_to_query aborts on url containing 'cmdtype=...' - Server ...
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: python-bugzilla (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-19 12:14 EDT by Frantisek Reznicek
Modified: 2015-11-15 20:14 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-25 09:53:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frantisek Reznicek 2013-07-19 12:14:38 EDT
Description of problem:

python-bugzilla has feature to select bugs using web bugzilla URL.
This feature does not work (aborts) when URL contains cmdtype=

# bugzilla query  --from-url='https://bugzilla.redhat.com/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=mrgm-3.0.0-all&sharer_id=211011'

Server error: <Fault 53: 'cmdtype is not a valid parameter for the Bugzilla::Bug::match function.'>


Version-Release number of selected component (if applicable):
both python-bugzilla-0.9.0-1.el6.noarch and python-bugzilla-0.8.0-2.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. bugzilla query  --from-url='https://bugzilla.redhat.com/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=mrgm-3.0.0-all&sharer_id=211011'

Actual results:
URL to query useless for some queries.

Expected results:
URL to query should be functional.

Additional info:

Traceback from bzps.py tool:
python ./bzps.py --mode-alllists --bz-query-csv-summary-ena --bz-query-csv-save_fn=result.csv --bz-query-url 'https://bugzilla.redhat.com/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=mrgm-3.0.0-all&sharer_id=211011'
INFO:bugzilla:Connecting to https://bugzilla.redhat.com/xmlrpc.cgi
INFO:bugzilla:Bugzilla v0.9.0 initializing
INFO:bugzilla:Using RHBugzilla for URL containing bugzilla.redhat.com
INFO:bugzilla:Chose subclass RHBugzilla v0.1
INFO:bugzilla:Bugzilla query in progress.
Traceback (most recent call last):
  File "./bzps.py", line 1295, in <module>
    main(int_opts);
  File "./bzps.py", line 671, in main
    bzquery_out = bz.query(bzquery_in);
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 925, in query
    r = self._query(query)
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 915, in _query
    return self._proxy.Bug.search(query)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 166, in request
    return self.parse_response(stringio)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1361, in parse_response
    return self._parse_response(file, None)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 53: 'cmdtype is not a valid parameter for the Bugzilla::Bug::match function.'>
Comment 1 Cole Robinson 2013-07-23 15:04:55 EDT
How did you generate that search URL in the bugzilla web UI?
Comment 2 Frantisek Reznicek 2013-07-25 08:19:14 EDT
(In reply to Cole Robinson from comment #1)
> How did you generate that search URL in the bugzilla web UI?

Very good question, I took it from MRG meeting minutes, so I do not know how it was generated.
Comment 3 Frantisek Reznicek 2013-07-25 08:21:27 EDT
The obvious workaround is to use the URL, go 'edit search' change nothing and return to that bug-list with much longer BZ URL query which is functional as far as I checked.
Comment 4 Frantisek Reznicek 2013-07-25 08:24:25 EDT
(In reply to Cole Robinson from comment #1)
> How did you generate that search URL in the bugzilla web UI?

Actually I figured it out, using Bugzilla Web UI clicking on 'Remember Search' + providing custom bug-list name
Comment 5 Cole Robinson 2013-07-25 09:53:02 EDT
Thanks for the info Frantisek. Looking at the docs, seems like the bugzilla xmlrpc interface does not provide a way to access saved searches. So the only way around this is to resolve the saved search with a browser like you mentioned, then copy that full URL to the command line.

Note You need to log in before you can comment on or make changes to this bug.