Bug 621328 - Bug.search() missing?
Summary: Bug.search() missing?
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 3.6
Hardware: All
OS: Linux
medium vote
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2010-08-04 18:58 UTC by Will Woods
Modified: 2013-06-24 01:46 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2010-08-05 21:01:32 UTC

Attachments (Terms of Use)

Description Will Woods 2010-08-04 18:58:22 UTC
The API docs on partner-bugzilla mention Bug.search, and Bug.search is what python-bugzilla is using for queries - but attempting python-bugzilla queries against partner-bugzilla throws a Fault:

[wwoods@metroid ~]$ bugzilla --bugzilla https://partner-bugzilla.redhat.com/xmlrpc.cgi query --bug_id 1 

Server error: <Fault -32601: "The requested method 'Bug.search' was not found.">

Expected output is more like:
[wwoods@metroid ~]$ bugzilla --bugzilla https://bugzilla.redhat.com/xmlrpc.cgi query --bug_id 1 
#1   CLOSED - Red Hat Bugzilla Maintenance - test bug

Comment 1 David Lawrence 2010-08-05 19:04:01 UTC
I am not able to get this to fail with my perl test script (attaching).

[dkl@localhost xmlrpc]$ perl bugSearch_xmlrpc.pl dkl@redhat.com eepx3qzt 1
Successfully logged in.
$VAR1 = {
          'sql' => 'SELECT bugs.bug_id AS bug_id, map_products.name AS product, bugs.bug_severity AS bug_severity, bugs.priority AS priority, bugs.op_sys AS op_sys, map_assigned_to.login_name AS assigned_to, bugs.bug_status AS bug_status, bugs.resolution AS resolution, bugs.short_desc AS short_desc FROM bugs  INNER JOIN profiles AS map_assigned_to ON (bugs.assigned_to = map_assigned_to.userid) INNER JOIN products AS map_products ON (bugs.product_id = map_products.id) LEFT JOIN bug_status ON (bug_status.value = bugs.bug_status) LEFT JOIN priority ON (priority.value = bugs.priority) LEFT JOIN bug_group_map  ON bug_group_map.bug_id = bugs.bug_id  LEFT JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = 6 WHERE (( bugs.bug_id IN (\'1\') )) AND bugs.creation_ts IS NOT NULL AND ((bug_group_map.group_id IS NULL) OR (bug_group_map.group_id IN (-1))  OR (bugs.reporter_accessible = 1 AND bugs.reporter = 6) OR (bugs.cclist_accessible = 1 AND cc.who IS NOT NULL) OR (bugs.assigned_to = 6) OR (bugs.qa_contact = 6) ) GROUP BY bugs.bug_id ORDER BY bug_status.sortkey,bug_status.value,priority.sortkey,priority.value,assigned_to,bug_id',
          'displaycolumns' => [
          'bugs' => [
                      'priority' => 'low',
                      'bug_status' => 'CLOSED',
                      'bug_id' => '1',
                      'assigned_to' => 'bugzilla-maint@redhat.com',
                      'resolution' => 'NOTABUG',
                      'short_desc' => 'test bug',
                      'product' => 'Red Hat Enterprise Linux 5',
                      'bug_severity' => 'low',
                      'op_sys' => 'Linux'

Would it be possible to see the code segment from python-bugzilla which is making the actual call?


Comment 2 Will Woods 2010-08-05 21:01:32 UTC
It seems to be working fine now - may have just been a transient problem, I suppose?

Here's a simple test case:

import bugzilla
bz = bugzilla.Bugzilla(url='https://partner-bugzilla.redhat.com/xmlrpc.cgi')
b = bz.getbug(1)
print b
q = {'product':'Bugzilla',
bugs = bz.query(q)
for b in bugs:
    print b

Works for both partner-bugzilla and regular bugzilla, at least in my testing. I'm going to go ahead and close this.

tibbs, if you can reproduce the problem, feel free to reopen - with some test code, so we can investigate further.

Comment 3 Jason Tibbitts 2010-08-11 15:43:30 UTC
Well, my stuff still fails but now it fails differently (with an ExpatError about a mismatched tag), so I suppose that's a different bug.

Comment 4 David Lawrence 2010-08-11 15:54:18 UTC
partner-bugzilla.redhat.com is undergoing a database refresh right now so it may be related to that. Please try your testing again later today. 


Comment 5 Jason Tibbitts 2010-08-11 18:56:02 UTC
Now that partner-bugzilla's back again, I've tested my tools with both python-bugzilla 0.5.1 and 0.6.1 and all seems to be well.

Comment 6 David Lawrence 2010-08-11 19:17:33 UTC
(In reply to comment #5)
> Now that partner-bugzilla's back again, I've tested my tools with both
> python-bugzilla 0.5.1 and 0.6.1 and all seems to be well.    

That is good news. Thanks for testing!


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