Bug 997002

Summary: long_desc not included in query
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: python-bugzillaAssignee: Will Woods <wwoods>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bugs.michael, crobinso, dzickus, jskarvad, stephent98, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-bugzilla-1.0.0-2.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-09 00:56:07 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 Steve Tyler 2013-08-14 13:09:10 UTC
Description of problem:

The long_desc is not included in the query. Both of these querys return 697 bugs, but the first query should return no bugs:

$ bugzilla query -c anaconda -t NEW,ASSIGNED --long_desc="no such string $(uuidgen)" | wc -l
697

$ bugzilla query -c anaconda -t NEW,ASSIGNED | wc -l
697

Version-Release number of selected component (if applicable):
python-bugzilla-0.9.0-1.fc19.noarch

How reproducible:
Always.

Steps to Reproduce:
1. $ bugzilla query -c anaconda -t NEW,ASSIGNED --long_desc="no such string $(uuidgen)" | wc -l

2. $ bugzilla query -c anaconda -t NEW,ASSIGNED | wc -l

Actual results:
Both querys return 697 bugs.

Expected results:
The first query should return no bugs.

Additional info:

The "--debug" option shows that long_desc is not part of the query:

$ bugzilla --debug query -c anaconda -t NEW,ASSIGNED --long_desc="no such string $(uuidgen)" 2>&1 | less
...
[05:58:59] DEBUG (base:924) Calling query with: {'bug_status': ['NEW', 'ASSIGNED'], 'component': ['anaconda'], 'include_fields': ['assigned_to', 'id', 'status', 'summary']}
...

Comment 1 Cole Robinson 2013-08-15 15:07:59 UTC
Thanks for the report, fixed upstream:

https://git.fedorahosted.org/cgit/python-bugzilla.git/commit/?id=905f43840a39e9891ce077abbac91e293e5eec21

Comment 2 Steve Tyler 2013-08-15 16:01:28 UTC
Thanks. I'm trying to test it, but I get the following error. Do I need to configure anything else?

$ PYTHONPATH=$(pwd)/bugzilla ./bin/bugzilla query -c anaconda -t NEW,ASSIGNED --long_desc="no such string $(uuidgen)"

Server error: <Fault 53: 'long_desc is not a valid parameter for the Bugzilla::Bug::match function.'>

The directory contains bin/ and bugzilla/ as extracted from the tar file.

python-bugzilla-905f43840a39e9891ce077abbac91e293e5eec21.tar.bz2
downloaded from:
https://git.fedorahosted.org/cgit/python-bugzilla.git/commit/?id=905f43840a39e9891ce077abbac91e293e5eec21

Comment 3 Steve Tyler 2013-08-15 16:08:01 UTC
Pylint reports several errors. This one is a definite positive:
E:691,56:_convert_to_outputformat: Undefined variable 'opt'

$ pylint -E bugzilla 
No config file found, using default configuration
************* Module bugzilla
E: 84,47:setup_parser: Module 'bugzilla' has no '__version__' member
E: 93,50:setup_parser: Module 'bugzilla' has no 'classlist' member
E:436,16:generate_man_page: Module 'bugzilla' has no '__version__' member
E:691,56:_convert_to_outputformat: Undefined variable 'opt'
E:1025,18:main: Module 'bugzilla' has no 'Bugzilla' member
E:1026,30:main: Module 'bugzilla' has no 'classlist' member
E:1030,55:main: Module 'bugzilla' has no 'classlist' member

Comment 4 Steve Tyler 2013-08-15 16:18:52 UTC
(In reply to Steve Tyler from comment #3)
> Pylint reports several errors. This one is a definite positive:
> E:691,56:_convert_to_outputformat: Undefined variable 'opt'
...

Bug 997575 - [pylint] E:685,56:_convert_to_outputformat: Undefined variable 'opt'

Comment 5 Cole Robinson 2013-08-15 16:29:34 UTC
Running from git is a bit annoying, you have to do

PYTHONPATH=. bin/bugzilla ...

Comment 6 Steve Tyler 2013-08-15 17:41:20 UTC
Thanks. That works as expected:

$ PYTHONPATH=. ./bin/bugzilla query -c anaconda -t NEW,ASSIGNED --long_desc="no such string $(uuidgen)" | wc -l
0
$ PYTHONPATH=. ./bin/bugzilla query -c anaconda -t NEW,ASSIGNED | wc -l
698

$ PYTHONPATH=. ./bin/bugzilla --debug query -c anaconda -t NEW,ASSIGNED --long_desc="no such string $(uuidgen)"
...
[10:37:17] DEBUG (base:982) Calling Bug.search with: {'longdesc_type': 'allwordssubstr', 'query_format': 'advanced', 'bug_status': ['NEW', 'ASSIGNED'], 'component': ['anaconda'], 'longdesc': 'no such string 146ea272-2071-4f1b-bac9-c9fc7a2c2486', 'include_fields': ['assigned_to', 'id', 'status', 'summary']}
...

It's "long_desc" on the command-line and "longdesc" in the query? Ugh!

Comment 7 Fedora Update System 2014-03-25 22:44:26 UTC
python-bugzilla-1.0.0-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-bugzilla-1.0.0-1.fc19

Comment 8 Fedora Update System 2014-03-27 04:47:23 UTC
Package python-bugzilla-1.0.0-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-bugzilla-1.0.0-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4391/python-bugzilla-1.0.0-1.fc19
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-03-27 17:13:46 UTC
python-bugzilla-1.0.0-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-bugzilla-1.0.0-2.fc19

Comment 10 Fedora Update System 2014-04-09 00:56:07 UTC
python-bugzilla-1.0.0-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.