Bug 855531

Summary: __open__ shortcut no longer working
Product: [Community] Bugzilla Reporter: Andrew Hecox <ahecox>
Component: WebServiceAssignee: Simon Green <sgreen>
Status: CLOSED NOTABUG QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: high    
Version: develCC: crobinso, dcantrell, dzickus, ebaak, jskarvad, wwoods
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-25 00:14:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Hecox 2012-09-08 16:45:19 UTC
I'm not sure if this is API specific, haven't tested it through other interfaces, my apologies if I've mis-filed.

Going through python-bugzilla, the convention bz.query({'status':'__open__'}) used to work as a shorthand for all non-closed statuses. This appears to no longer work.

'status':['NEW','ASSIGNED','MODIFIED',...] does work, so it's possible do something equivalent, but the shorthand was nice to have.

Comment 1 Cole Robinson 2012-12-28 18:37:32 UTC
Hmm, I don't see any specific mentions of __open__ in the python-bugzilla code dating back to 0.6.0, so my guess is this was either something provided by older bugzilla instance, or it was a RH only extension that has been dropped.

Since this is the only complaint I've heard of that issue I'm guessing it hasn't had widespread impact, so not something we want to work around in python-bugzilla.

You might be able to get more info by filing a bug against the RH bugzilla instance, but the maintainers have been doing a thorough job of dropping non-essential RH extensions, this may have been part of the cull.

Comment 2 Andrew Hecox 2012-12-29 20:44:04 UTC
(In reply to comment #1)
...
> 
> You might be able to get more info by filing a bug against the RH bugzilla
> instance, but the maintainers have been doing a thorough job of dropping
> non-essential RH extensions, this may have been part of the cull.

indeed, I did, and they moved it over here ;)

Thanks Cole.

Comment 3 Simon Green 2013-01-25 00:14:36 UTC
Bug.search that was in Bugzilla 3.6 (which was a Red Hat customisation) was removed as part of the upgrade to Bugzilla 4.2. The Bug.search in Bugzilla 4.2 does not support the __<word>__ syntax for status.

A workaround is to use the query_format: advanced value to get what you want.

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

For example:
>>> bugs = proxy.Bug.search({'query_format': 'advanced', 'product': 'Bugzilla', 'bug_status': '__open__'});
>>> print bugs['bugs'].__len__()106

Marking as NOTABUG since it works as documented.