Merge lp:~stevenk/launchpad/bugzilla-greater-than-36 into lp:launchpad

Proposed by Steve Kowalik on 2012-11-19
Status: Merged
Approved by: William Grant on 2012-11-19
Approved revision: no longer in the source branch.
Merged at revision: 16287
Proposed branch: lp:~stevenk/launchpad/bugzilla-greater-than-36
Merge into: lp:launchpad
Diff against target: 27 lines (+7/-4)
1 file modified
lib/lp/bugs/externalbugtracker/bugzilla.py (+7/-4)
To merge this branch: bzr merge lp:~stevenk/launchpad/bugzilla-greater-than-36
Reviewer Review Type Date Requested Status
William Grant code 2012-11-19 Approve on 2012-11-19
Review via email: mp+134825@code.launchpad.net

Commit Message

Use bugidtype=include in the form data if talking to a bugzilla instance with a version greater than or equal to 3.6.0, else continue using bug_id_type=include.

Description of the Change

If we're chatting to a Bugzilla instance that is version 3.6.0 or higher, send "bugidtype=include", else send "bug_id_type=include". In my testing, this allows us to pull bugs from bugzilla.libav.org, and still able to pull from Abisource's bugzilla.

To post a comment you must log in.
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/externalbugtracker/bugzilla.py'
2--- lib/lp/bugs/externalbugtracker/bugzilla.py 2012-07-02 15:40:45 +0000
3+++ lib/lp/bugs/externalbugtracker/bugzilla.py 2012-11-19 04:56:20 +0000
4@@ -381,16 +381,19 @@
5 buglist_page = 'buglist.cgi'
6 data = {
7 'form_name': 'buglist.cgi',
8- 'bug_id_type': 'include',
9 'columnlist':
10 ('id,product,bug_status,resolution,'
11 'priority,bug_severity'),
12 'bug_id': ','.join(bug_ids),
13 }
14 if self.version < (2, 17, 1):
15- data.update({'format': 'rdf'})
16- else:
17- data.update({'ctype': 'rdf'})
18+ data['format'] = 'rdf'
19+ else:
20+ data['ctype'] = 'rdf'
21+ if self.version >= (3, 6, 0):
22+ data['bugidtype'] = 'include'
23+ else:
24+ data['bug_id_type'] = 'include'
25 bug_tag = 'bz:bug'
26 id_tag = 'bz:id'
27 status_tag = 'bz:bug_status'