Bug 621601 - bugzilla incorrectly handling boolean query options (patch attached)
bugzilla incorrectly handling boolean query options (patch attached)
Product: Fedora
Classification: Fedora
Component: python-bugzilla (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-08-05 11:36 EDT by James Laska
Modified: 2013-09-02 02:50 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-06-28 10:56:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
0001-Bug-621601-correct-boolean-option-handling.patch (2.01 KB, patch)
2010-08-05 11:37 EDT, James Laska
no flags Details | Diff

  None (edit)
Description James Laska 2010-08-05 11:36:32 EDT
Some 'bugzilla' command-line options aren't properly parsing options.  For example...

  $ bugzilla query --blocked=611990

Ends up calling "611990".split() (bin/bugzilla line#442) which results in a bugzilla query for bugs blocking '6' or '1' or '1' or '9' or '9' or '0'.  For example, see the debug output below.

DEBUG:bugzilla:bz.query: {'type4-0-0': 'substring', 'value2-0-0': '1', 'value0-0-0': '6', 'value4-0-0': '9', 'type0-0-0': 'substring', 'type2-0-0': 'substring', 'field3-0-0': 'blocked', 'field1-0-0': 'blocked', 'value3-0-0': '9', 'value1-0-0': '1', 'field5-0-0': 'blocked', 'value5-0-0': '0', 'type5-0-0': 'substring', 'type1-0-0': 'substring', 'type3-0-0': 'substring', 'field2-0-0': 'blocked', 'field4-0-0': 'blocked', 'field0-0-0': 'blocked'}

The attached patch resolves the issue by changing the OptionParser action for the boolean search filters to "append".  Using the patch results in the following query:

DEBUG:bugzilla:bz.query: {'value0-0-0': '611990', 'field0-0-0': 'blocked', 'type0-0-0': 'substring'}
Comment 1 James Laska 2010-08-05 11:37:22 EDT
Created attachment 436886 [details]
Comment 2 Will Woods 2010-08-05 17:15:13 EDT
dead on. Applied to git master, thanks.
Comment 3 Bug Zapper 2011-06-01 08:03:43 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 4 Bug Zapper 2011-06-28 10:56:35 EDT
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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