Merge lp:~stevenk/launchpad/obliterate-milestone_assignment into lp:launchpad

Proposed by Steve Kowalik on 2012-10-05
Status: Merged
Merged at revision: 16098
Proposed branch: lp:~stevenk/launchpad/obliterate-milestone_assignment
Merge into: lp:launchpad
Diff against target: 131 lines (+15/-44)
4 files modified
lib/lp/bugs/interfaces/bugtarget.py (+5/-10)
lib/lp/bugs/interfaces/bugtasksearch.py (+5/-7)
lib/lp/bugs/model/bugtarget.py (+5/-7)
lib/lp/bugs/stories/bugattachments/xx-bugattachments.txt (+0/-20)
To merge this branch: bzr merge lp:~stevenk/launchpad/obliterate-milestone_assignment
Reviewer Review Type Date Requested Status
Ian Booth (community) 2012-10-05 Approve on 2012-10-05
Review via email: mp+128158@code.launchpad.net

Description of the Change

No longer export milestone_assignment for IBugTarget.searchTasks(). This intentionally breaks the 1.0 API, but anyone using it will only gets OOPSes and not results. It is also not tested, the only test that mentions it has been disabled since 2005.

Based on the digging that William did, this was used for the bulk edit of bugtasks which used the same schema as searchTasks -- which was removed in 2006.

So, death to milestone_assignment and good riddance.

