Bug 826726 - Can't search flagtypes.name from xmlrpc
Can't search flagtypes.name from xmlrpc
Status: CLOSED WORKSFORME
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
4.2
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: Simon Green
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-30 16:37 EDT by Cole Robinson
Modified: 2014-10-12 18:48 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-30 18:38:20 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 Cole Robinson 2012-05-30 16:37:51 EDT
I'm trying this query over xmlrpc:

{'f1': 'flagtypes.name', 'product': ['Red Hat Enterprise Linux 6'], 'query_format': 'advanced', 'component': ['python-virtinst'], 'v1': 'devel_ack+', 'o1': 'anywords'}

But it doesn't return anything. The same query works in the web interface.

Additionally, this query throws an error:

{'f1': 'cf_qa_whiteboard', 'product': ['Red Hat Enterprise Linux 6'], 'query_format': 'advanced', 'component': ['python-virtinst'], 'v1': 'Domain', 'o1': 'anywords'}

Server error: <Fault 108: "Can't use cf_qa_whiteboard as a field name.">

Similar error if just trying qa_whiteboard.

Dropping the field bits from that query, so it is just product + component + query_format works fine, so it's not those pieces presumably.
Comment 1 Simon Green 2012-05-30 18:38:20 EDT
(In reply to comment #0)
> I'm trying this query over xmlrpc:
> 
> {'f1': 'flagtypes.name', 'product': ['Red Hat Enterprise Linux 6'],
> 'query_format': 'advanced', 'component': ['python-virtinst'], 'v1':
> 'devel_ack+', 'o1': 'anywords'}
> 
> But it doesn't return anything. The same query works in the web interface.

Assuming you are using Bug.search, you need to add 'query_format': 'advanced' in the data you send. This is documented at

https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Bug.html#search

> Additionally, this query throws an error:
> 
> Server error: <Fault 108: "Can't use cf_qa_whiteboard as a field name.">
> 
> Similar error if just trying qa_whiteboard.
> 
> Dropping the field bits from that query, so it is just product + component +
> query_format works fine, so it's not those pieces presumably.

The correct field name is cf_qa_whiteboard. I would suspect you are not logged in, and therefore are unable to see that field.

If you need help with any of the above issues, please reopen the bug, and I'll take a look.

  -- simon
Comment 2 Cole Robinson 2012-05-31 09:57:01 EDT
Unless you mean something different, query_format=advanced is in both queries I pasted above. And yeah I'm using Bug.search

You were right about the whiteboard thing though, I wasnt logged in. And now that I try the first query again, being logged in seems to have fixed things.

Just curious, is there an internal mailing list for bugzilla? And/or an internal git repo of our current deployed bugzilla? I'm working on python-bugzilla and I'm interested in how our deployment differs from stock bugzilla that presumably most other people use.
Comment 3 Cole Robinson 2012-05-31 09:57:37 EDT
I should note the flags query doesn't require being logged in, since I just tried it on some fedora-review bugs while not logged in and it succeeded.

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