Bug 855531 - __open__ shortcut no longer working
__open__ shortcut no longer working
Status: CLOSED NOTABUG
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
devel
Unspecified Unspecified
high Severity unspecified (vote)
: ---
: ---
Assigned To: Simon Green
tools-bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-08 12:45 EDT by Andrew Hecox
Modified: 2014-10-12 18:49 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-24 19:14:36 EST
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 Andrew Hecox 2012-09-08 12:45:19 EDT
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 13:37:32 EST
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 15:44:04 EST
(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-24 19:14:36 EST
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.

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