To post a comment you must log in.
Ian Booth (wallyworld) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/interfaces/bugtarget.py'
2--- lib/lp/bugs/interfaces/bugtarget.py 2012-09-21 00:28:49 +0000
3+++ lib/lp/bugs/interfaces/bugtarget.py 2012-10-05 04:02:20 +0000
4@@ -1,13 +1,10 @@
5 # Copyright 2010-2012 Canonical Ltd. This software is licensed under the
6 # GNU Affero General Public License version 3 (see the file LICENSE).
7
8-# pylint: disable-msg=E0211,E0213
9-
10 """Interfaces related to bugs."""
11
12 __metaclass__ = type
13
14-
15 __all__ = [
16 'BugDistroSeriesTargetDetails',
17 'IBugTarget',
18@@ -93,8 +90,6 @@
19 "tags_combinator": copy_field(IBugTaskSearch['tags_combinator']),
20 "omit_duplicates": copy_field(IBugTaskSearch['omit_dupes']),
21 "status_upstream": copy_field(IBugTaskSearch['status_upstream']),
22- "milestone_assignment": copy_field(
23- IBugTaskSearch['milestone_assignment']),
24 "milestone": copy_field(IBugTaskSearch['milestone']),
25 "component": copy_field(IBugTaskSearch['component']),
26 "nominated_for": Reference(schema=Interface),
27@@ -251,11 +246,11 @@
28 distribution=None, tags=None,
29 tags_combinator=BugTagsSearchCombinator.ALL,
30 omit_duplicates=True, omit_targeted=None,
31- status_upstream=None, milestone_assignment=None,
32- milestone=None, component=None, nominated_for=None,
33- sourcepackagename=None, has_no_package=None,
34- hardware_bus=None, hardware_vendor_id=None,
35- hardware_product_id=None, hardware_driver_name=None,
36+ status_upstream=None, milestone=None, component=None,
37+ nominated_for=None, sourcepackagename=None,
38+ has_no_package=None, hardware_bus=None,
39+ hardware_vendor_id=None, hardware_product_id=None,
40+ hardware_driver_name=None,
41 hardware_driver_package_name=None,
42 hardware_owner_is_bug_reporter=None,
43 hardware_owner_is_affected_by_bug=False,
44
45=== modified file 'lib/lp/bugs/interfaces/bugtasksearch.py'
46--- lib/lp/bugs/interfaces/bugtasksearch.py 2012-09-24 05:17:00 +0000
47+++ lib/lp/bugs/interfaces/bugtasksearch.py 2012-10-05 04:02:20 +0000
48@@ -370,11 +370,11 @@
49 distribution=None, tags=None,
50 tags_combinator=BugTagsSearchCombinator.ALL,
51 omit_duplicates=True, omit_targeted=None,
52- status_upstream=None, milestone_assignment=None,
53- milestone=None, component=None, nominated_for=None,
54- sourcepackagename=None, has_no_package=None,
55- hardware_bus=None, hardware_vendor_id=None,
56- hardware_product_id=None, hardware_driver_name=None,
57+ status_upstream=None, milestone=None, component=None,
58+ nominated_for=None, sourcepackagename=None,
59+ has_no_package=None, hardware_bus=None,
60+ hardware_vendor_id=None, hardware_product_id=None,
61+ hardware_driver_name=None,
62 hardware_driver_package_name=None,
63 hardware_owner_is_bug_reporter=None,
64 hardware_owner_is_affected_by_bug=False,
65@@ -547,8 +547,6 @@
66 has_no_package = Bool(
67 title=_('Exclude bugs with packages specified'),
68 required=False, default=False)
69- milestone_assignment = Choice(
70- title=_('Target'), vocabulary="Milestone", required=False)
71 milestone = List(
72 title=_('Milestone'),
73 description=_('Show only bug tasks targeted to this milestone.'),
74
75=== modified file 'lib/lp/bugs/model/bugtarget.py'
76--- lib/lp/bugs/model/bugtarget.py 2012-10-03 07:25:02 +0000
77+++ lib/lp/bugs/model/bugtarget.py 2012-10-05 04:02:20 +0000
78@@ -1,8 +1,6 @@
79 # Copyright 2010-2012 Canonical Ltd. This software is licensed under the
80 # GNU Affero General Public License version 3 (see the file LICENSE).
81
82-# pylint: disable-msg=E0611,W0212
83-
84 """Components related to IBugTarget."""
85
86 __metaclass__ = type
87@@ -54,11 +52,11 @@
88 has_patch=None, has_cve=None, distribution=None,
89 tags=None, tags_combinator=BugTagsSearchCombinator.ALL,
90 omit_duplicates=True, omit_targeted=None,
91- status_upstream=None, milestone_assignment=None,
92- milestone=None, component=None, nominated_for=None,
93- sourcepackagename=None, has_no_package=None,
94- hardware_bus=None, hardware_vendor_id=None,
95- hardware_product_id=None, hardware_driver_name=None,
96+ status_upstream=None, milestone=None, component=None,
97+ nominated_for=None, sourcepackagename=None,
98+ has_no_package=None, hardware_bus=None,
99+ hardware_vendor_id=None, hardware_product_id=None,
100+ hardware_driver_name=None,
101 hardware_driver_package_name=None,
102 hardware_owner_is_bug_reporter=None,
103 hardware_owner_is_affected_by_bug=False,
104
105=== modified file 'lib/lp/bugs/stories/bugattachments/xx-bugattachments.txt'
106--- lib/lp/bugs/stories/bugattachments/xx-bugattachments.txt 2011-12-03 15:30:19 +0000
107+++ lib/lp/bugs/stories/bugattachments/xx-bugattachments.txt 2012-10-05 04:02:20 +0000
108@@ -412,23 +412,3 @@
109 ...of
110 ...2 results...
111 ...4...
112-
113-Let's search for patches and unspecified attachments for firefox bugs.
114-
115-
116-# XXX Bjorn Tillenius 2005-08-01:
117-# This test is disabled in wait for SQLObject being fixed to accept
118-# both distinct=True and an orderBy argument.
119-
120- XXX print http(r"""
121- ... GET /bugs/firefox?field.searchtext=&advanced=%5Bu%27Advanced%27%2C+u%27%27%5D&field.milestone_assignment=&field.milestone_assignment-empty-marker=1&field.status%3Alist=New&field.status%3Alist=Confirmed&field.status-empty-marker=1&field.importance-empty-marker=1&field.has_patch=on&field.attachmenttype-empty-marker=1&field.assignee=&field.unassigned.used=&field.milestone-empty-marker=1&search=Search HTTP/1.1
122- ... """)
123- HTTP/1.1 200 Ok
124- ...
125- ...<a...>...4...</a>...
126- ...
127- ...<a...>...1...</a>...
128- ...
129- ...2 results...
130- ...
131-