Bug 1052977

Summary: getbug() fails to find bug by CVE number
Product: [Fedora] Fedora Reporter: Ondřej Pták <optak>
Component: python-bugzillaAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: aigao, asaha, bugs.michael, crobinso, dcallagh, dzickus, jskarvad, mmcallis, ncoghlan, qwan, rmancy, tools-bugs, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: BeakerWizard
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:16 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 Ondřej Pták 2014-01-14 14:32:30 UTC
Description of problem:

Beaker-wizard is unable to search bug by CVE number

How reproducible:
always


Steps to Reproduce:

1)
$beaker-wizard -b CVE-2012-1150
    Contacting bugzilla...
    Fetching details for CVE-2012-1150
    Sorry, could not get details for CVE-2012-1150
    invalid literal for int() with base 10: 'CVE-2012-1150'
    ...
2) (I'm not sure this is the same problem)
create test case in beaker-wizard with CVE number in field: "Bug or CVE numbers" and commit to tcms (tcms-submit --link=all --coverage): test case is not linked to bug

Comment 2 Nick Coghlan 2014-01-15 01:22:14 UTC
I can reproduce this, but it looks like it might be a regression in python-bugzilla rather than in beaker-wizard - we never call int on the bug ID, we just pass it through to getbug().

That used to accept bug aliases, but is now trying to coerce all the bug IDs to integers:

    idlist = [int(i) for i in idlist]

(from the _getbugs impl in https://git.fedorahosted.org/cgit/python-bugzilla.git/tree/bugzilla/base.py#n780)

Comment 3 Cole Robinson 2014-01-16 17:25:20 UTC
Thanks for the report, fixed upstream now:

commit 017e879f35423ed6399f4472b5bf570db6bc86fe
Author: Cole Robinson <crobinso>
Date:   Thu Jan 16 12:24:23 2014 -0500

    base: Fix getbug() alias regression (bz 1052977)

Comment 4 Petr Šplíchal 2014-01-17 15:25:23 UTC
Thanks for the quick fix, Cole!

Comment 5 Fedora Update System 2014-03-25 22:44:35 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 6 Fedora Update System 2014-03-27 04:47:33 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 7 Fedora Update System 2014-03-27 17:13:55 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 8 Fedora Update System 2014-04-09 00:56:16 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.