Bug 823609 - bug.search changed its parms
Summary: bug.search changed its parms
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 4.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Simon Green
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-21 16:18 UTC by Don Zickus
Modified: 2014-10-12 22:48 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-23 13:10:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Don Zickus 2012-05-21 16:18:51 UTC
Description of problem:
When using my script through python-bugzilla to search for bugs either assigned_to or cc'd to my email address, I used to use the following in my query

email1 = dzickus
emailtype = substring
emailassign_to1 = 1
emailcc1 = 1

However, those fields do not seem to be supported in the bug.search webservice API in 4.2 now.  I get the following error:

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

The following xmlrpc python dump (again sorry for the ugliness) shows how I used it:

send: "POST /xmlrpc.cgi HTTP/1.1\r\nHost:
bugzilla.redhat.com\r\nAccept-Encoding: gzip\r\nCookie:
Bugzilla_logincookie=Ld64culKqF; Bugzilla_login=191026\r\nUser-Agent:
Python-urllib2/2.7 bugzilla.py/0.6.1\r\nContent-Type:
text/xml\r\nContent-Length: 1142\r\n\r\n<?xml
version='1.0'?>\n<methodCall>\n<methodName>Bug.search</methodName>\n<params>\n<param>\n<value><struct>\n<member>\n<name>product</name>\n<value><array><data>\n<value><string>Red Hat Enterprise Linux6</string></value>\n</data></array></value>\n</member>\n<member>\n<name>bug_status</name>\n<value><string>NEW,ASSIGNED</string></value>\n</member>\n<member>\n<name>emailassigned_to1</name>\n<value><int>1</int></value>\n</member>\n<member>\n<name>include_fields</name>\n<value><array><data>\n<value><string>id</string></value>\n<value><string>bug_status</string></value>\n<value><string>assigned_to</string></value>\n<value><string>component</string></value>\n<value><string>product</string></value>\n<value><string>cc</string></value>\n<value><string>target_milestone</string></value>\n<value><string>short_desc</string></value>\n<value><string>flags</string></value>\n<value><string>keywords</string></value>\n</data></array></value>\n</member>\n<member>\n<name>emailtype1</name>\n<value><string>substring</string></value>\n</member>\n<member>\n<name>email1</name>\n<value><string>dzickus</string></value>\n</member>\n</struct></value>\n</param>\n</params>\n</methodCall>\n"


I know email.. is not a documented API param.  I grabbed it from the web interface when I ran the same search.  It worked great for bugzilla 3.X.  If it doesn't work for bugzilla 4.X, I would like to know what to replace it with.

The 4.X API shows search supports 'assigned_to', which solves half of my problem.  But I also would like to filter on bugs I am 'cc' on.

Version-Release number of selected component (if applicable):
4.2

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Simon Green 2012-05-23 13:10:44 UTC
As per https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#search

Red Hat Extension

    Red Hat have extended the functionality of the search call. Specifying one of the following values overrides all of the above.

...
    query_format

        string Should be 'simple' or 'advanced'. If specified, any additional values are the same as values used from the Web UI version of these searches. This allows you to perform much more complex searches than the upstream options.

You want to add query_format => 'advanced' to your query

Comment 2 Don Zickus 2012-05-23 15:07:41 UTC
Hi Simon,

Yes 'advanced' worked for me.  Thanks for the help!

Cheers,
Don


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