Merge lp:~wgrant/launchpad/bugsummary-v2-app-no-fixed-upstream into lp:launchpad
- bugsummary-v2-app-no-fixed-upstream
- Merge into devel
Proposed by
William Grant
Status: | Merged |
---|---|
Merged at revision: | 15277 |
Proposed branch: | lp:~wgrant/launchpad/bugsummary-v2-app-no-fixed-upstream |
Merge into: | lp:launchpad |
Diff against target: |
871 lines (+87/-500) 10 files modified
lib/lp/bugs/browser/bugtask.py (+5/-14) lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt (+0/-144) lib/lp/bugs/browser/tests/test_bugs_fixed_elsewhere.py (+0/-73) lib/lp/bugs/doc/bugsummary.txt (+69/-72) lib/lp/bugs/interfaces/bugsummary.py (+0/-1) lib/lp/bugs/model/bugsummary.py (+0/-1) lib/lp/bugs/model/tests/test_bugsummary.py (+0/-137) lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt (+12/-39) lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt (+1/-12) lib/lp/services/features/flags.py (+0/-7) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/bugsummary-v2-app-no-fixed-upstream |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Booth (community) | Approve | ||
Review via email:
|
Commit message
Completely drop the 'Bugs fixed elsewhere' count and remove BugSummary.
Description of the change
This branch continues bug #950502, completely removing the application side of the "Bugs fixed elsewhere" count that has been disabled on production for two months. BugSummary.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/bugs/browser/bugtask.py' | |||
2 | --- lib/lp/bugs/browser/bugtask.py 2012-05-01 07:24:59 +0000 | |||
3 | +++ lib/lp/bugs/browser/bugtask.py 2012-05-21 03:40:21 +0000 | |||
4 | @@ -1977,8 +1977,8 @@ | |||
5 | 1977 | # Circular fail. | 1977 | # Circular fail. |
6 | 1978 | from lp.bugs.model.bugsummary import BugSummary | 1978 | from lp.bugs.model.bugsummary import BugSummary |
7 | 1979 | bug_task_set = getUtility(IBugTaskSet) | 1979 | bug_task_set = getUtility(IBugTaskSet) |
10 | 1980 | groups = (BugSummary.status, BugSummary.importance, | 1980 | groups = ( |
11 | 1981 | BugSummary.has_patch, BugSummary.fixed_upstream) | 1981 | BugSummary.status, BugSummary.importance, BugSummary.has_patch) |
12 | 1982 | counts = bug_task_set.countBugs(self.user, [self.context], groups) | 1982 | counts = bug_task_set.countBugs(self.user, [self.context], groups) |
13 | 1983 | # Sum the split out aggregates. | 1983 | # Sum the split out aggregates. |
14 | 1984 | new = 0 | 1984 | new = 0 |
15 | @@ -1987,12 +1987,10 @@ | |||
16 | 1987 | critical = 0 | 1987 | critical = 0 |
17 | 1988 | high = 0 | 1988 | high = 0 |
18 | 1989 | with_patch = 0 | 1989 | with_patch = 0 |
19 | 1990 | resolved_upstream = 0 | ||
20 | 1991 | for metadata, count in counts.items(): | 1990 | for metadata, count in counts.items(): |
21 | 1992 | status = metadata[0] | 1991 | status = metadata[0] |
22 | 1993 | importance = metadata[1] | 1992 | importance = metadata[1] |
23 | 1994 | has_patch = metadata[2] | 1993 | has_patch = metadata[2] |
24 | 1995 | was_resolved_upstream = metadata[3] | ||
25 | 1996 | if status == BugTaskStatus.NEW: | 1994 | if status == BugTaskStatus.NEW: |
26 | 1997 | new += count | 1995 | new += count |
27 | 1998 | elif status == BugTaskStatus.INPROGRESS: | 1996 | elif status == BugTaskStatus.INPROGRESS: |
28 | @@ -2003,20 +2001,13 @@ | |||
29 | 2003 | high += count | 2001 | high += count |
30 | 2004 | if has_patch and DISPLAY_BUG_STATUS_FOR_PATCHES[status]: | 2002 | if has_patch and DISPLAY_BUG_STATUS_FOR_PATCHES[status]: |
31 | 2005 | with_patch += count | 2003 | with_patch += count |
32 | 2006 | if was_resolved_upstream: | ||
33 | 2007 | resolved_upstream += count | ||
34 | 2008 | open += count | 2004 | open += count |
38 | 2009 | result = dict(new=new, open=open, inprogress=inprogress, high=high, | 2005 | result = dict( |
39 | 2010 | critical=critical, with_patch=with_patch, | 2006 | new=new, open=open, inprogress=inprogress, high=high, |
40 | 2011 | resolved_upstream=resolved_upstream) | 2007 | critical=critical, with_patch=with_patch) |
41 | 2012 | return result | 2008 | return result |
42 | 2013 | 2009 | ||
43 | 2014 | @property | 2010 | @property |
44 | 2015 | def bugs_fixed_elsewhere_count(self): | ||
45 | 2016 | """A count of bugs fixed elsewhere.""" | ||
46 | 2017 | return self._bug_stats['resolved_upstream'] | ||
47 | 2018 | |||
48 | 2019 | @property | ||
49 | 2020 | def open_cve_bugs_count(self): | 2011 | def open_cve_bugs_count(self): |
50 | 2021 | """A count of open bugs linked to CVEs.""" | 2012 | """A count of open bugs linked to CVEs.""" |
51 | 2022 | params = get_default_search_params(self.user) | 2013 | params = get_default_search_params(self.user) |
52 | 2023 | 2014 | ||
53 | === removed file 'lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt' | |||
54 | --- lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt 2012-04-04 05:46:26 +0000 | |||
55 | +++ lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt 1970-01-01 00:00:00 +0000 | |||
56 | @@ -1,144 +0,0 @@ | |||
57 | 1 | Bugs Fixed Elsewhere | ||
58 | 2 | ==================== | ||
59 | 3 | |||
60 | 4 | The +bugtarget-portlet-bugfilters-info view for a distribution or | ||
61 | 5 | product contains a property for a URL to a list of bugs fixed | ||
62 | 6 | elsewhere. | ||
63 | 7 | |||
64 | 8 | >>> from zope.component import getMultiAdapter | ||
65 | 9 | >>> from lp.services.webapp.servers import LaunchpadTestRequest | ||
66 | 10 | |||
67 | 11 | >>> view = getMultiAdapter( | ||
68 | 12 | ... (bugtarget, LaunchpadTestRequest()), | ||
69 | 13 | ... name='+bugtarget-portlet-bugfilters-info') | ||
70 | 14 | >>> view.initialize() | ||
71 | 15 | |||
72 | 16 | >>> view.bugs_fixed_elsewhere_url | ||
73 | 17 | u'http://.../+bugs?field.status_upstream=resolved_upstream' | ||
74 | 18 | |||
75 | 19 | The +bugtarget-portlet-bugfilters-stats view for a distribution or | ||
76 | 20 | product contains the URL as above in addition to a count of how many | ||
77 | 21 | bugs that are fixed elsewhere. This count can take a while to | ||
78 | 22 | calculate, so it is put on this separate view which can be requested | ||
79 | 23 | asyncronously. | ||
80 | 24 | |||
81 | 25 | >>> def get_view(): | ||
82 | 26 | ... view = getMultiAdapter( | ||
83 | 27 | ... (bugtarget, LaunchpadTestRequest()), | ||
84 | 28 | ... name='+bugtarget-portlet-bugfilters-stats') | ||
85 | 29 | ... view.initialize() | ||
86 | 30 | ... return view | ||
87 | 31 | |||
88 | 32 | >>> view = get_view() | ||
89 | 33 | >>> view.bugs_fixed_elsewhere_url | ||
90 | 34 | u'http://.../+bugs?field.status_upstream=resolved_upstream' | ||
91 | 35 | >>> view.bugs_fixed_elsewhere_count | ||
92 | 36 | 0 | ||
93 | 37 | |||
94 | 38 | Simply opening a bug elsewhere won't increase the count. | ||
95 | 39 | |||
96 | 40 | >>> from lp.registry.interfaces.product import IProductSet | ||
97 | 41 | >>> evolution = getUtility(IProductSet).getByName('evolution') | ||
98 | 42 | >>> evolution != bugtarget | ||
99 | 43 | True | ||
100 | 44 | |||
101 | 45 | >>> bug = filebug(bugtarget, 'Example Bug') | ||
102 | 46 | |||
103 | 47 | >>> from lp.bugs.interfaces.bugtask import IBugTaskSet | ||
104 | 48 | >>> elsewhere = getUtility(IBugTaskSet).createTask( | ||
105 | 49 | ... bug, getUtility(ILaunchBag).user, evolution) | ||
106 | 50 | >>> get_view().bugs_fixed_elsewhere_count | ||
107 | 51 | 0 | ||
108 | 52 | |||
109 | 53 | But if we mark the bug as fixed in the other, the count will increase | ||
110 | 54 | by one. | ||
111 | 55 | |||
112 | 56 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus | ||
113 | 57 | >>> elsewhere.transitionToStatus( | ||
114 | 58 | ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user) | ||
115 | 59 | |||
116 | 60 | >>> get_view().bugs_fixed_elsewhere_count | ||
117 | 61 | 1L | ||
118 | 62 | |||
119 | 63 | Bugs fixed elsewhere also show up when we perform an advanced bug | ||
120 | 64 | search, using the appropriate query string parameter to ask for "bugs | ||
121 | 65 | resolved elsewhere": | ||
122 | 66 | |||
123 | 67 | >>> search_view = getMultiAdapter( | ||
124 | 68 | ... (bugtarget, | ||
125 | 69 | ... LaunchpadTestRequest( | ||
126 | 70 | ... form={'field.status_upstream': 'resolved_upstream'})), | ||
127 | 71 | ... name='+bugs') | ||
128 | 72 | >>> search_view.initialize() | ||
129 | 73 | >>> navigator = search_view.search() | ||
130 | 74 | |||
131 | 75 | >>> for task in search_view.search().batch: | ||
132 | 76 | ... for related_task in task.related_tasks: | ||
133 | 77 | ... print related_task.target.name | ||
134 | 78 | ... print related_task.status.name | ||
135 | 79 | evolution | ||
136 | 80 | FIXRELEASED | ||
137 | 81 | |||
138 | 82 | |||
139 | 83 | Private Bugs | ||
140 | 84 | ------------ | ||
141 | 85 | |||
142 | 86 | Only bugs that the user has permission to view are included in the count. | ||
143 | 87 | |||
144 | 88 | >>> another_bug = filebug(bugtarget, 'Example Bug') | ||
145 | 89 | >>> another_bug.setPrivate(True, getUtility(ILaunchBag).user) | ||
146 | 90 | True | ||
147 | 91 | |||
148 | 92 | >>> another_elsewhere = getUtility(IBugTaskSet).createTask( | ||
149 | 93 | ... another_bug, getUtility(ILaunchBag).user, evolution) | ||
150 | 94 | >>> another_elsewhere.transitionToStatus( | ||
151 | 95 | ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user) | ||
152 | 96 | |||
153 | 97 | >>> get_view().bugs_fixed_elsewhere_count | ||
154 | 98 | 2L | ||
155 | 99 | |||
156 | 100 | This means that No Privileges Person will see that there is only one bug | ||
157 | 101 | fixed elsewhere. | ||
158 | 102 | |||
159 | 103 | >>> login('no-priv@canonical.com') | ||
160 | 104 | >>> get_view().bugs_fixed_elsewhere_count | ||
161 | 105 | 1L | ||
162 | 106 | |||
163 | 107 | If the private bug is made public again, he will of course see that | ||
164 | 108 | there are two bugs fixed. | ||
165 | 109 | |||
166 | 110 | >>> login('foo.bar@canonical.com') | ||
167 | 111 | >>> another_bug.setPrivate(False, getUtility(ILaunchBag).user) | ||
168 | 112 | True | ||
169 | 113 | |||
170 | 114 | >>> login('no-priv@canonical.com') | ||
171 | 115 | >>> get_view().bugs_fixed_elsewhere_count | ||
172 | 116 | 2L | ||
173 | 117 | |||
174 | 118 | |||
175 | 119 | Duplicate Bugs | ||
176 | 120 | -------------- | ||
177 | 121 | |||
178 | 122 | Bugs that are duplicate of other bugs aren't included in the count. | ||
179 | 123 | |||
180 | 124 | >>> another_bug.markAsDuplicate(bug) | ||
181 | 125 | |||
182 | 126 | >>> get_view().bugs_fixed_elsewhere_count | ||
183 | 127 | 1L | ||
184 | 128 | |||
185 | 129 | |||
186 | 130 | Resolved Bugs | ||
187 | 131 | ------------- | ||
188 | 132 | |||
189 | 133 | The count includes only bugs that are open in the current context. | ||
190 | 134 | |||
191 | 135 | >>> for bugtask in bug.bugtasks: | ||
192 | 136 | ... if bugtask.target == bugtarget: | ||
193 | 137 | ... break | ||
194 | 138 | ... else: | ||
195 | 139 | ... print "Couldn't find a bugtasks for %r" % bugtarget | ||
196 | 140 | >>> bugtask.transitionToStatus( | ||
197 | 141 | ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user) | ||
198 | 142 | |||
199 | 143 | >>> get_view().bugs_fixed_elsewhere_count | ||
200 | 144 | 0 | ||
201 | 145 | 0 | ||
202 | === removed file 'lib/lp/bugs/browser/tests/test_bugs_fixed_elsewhere.py' | |||
203 | --- lib/lp/bugs/browser/tests/test_bugs_fixed_elsewhere.py 2011-12-30 06:14:56 +0000 | |||
204 | +++ lib/lp/bugs/browser/tests/test_bugs_fixed_elsewhere.py 1970-01-01 00:00:00 +0000 | |||
205 | @@ -1,73 +0,0 @@ | |||
206 | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the | ||
207 | 2 | # GNU Affero General Public License version 3 (see the file LICENSE). | ||
208 | 3 | |||
209 | 4 | """Test harness for running the bugs-fixed-elsewhere.txt tests.""" | ||
210 | 5 | |||
211 | 6 | __metaclass__ = type | ||
212 | 7 | |||
213 | 8 | __all__ = [] | ||
214 | 9 | |||
215 | 10 | import unittest | ||
216 | 11 | |||
217 | 12 | from zope.component import getUtility | ||
218 | 13 | |||
219 | 14 | from lp.bugs.interfaces.bug import CreateBugParams | ||
220 | 15 | from lp.bugs.interfaces.bugtask import BugTaskStatus | ||
221 | 16 | from lp.registry.interfaces.distribution import IDistributionSet | ||
222 | 17 | from lp.registry.interfaces.product import IProductSet | ||
223 | 18 | from lp.services.database.sqlbase import ( | ||
224 | 19 | cursor, | ||
225 | 20 | sqlvalues, | ||
226 | 21 | ) | ||
227 | 22 | from lp.services.webapp.interfaces import ILaunchBag | ||
228 | 23 | from lp.testing import login | ||
229 | 24 | from lp.testing.layers import LaunchpadFunctionalLayer | ||
230 | 25 | from lp.testing.systemdocs import ( | ||
231 | 26 | LayeredDocFileSuite, | ||
232 | 27 | setUp, | ||
233 | 28 | tearDown, | ||
234 | 29 | ) | ||
235 | 30 | |||
236 | 31 | |||
237 | 32 | def bugtarget_filebug(bugtarget, summary): | ||
238 | 33 | """File a bug as the current user on the bug target and return it.""" | ||
239 | 34 | return bugtarget.createBug(CreateBugParams( | ||
240 | 35 | getUtility(ILaunchBag).user, summary, comment=summary)) | ||
241 | 36 | |||
242 | 37 | def commonSetUp(test): | ||
243 | 38 | """Set up common for all tests.""" | ||
244 | 39 | setUp(test) | ||
245 | 40 | test.globs['filebug'] = bugtarget_filebug | ||
246 | 41 | login('test@canonical.com') | ||
247 | 42 | # Ensure that there are no fixed bugs in sample data that might | ||
248 | 43 | # interfere with the tests. | ||
249 | 44 | cur = cursor() | ||
250 | 45 | cur.execute("UPDATE BugTask SET status = %s" % ( | ||
251 | 46 | sqlvalues(BugTaskStatus.NEW))) | ||
252 | 47 | |||
253 | 48 | |||
254 | 49 | def productSetUp(test): | ||
255 | 50 | commonSetUp(test) | ||
256 | 51 | test.globs['bugtarget'] = getUtility(IProductSet).getByName('firefox') | ||
257 | 52 | |||
258 | 53 | |||
259 | 54 | def distributionSetUp(test): | ||
260 | 55 | commonSetUp(test) | ||
261 | 56 | test.globs['bugtarget'] = getUtility(IDistributionSet).getByName('ubuntu') | ||
262 | 57 | |||
263 | 58 | |||
264 | 59 | def test_suite(): | ||
265 | 60 | suite = unittest.TestSuite() | ||
266 | 61 | |||
267 | 62 | setUpMethods = [ | ||
268 | 63 | productSetUp, | ||
269 | 64 | distributionSetUp, | ||
270 | 65 | ] | ||
271 | 66 | |||
272 | 67 | for setUpMethod in setUpMethods: | ||
273 | 68 | test = LayeredDocFileSuite( | ||
274 | 69 | 'special/bugs-fixed-elsewhere.txt', | ||
275 | 70 | setUp=setUpMethod, tearDown=tearDown, | ||
276 | 71 | layer=LaunchpadFunctionalLayer) | ||
277 | 72 | suite.addTest(test) | ||
278 | 73 | return suite | ||
279 | 74 | 0 | ||
280 | === modified file 'lib/lp/bugs/doc/bugsummary.txt' | |||
281 | --- lib/lp/bugs/doc/bugsummary.txt 2012-05-02 05:25:11 +0000 | |||
282 | +++ lib/lp/bugs/doc/bugsummary.txt 2012-05-21 03:40:21 +0000 | |||
283 | @@ -14,20 +14,19 @@ | |||
284 | 14 | - milestone | 14 | - milestone |
285 | 15 | - importance | 15 | - importance |
286 | 16 | - has_patch | 16 | - has_patch |
287 | 17 | - fixed_upstream | ||
288 | 18 | 17 | ||
289 | 19 | 18 | ||
290 | 20 | First we should setup some helpers to use in the examples. These will | 19 | First we should setup some helpers to use in the examples. These will |
291 | 21 | let us dump the BugSummary table in a readable format. | 20 | let us dump the BugSummary table in a readable format. |
292 | 22 | 21 | ||
293 | 23 | --------------------------------------------------------------- | 22 | --------------------------------------------------------------- |
295 | 24 | prod ps dist ds spn tag mile status import pa up vis # | 23 | prod ps dist ds spn tag mile status import pa vis # |
296 | 25 | --------------------------------------------------------------- | 24 | --------------------------------------------------------------- |
297 | 26 | 25 | ||
298 | 27 | The columns are product, productseries, distribution, distroseries, | 26 | The columns are product, productseries, distribution, distroseries, |
299 | 28 | sourcepackagename, tag, milestone, status, importance, has_patch, | 27 | sourcepackagename, tag, milestone, status, importance, has_patch, |
302 | 29 | fixed_upstream, viewed_by and the count. viewed_by is a team reference | 28 | viewed_by and the count. viewed_by is a team reference and used to |
303 | 30 | and used to query private bug counts. | 29 | query private bug counts. |
304 | 31 | 30 | ||
305 | 32 | >>> from lp.services.database.lpstorm import IMasterStore | 31 | >>> from lp.services.database.lpstorm import IMasterStore |
306 | 33 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus | 32 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
307 | @@ -60,14 +59,13 @@ | |||
308 | 60 | ... BugSummary.sourcepackagename_id, BugSummary.tag, | 59 | ... BugSummary.sourcepackagename_id, BugSummary.tag, |
309 | 61 | ... BugSummary.milestone_id, BugSummary.status, | 60 | ... BugSummary.milestone_id, BugSummary.status, |
310 | 62 | ... BugSummary.importance, BugSummary.has_patch, | 61 | ... BugSummary.importance, BugSummary.has_patch, |
313 | 63 | ... BugSummary.fixed_upstream, BugSummary.viewed_by_id, | 62 | ... BugSummary.viewed_by_id, BugSummary.id) |
312 | 64 | ... BugSummary.id) | ||
314 | 65 | ... fmt = ( | 63 | ... fmt = ( |
315 | 66 | ... "%-4s %-4s %-4s %-4s %-5s %-3s %-4s " | 64 | ... "%-4s %-4s %-4s %-4s %-5s %-3s %-4s " |
317 | 67 | ... "%-6s %-6s %-2s %-2s %-4s %3s") | 65 | ... "%-6s %-6s %-2s %-4s %3s") |
318 | 68 | ... header = fmt % ( | 66 | ... header = fmt % ( |
319 | 69 | ... 'prod', 'ps', 'dist', 'ds', 'spn', 'tag', 'mile', | 67 | ... 'prod', 'ps', 'dist', 'ds', 'spn', 'tag', 'mile', |
321 | 70 | ... 'status', 'import', 'pa', 'up', 'vis', '#') | 68 | ... 'status', 'import', 'pa', 'vis', '#') |
322 | 71 | ... print "-" * len(header) | 69 | ... print "-" * len(header) |
323 | 72 | ... print header | 70 | ... print header |
324 | 73 | ... print "-" * len(header) | 71 | ... print "-" * len(header) |
325 | @@ -83,7 +81,6 @@ | |||
326 | 83 | ... str(bugsummary.status)[:6], | 81 | ... str(bugsummary.status)[:6], |
327 | 84 | ... str(bugsummary.importance)[:6], | 82 | ... str(bugsummary.importance)[:6], |
328 | 85 | ... str(bugsummary.has_patch)[:1], | 83 | ... str(bugsummary.has_patch)[:1], |
329 | 86 | ... str(bugsummary.fixed_upstream)[:1], | ||
330 | 87 | ... name(bugsummary.viewed_by), | 84 | ... name(bugsummary.viewed_by), |
331 | 88 | ... bugsummary.count) | 85 | ... bugsummary.count) |
332 | 89 | ... print " " * (len(header) - 4), | 86 | ... print " " * (len(header) - 4), |
333 | @@ -122,12 +119,12 @@ | |||
334 | 122 | ... BugSummary.tag == None) | 119 | ... BugSummary.tag == None) |
335 | 123 | 120 | ||
336 | 124 | >>> print_result(bug_summaries) | 121 | >>> print_result(bug_summaries) |
343 | 125 | --------------------------------------------------------------- | 122 | ------------------------------------------------------------ |
344 | 126 | prod ps dist ds spn tag mile status import pa up vis # | 123 | prod ps dist ds spn tag mile status import pa vis # |
345 | 127 | --------------------------------------------------------------- | 124 | ------------------------------------------------------------ |
346 | 128 | pr-a x x x x x x New Undeci F F x 1 | 125 | pr-a x x x x x x New Undeci F x 1 |
347 | 129 | === | 126 | === |
348 | 130 | 1 | 127 | 1 |
349 | 131 | 128 | ||
350 | 132 | There is one row per tag per combination of product, status and milestone. | 129 | There is one row per tag per combination of product, status and milestone. |
351 | 133 | If we are interested in all bugs targeted to a product regardless of how | 130 | If we are interested in all bugs targeted to a product regardless of how |
352 | @@ -148,13 +145,13 @@ | |||
353 | 148 | ... BugSummary.product == prod_a, | 145 | ... BugSummary.product == prod_a, |
354 | 149 | ... BugSummary.tag == None, | 146 | ... BugSummary.tag == None, |
355 | 150 | ... BugSummary.viewed_by == None) | 147 | ... BugSummary.viewed_by == None) |
363 | 151 | --------------------------------------------------------------- | 148 | ------------------------------------------------------------ |
364 | 152 | prod ps dist ds spn tag mile status import pa up vis # | 149 | prod ps dist ds spn tag mile status import pa vis # |
365 | 153 | --------------------------------------------------------------- | 150 | ------------------------------------------------------------ |
366 | 154 | pr-a x x x x x x New Undeci F F x 2 | 151 | pr-a x x x x x x New Undeci F x 2 |
367 | 155 | pr-a x x x x x x Confir Undeci F F x 2 | 152 | pr-a x x x x x x Confir Undeci F x 2 |
368 | 156 | === | 153 | === |
369 | 157 | 4 | 154 | 4 |
370 | 158 | 155 | ||
371 | 159 | Here are the rows associated with the 't-a' tag. There is 1 Confirmed | 156 | Here are the rows associated with the 't-a' tag. There is 1 Confirmed |
372 | 160 | bug task targetted to the pr-a product who's bug is tagged 't-a'.: | 157 | bug task targetted to the pr-a product who's bug is tagged 't-a'.: |
373 | @@ -163,12 +160,12 @@ | |||
374 | 163 | ... BugSummary.product == prod_a, | 160 | ... BugSummary.product == prod_a, |
375 | 164 | ... BugSummary.tag == u't-a', | 161 | ... BugSummary.tag == u't-a', |
376 | 165 | ... BugSummary.viewed_by == None) | 162 | ... BugSummary.viewed_by == None) |
383 | 166 | --------------------------------------------------------------- | 163 | ------------------------------------------------------------ |
384 | 167 | prod ps dist ds spn tag mile status import pa up vis # | 164 | prod ps dist ds spn tag mile status import pa vis # |
385 | 168 | --------------------------------------------------------------- | 165 | ------------------------------------------------------------ |
386 | 169 | pr-a x x x x t-a x Confir Undeci F F x 1 | 166 | pr-a x x x x t-a x Confir Undeci F x 1 |
387 | 170 | === | 167 | === |
388 | 171 | 1 | 168 | 1 |
389 | 172 | 169 | ||
390 | 173 | You will normally want to get the total count counted in the database | 170 | You will normally want to get the total count counted in the database |
391 | 174 | rather than waste transmission time to calculate the rows client side. | 171 | rather than waste transmission time to calculate the rows client side. |
392 | @@ -208,17 +205,17 @@ | |||
393 | 208 | >>> print_find( | 205 | >>> print_find( |
394 | 209 | ... BugSummary.product == prod_a, | 206 | ... BugSummary.product == prod_a, |
395 | 210 | ... BugSummary.viewed_by == None) | 207 | ... BugSummary.viewed_by == None) |
407 | 211 | --------------------------------------------------------------- | 208 | ------------------------------------------------------------ |
408 | 212 | prod ps dist ds spn tag mile status import pa up vis # | 209 | prod ps dist ds spn tag mile status import pa vis # |
409 | 213 | --------------------------------------------------------------- | 210 | ------------------------------------------------------------ |
410 | 214 | pr-a x x x x t-a x Confir Undeci F F x 1 | 211 | pr-a x x x x t-a x Confir Undeci F x 1 |
411 | 215 | pr-a x x x x t-b ms-a New Undeci F F x 1 | 212 | pr-a x x x x t-b ms-a New Undeci F x 1 |
412 | 216 | pr-a x x x x t-c ms-a New Undeci F F x 1 | 213 | pr-a x x x x t-c ms-a New Undeci F x 1 |
413 | 217 | pr-a x x x x x ms-a New Undeci F F x 1 | 214 | pr-a x x x x x ms-a New Undeci F x 1 |
414 | 218 | pr-a x x x x x x New Undeci F F x 2 | 215 | pr-a x x x x x x New Undeci F x 2 |
415 | 219 | pr-a x x x x x x Confir Undeci F F x 2 | 216 | pr-a x x x x x x Confir Undeci F x 2 |
416 | 220 | === | 217 | === |
417 | 221 | 8 | 218 | 8 |
418 | 222 | 219 | ||
419 | 223 | Number of New bugs not targeted to a milestone. Note the difference | 220 | Number of New bugs not targeted to a milestone. Note the difference |
420 | 224 | between selecting records where tag is None, and where milestone is None: | 221 | between selecting records where tag is None, and where milestone is None: |
421 | @@ -272,13 +269,13 @@ | |||
422 | 272 | ... BugSummary.productseries == productseries_b, | 269 | ... BugSummary.productseries == productseries_b, |
423 | 273 | ... BugSummary.product == prod_b), | 270 | ... BugSummary.product == prod_b), |
424 | 274 | ... BugSummary.viewed_by == None) | 271 | ... BugSummary.viewed_by == None) |
432 | 275 | --------------------------------------------------------------- | 272 | ------------------------------------------------------------ |
433 | 276 | prod ps dist ds spn tag mile status import pa up vis # | 273 | prod ps dist ds spn tag mile status import pa vis # |
434 | 277 | --------------------------------------------------------------- | 274 | ------------------------------------------------------------ |
435 | 278 | pr-b x x x x x x New Undeci F F x 1 | 275 | pr-b x x x x x x New Undeci F x 1 |
436 | 279 | x ps-b x x x x x New Undeci F F x 1 | 276 | x ps-b x x x x x New Undeci F x 1 |
437 | 280 | === | 277 | === |
438 | 281 | 2 | 278 | 2 |
439 | 282 | 279 | ||
440 | 283 | Distribution Bug Counts | 280 | Distribution Bug Counts |
441 | 284 | ----------------------- | 281 | ----------------------- |
442 | @@ -300,14 +297,14 @@ | |||
443 | 300 | >>> print_find( | 297 | >>> print_find( |
444 | 301 | ... BugSummary.distribution == distribution, | 298 | ... BugSummary.distribution == distribution, |
445 | 302 | ... BugSummary.viewed_by == None) | 299 | ... BugSummary.viewed_by == None) |
454 | 303 | --------------------------------------------------------------- | 300 | ------------------------------------------------------------ |
455 | 304 | prod ps dist ds spn tag mile status import pa up vis # | 301 | prod ps dist ds spn tag mile status import pa vis # |
456 | 305 | --------------------------------------------------------------- | 302 | ------------------------------------------------------------ |
457 | 306 | x x di-a x sp-a x x New Undeci F F x 1 | 303 | x x di-a x sp-a x x New Undeci F x 1 |
458 | 307 | x x di-a x x x x New Undeci F F x 1 | 304 | x x di-a x x x x New Undeci F x 1 |
459 | 308 | x x di-a x x x x Confir Undeci F F x 1 | 305 | x x di-a x x x x Confir Undeci F x 1 |
460 | 309 | === | 306 | === |
461 | 310 | 3 | 307 | 3 |
462 | 311 | 308 | ||
463 | 312 | How many bugs targeted to a distribution? | 309 | How many bugs targeted to a distribution? |
464 | 313 | 310 | ||
465 | @@ -372,12 +369,12 @@ | |||
466 | 372 | >>> print_find( | 369 | >>> print_find( |
467 | 373 | ... BugSummary.distroseries == series_c, | 370 | ... BugSummary.distroseries == series_c, |
468 | 374 | ... BugSummary.viewed_by == None) | 371 | ... BugSummary.viewed_by == None) |
475 | 375 | --------------------------------------------------------------- | 372 | ------------------------------------------------------------ |
476 | 376 | prod ps dist ds spn tag mile status import pa up vis # | 373 | prod ps dist ds spn tag mile status import pa vis # |
477 | 377 | --------------------------------------------------------------- | 374 | ------------------------------------------------------------ |
478 | 378 | x x x ds-c x x x New Undeci F F x 1 | 375 | x x x ds-c x x x New Undeci F x 1 |
479 | 379 | === | 376 | === |
480 | 380 | 1 | 377 | 1 |
481 | 381 | 378 | ||
482 | 382 | 379 | ||
483 | 383 | Privacy | 380 | Privacy |
484 | @@ -444,18 +441,18 @@ | |||
485 | 444 | ... BugSummary.distribution == distro_p, | 441 | ... BugSummary.distribution == distro_p, |
486 | 445 | ... BugSummary.distroseries == series_p) | 442 | ... BugSummary.distroseries == series_p) |
487 | 446 | >>> print_find(distro_or_series) | 443 | >>> print_find(distro_or_series) |
500 | 447 | --------------------------------------------------------------- | 444 | ------------------------------------------------------------ |
501 | 448 | prod ps dist ds spn tag mile status import pa up vis # | 445 | prod ps dist ds spn tag mile status import pa vis # |
502 | 449 | --------------------------------------------------------------- | 446 | ------------------------------------------------------------ |
503 | 450 | x x di-p x x x x New Undeci F F p-b 1 | 447 | x x di-p x x x x New Undeci F p-b 1 |
504 | 451 | x x di-p x x x x New Undeci F F own 3 | 448 | x x di-p x x x x New Undeci F own 3 |
505 | 452 | x x di-p x x x x New Undeci F F t-a 1 | 449 | x x di-p x x x x New Undeci F t-a 1 |
506 | 453 | x x di-p x x x x New Undeci F F t-c 1 | 450 | x x di-p x x x x New Undeci F t-c 1 |
507 | 454 | x x di-p x x x x New Undeci F F x 1 | 451 | x x di-p x x x x New Undeci F x 1 |
508 | 455 | x x x ds-p x x x New Undeci F F own 1 | 452 | x x x ds-p x x x New Undeci F own 1 |
509 | 456 | x x x ds-p x x x New Undeci F F t-c 1 | 453 | x x x ds-p x x x New Undeci F t-c 1 |
510 | 457 | === | 454 | === |
511 | 458 | 9 | 455 | 9 |
512 | 459 | 456 | ||
513 | 460 | So how many public bugs are there on the distro? | 457 | So how many public bugs are there on the distro? |
514 | 461 | 458 | ||
515 | 462 | 459 | ||
516 | === modified file 'lib/lp/bugs/interfaces/bugsummary.py' | |||
517 | --- lib/lp/bugs/interfaces/bugsummary.py 2011-12-24 16:54:44 +0000 | |||
518 | +++ lib/lp/bugs/interfaces/bugsummary.py 2012-05-21 03:40:21 +0000 | |||
519 | @@ -72,7 +72,6 @@ | |||
520 | 72 | viewed_by = Object(IPerson, readonly=True) | 72 | viewed_by = Object(IPerson, readonly=True) |
521 | 73 | 73 | ||
522 | 74 | has_patch = Bool(readonly=True) | 74 | has_patch = Bool(readonly=True) |
523 | 75 | fixed_upstream = Bool(readonly=True) | ||
524 | 76 | 75 | ||
525 | 77 | 76 | ||
526 | 78 | class IBugSummaryDimension(Interface): | 77 | class IBugSummaryDimension(Interface): |
527 | 79 | 78 | ||
528 | === modified file 'lib/lp/bugs/model/bugsummary.py' | |||
529 | --- lib/lp/bugs/model/bugsummary.py 2011-12-30 06:14:56 +0000 | |||
530 | +++ lib/lp/bugs/model/bugsummary.py 2012-05-21 03:40:21 +0000 | |||
531 | @@ -78,7 +78,6 @@ | |||
532 | 78 | viewed_by = Reference(viewed_by_id, Person.id) | 78 | viewed_by = Reference(viewed_by_id, Person.id) |
533 | 79 | 79 | ||
534 | 80 | has_patch = Bool() | 80 | has_patch = Bool() |
535 | 81 | fixed_upstream = Bool() | ||
536 | 82 | 81 | ||
537 | 83 | 82 | ||
538 | 84 | class CombineBugSummaryConstraint: | 83 | class CombineBugSummaryConstraint: |
539 | 85 | 84 | ||
540 | === modified file 'lib/lp/bugs/model/tests/test_bugsummary.py' | |||
541 | --- lib/lp/bugs/model/tests/test_bugsummary.py 2012-05-02 05:25:11 +0000 | |||
542 | +++ lib/lp/bugs/model/tests/test_bugsummary.py 2012-05-21 03:40:21 +0000 | |||
543 | @@ -976,143 +976,6 @@ | |||
544 | 976 | BugSummary.milestone == milestone), | 976 | BugSummary.milestone == milestone), |
545 | 977 | 0) | 977 | 0) |
546 | 978 | 978 | ||
547 | 979 | def test_fixUpstream(self): | ||
548 | 980 | distribution = self.factory.makeDistribution() | ||
549 | 981 | product = self.factory.makeProduct() | ||
550 | 982 | distro_bugtask = self.factory.makeBugTask(target=distribution) | ||
551 | 983 | bug = distro_bugtask.bug | ||
552 | 984 | product_bugtask = self.factory.makeBugTask(bug=bug, target=product) | ||
553 | 985 | |||
554 | 986 | self.assertEqual( | ||
555 | 987 | self.getPublicCount( | ||
556 | 988 | BugSummary.distribution == distribution, | ||
557 | 989 | BugSummary.fixed_upstream == True), | ||
558 | 990 | 0) | ||
559 | 991 | self.assertEqual( | ||
560 | 992 | self.getPublicCount( | ||
561 | 993 | BugSummary.distribution == distribution, | ||
562 | 994 | BugSummary.fixed_upstream == False), | ||
563 | 995 | 1) | ||
564 | 996 | |||
565 | 997 | product_bugtask.transitionToStatus( | ||
566 | 998 | BugTaskStatus.FIXRELEASED, bug.owner) | ||
567 | 999 | |||
568 | 1000 | self.assertEqual( | ||
569 | 1001 | self.getPublicCount( | ||
570 | 1002 | BugSummary.distribution == distribution, | ||
571 | 1003 | BugSummary.fixed_upstream == True), | ||
572 | 1004 | 1) | ||
573 | 1005 | self.assertEqual( | ||
574 | 1006 | self.getPublicCount( | ||
575 | 1007 | BugSummary.distribution == distribution, | ||
576 | 1008 | BugSummary.fixed_upstream == False), | ||
577 | 1009 | 0) | ||
578 | 1010 | |||
579 | 1011 | def test_breakUpstream(self): | ||
580 | 1012 | distribution = self.factory.makeDistribution() | ||
581 | 1013 | product = self.factory.makeProduct() | ||
582 | 1014 | distro_bugtask = self.factory.makeBugTask(target=distribution) | ||
583 | 1015 | bug = distro_bugtask.bug | ||
584 | 1016 | product_bugtask = self.factory.makeBugTask(bug=bug, target=product) | ||
585 | 1017 | |||
586 | 1018 | product_bugtask.transitionToStatus( | ||
587 | 1019 | BugTaskStatus.FIXCOMMITTED, bug.owner) | ||
588 | 1020 | |||
589 | 1021 | self.assertEqual( | ||
590 | 1022 | self.getPublicCount( | ||
591 | 1023 | BugSummary.distribution == distribution, | ||
592 | 1024 | BugSummary.fixed_upstream == True), | ||
593 | 1025 | 1) | ||
594 | 1026 | self.assertEqual( | ||
595 | 1027 | self.getPublicCount( | ||
596 | 1028 | BugSummary.distribution == distribution, | ||
597 | 1029 | BugSummary.fixed_upstream == False), | ||
598 | 1030 | 0) | ||
599 | 1031 | |||
600 | 1032 | product_bugtask.transitionToStatus( | ||
601 | 1033 | BugTaskStatus.INPROGRESS, bug.owner) | ||
602 | 1034 | |||
603 | 1035 | self.assertEqual( | ||
604 | 1036 | self.getPublicCount( | ||
605 | 1037 | BugSummary.distribution == distribution, | ||
606 | 1038 | BugSummary.fixed_upstream == True), | ||
607 | 1039 | 0) | ||
608 | 1040 | self.assertEqual( | ||
609 | 1041 | self.getPublicCount( | ||
610 | 1042 | BugSummary.distribution == distribution, | ||
611 | 1043 | BugSummary.fixed_upstream == False), | ||
612 | 1044 | 1) | ||
613 | 1045 | |||
614 | 1046 | def test_fixUpstreamViaWatch(self): | ||
615 | 1047 | distribution = self.factory.makeDistribution() | ||
616 | 1048 | product = self.factory.makeProduct() | ||
617 | 1049 | distro_bugtask = self.factory.makeBugTask(target=distribution) | ||
618 | 1050 | bug = distro_bugtask.bug | ||
619 | 1051 | product_bugtask = self.factory.makeBugTask(bug=bug, target=product) | ||
620 | 1052 | self.factory.makeBugWatch(bug_task=product_bugtask) | ||
621 | 1053 | |||
622 | 1054 | self.assertEqual( | ||
623 | 1055 | self.getPublicCount( | ||
624 | 1056 | BugSummary.distribution == distribution, | ||
625 | 1057 | BugSummary.fixed_upstream == True), | ||
626 | 1058 | 0) | ||
627 | 1059 | self.assertEqual( | ||
628 | 1060 | self.getPublicCount( | ||
629 | 1061 | BugSummary.distribution == distribution, | ||
630 | 1062 | BugSummary.fixed_upstream == False), | ||
631 | 1063 | 1) | ||
632 | 1064 | |||
633 | 1065 | # Bugs flagged INVALID by upstream count as fixed upstream. | ||
634 | 1066 | product_bugtask.transitionToStatus( | ||
635 | 1067 | BugTaskStatus.INVALID, bug.owner) | ||
636 | 1068 | |||
637 | 1069 | self.assertEqual( | ||
638 | 1070 | self.getPublicCount( | ||
639 | 1071 | BugSummary.distribution == distribution, | ||
640 | 1072 | BugSummary.fixed_upstream == True), | ||
641 | 1073 | 1) | ||
642 | 1074 | self.assertEqual( | ||
643 | 1075 | self.getPublicCount( | ||
644 | 1076 | BugSummary.distribution == distribution, | ||
645 | 1077 | BugSummary.fixed_upstream == False), | ||
646 | 1078 | 0) | ||
647 | 1079 | |||
648 | 1080 | def test_breakUpstreamViaWatch(self): | ||
649 | 1081 | distribution = self.factory.makeDistribution() | ||
650 | 1082 | product = self.factory.makeProduct() | ||
651 | 1083 | distro_bugtask = self.factory.makeBugTask(target=distribution) | ||
652 | 1084 | bug = distro_bugtask.bug | ||
653 | 1085 | product_bugtask = self.factory.makeBugTask(bug=bug, target=product) | ||
654 | 1086 | self.factory.makeBugWatch(bug_task=product_bugtask) | ||
655 | 1087 | |||
656 | 1088 | product_bugtask.transitionToStatus( | ||
657 | 1089 | BugTaskStatus.FIXCOMMITTED, bug.owner) | ||
658 | 1090 | |||
659 | 1091 | self.assertEqual( | ||
660 | 1092 | self.getPublicCount( | ||
661 | 1093 | BugSummary.distribution == distribution, | ||
662 | 1094 | BugSummary.fixed_upstream == True), | ||
663 | 1095 | 1) | ||
664 | 1096 | self.assertEqual( | ||
665 | 1097 | self.getPublicCount( | ||
666 | 1098 | BugSummary.distribution == distribution, | ||
667 | 1099 | BugSummary.fixed_upstream == False), | ||
668 | 1100 | 0) | ||
669 | 1101 | |||
670 | 1102 | product_bugtask.transitionToStatus( | ||
671 | 1103 | BugTaskStatus.UNKNOWN, bug.owner) | ||
672 | 1104 | |||
673 | 1105 | self.assertEqual( | ||
674 | 1106 | self.getPublicCount( | ||
675 | 1107 | BugSummary.distribution == distribution, | ||
676 | 1108 | BugSummary.fixed_upstream == True), | ||
677 | 1109 | 0) | ||
678 | 1110 | self.assertEqual( | ||
679 | 1111 | self.getPublicCount( | ||
680 | 1112 | BugSummary.distribution == distribution, | ||
681 | 1113 | BugSummary.fixed_upstream == False), | ||
682 | 1114 | 1) | ||
683 | 1115 | |||
684 | 1116 | def test_addPatch(self): | 979 | def test_addPatch(self): |
685 | 1117 | product = self.factory.makeProduct() | 980 | product = self.factory.makeProduct() |
686 | 1118 | bug = self.factory.makeBug(product=product) | 981 | bug = self.factory.makeBug(product=product) |
687 | 1119 | 982 | ||
688 | === modified file 'lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt' | |||
689 | --- lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt 2012-03-15 05:55:42 +0000 | |||
690 | +++ lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt 2012-05-21 03:40:21 +0000 | |||
691 | @@ -37,7 +37,7 @@ | |||
692 | 37 | 0 Critical bugs | 37 | 0 Critical bugs |
693 | 38 | 0 High importance bugs | 38 | 0 High importance bugs |
694 | 39 | <BLANKLINE> | 39 | <BLANKLINE> |
696 | 40 | 0 Bugs fixed elsewhere | 40 | Bugs fixed elsewhere |
697 | 41 | 0 Bugs with patches | 41 | 0 Bugs with patches |
698 | 42 | 2 Open CVE bugs - CVE reports | 42 | 2 Open CVE bugs - CVE reports |
699 | 43 | 43 | ||
700 | @@ -71,7 +71,7 @@ | |||
701 | 71 | 0 Bugs reported by me | 71 | 0 Bugs reported by me |
702 | 72 | Bugs affecting me | 72 | Bugs affecting me |
703 | 73 | <BLANKLINE> | 73 | <BLANKLINE> |
705 | 74 | 0 Bugs fixed elsewhere | 74 | Bugs fixed elsewhere |
706 | 75 | 0 Bugs with patches | 75 | 0 Bugs with patches |
707 | 76 | 2 Open CVE bugs - CVE reports | 76 | 2 Open CVE bugs - CVE reports |
708 | 77 | 77 | ||
709 | @@ -107,7 +107,7 @@ | |||
710 | 107 | 0 Critical bugs | 107 | 0 Critical bugs |
711 | 108 | 0 High importance bugs | 108 | 0 High importance bugs |
712 | 109 | <BLANKLINE> | 109 | <BLANKLINE> |
714 | 110 | 0 Bugs fixed elsewhere | 110 | Bugs fixed elsewhere |
715 | 111 | 0 Bugs with patches | 111 | 0 Bugs with patches |
716 | 112 | 1 Open CVE bug - CVE report | 112 | 1 Open CVE bug - CVE report |
717 | 113 | 113 | ||
718 | @@ -140,7 +140,7 @@ | |||
719 | 140 | 0 Bugs reported by me | 140 | 0 Bugs reported by me |
720 | 141 | Bugs affecting me | 141 | Bugs affecting me |
721 | 142 | <BLANKLINE> | 142 | <BLANKLINE> |
723 | 143 | 0 Bugs fixed elsewhere | 143 | Bugs fixed elsewhere |
724 | 144 | 0 Bugs with patches | 144 | 0 Bugs with patches |
725 | 145 | 1 Open CVE bug - CVE report | 145 | 1 Open CVE bug - CVE report |
726 | 146 | 146 | ||
727 | @@ -175,7 +175,7 @@ | |||
728 | 175 | 0 Critical bugs | 175 | 0 Critical bugs |
729 | 176 | 0 High importance bugs | 176 | 0 High importance bugs |
730 | 177 | <BLANKLINE> | 177 | <BLANKLINE> |
732 | 178 | 0 Bugs fixed elsewhere | 178 | Bugs fixed elsewhere |
733 | 179 | 0 Bugs with patches | 179 | 0 Bugs with patches |
734 | 180 | 2 Open CVE bugs | 180 | 2 Open CVE bugs |
735 | 181 | 181 | ||
736 | @@ -208,7 +208,7 @@ | |||
737 | 208 | 0 Bugs reported by me | 208 | 0 Bugs reported by me |
738 | 209 | Bugs affecting me | 209 | Bugs affecting me |
739 | 210 | <BLANKLINE> | 210 | <BLANKLINE> |
741 | 211 | 0 Bugs fixed elsewhere | 211 | Bugs fixed elsewhere |
742 | 212 | 0 Bugs with patches | 212 | 0 Bugs with patches |
743 | 213 | 2 Open CVE bugs | 213 | 2 Open CVE bugs |
744 | 214 | 214 | ||
745 | @@ -247,7 +247,7 @@ | |||
746 | 247 | 0 Critical bugs | 247 | 0 Critical bugs |
747 | 248 | 0 High importance bugs | 248 | 0 High importance bugs |
748 | 249 | <BLANKLINE> | 249 | <BLANKLINE> |
750 | 250 | 0 Bugs fixed elsewhere | 250 | Bugs fixed elsewhere |
751 | 251 | 0 Bugs with patches | 251 | 0 Bugs with patches |
752 | 252 | 1 Open CVE bug | 252 | 1 Open CVE bug |
753 | 253 | 253 | ||
754 | @@ -280,7 +280,7 @@ | |||
755 | 280 | 0 Bugs reported by me | 280 | 0 Bugs reported by me |
756 | 281 | Bugs affecting me | 281 | Bugs affecting me |
757 | 282 | <BLANKLINE> | 282 | <BLANKLINE> |
759 | 283 | 0 Bugs fixed elsewhere | 283 | Bugs fixed elsewhere |
760 | 284 | 0 Bugs with patches | 284 | 0 Bugs with patches |
761 | 285 | 1 Open CVE bug | 285 | 1 Open CVE bug |
762 | 286 | 286 | ||
763 | @@ -318,7 +318,7 @@ | |||
764 | 318 | 1 Critical bug | 318 | 1 Critical bug |
765 | 319 | 0 High importance bugs | 319 | 0 High importance bugs |
766 | 320 | <BLANKLINE> | 320 | <BLANKLINE> |
768 | 321 | 0 Bugs fixed elsewhere | 321 | Bugs fixed elsewhere |
769 | 322 | 0 Bugs with patches | 322 | 0 Bugs with patches |
770 | 323 | 1 Open CVE bug | 323 | 1 Open CVE bug |
771 | 324 | 324 | ||
772 | @@ -352,7 +352,7 @@ | |||
773 | 352 | 0 Bugs reported by me | 352 | 0 Bugs reported by me |
774 | 353 | Bugs affecting me | 353 | Bugs affecting me |
775 | 354 | <BLANKLINE> | 354 | <BLANKLINE> |
777 | 355 | 0 Bugs fixed elsewhere | 355 | Bugs fixed elsewhere |
778 | 356 | 0 Bugs with patches | 356 | 0 Bugs with patches |
779 | 357 | 1 Open CVE bug | 357 | 1 Open CVE bug |
780 | 358 | 358 | ||
781 | @@ -390,7 +390,7 @@ | |||
782 | 390 | 1 Critical bug | 390 | 1 Critical bug |
783 | 391 | 0 High importance bugs | 391 | 0 High importance bugs |
784 | 392 | <BLANKLINE> | 392 | <BLANKLINE> |
786 | 393 | 0 Bugs fixed elsewhere | 393 | Bugs fixed elsewhere |
787 | 394 | 0 Bugs with patches | 394 | 0 Bugs with patches |
788 | 395 | 1 Open CVE bug - CVE report | 395 | 1 Open CVE bug - CVE report |
789 | 396 | 396 | ||
790 | @@ -424,7 +424,7 @@ | |||
791 | 424 | 0 Bugs reported by me | 424 | 0 Bugs reported by me |
792 | 425 | Bugs affecting me | 425 | Bugs affecting me |
793 | 426 | <BLANKLINE> | 426 | <BLANKLINE> |
795 | 427 | 0 Bugs fixed elsewhere | 427 | Bugs fixed elsewhere |
796 | 428 | 0 Bugs with patches | 428 | 0 Bugs with patches |
797 | 429 | 1 Open CVE bug - CVE report | 429 | 1 Open CVE bug - CVE report |
798 | 430 | 430 | ||
799 | @@ -433,30 +433,3 @@ | |||
800 | 433 | 433 | ||
801 | 434 | >>> print user_browser.getLink('CVE report').url | 434 | >>> print user_browser.getLink('CVE report').url |
802 | 435 | http://bugs.launchpad.dev/firefox/+cve | 435 | http://bugs.launchpad.dev/firefox/+cve |
803 | 436 | |||
804 | 437 | |||
805 | 438 | Hiding "Bugs fixed elsewhere" counts | ||
806 | 439 | ------------------------------------ | ||
807 | 440 | |||
808 | 441 | The count of bugs fixed elsewhere is of dubious utility, and it's | ||
809 | 442 | expensive to calculate when generating BugSummary. As a trial before we | ||
810 | 443 | remove it, there's a feature flag to hide the count. | ||
811 | 444 | |||
812 | 445 | >>> print_bugfilters_portlet_filled(user_browser, path) | ||
813 | 446 | 3 New bugs | ||
814 | 447 | ... | ||
815 | 448 | <BLANKLINE> | ||
816 | 449 | 0 Bugs fixed elsewhere | ||
817 | 450 | 0 Bugs with patches | ||
818 | 451 | ... | ||
819 | 452 | |||
820 | 453 | >>> from lp.services.features.testing import FeatureFixture | ||
821 | 454 | >>> with FeatureFixture( | ||
822 | 455 | ... {'bugs.statistics_portlet.hide_fixed_elsewhere_count': 'true'}): | ||
823 | 456 | ... print print_bugfilters_portlet_filled(user_browser, path) | ||
824 | 457 | 3 New bugs | ||
825 | 458 | ... | ||
826 | 459 | <BLANKLINE> | ||
827 | 460 | Bugs fixed elsewhere | ||
828 | 461 | 0 Bugs with patches | ||
829 | 462 | ... | ||
830 | 463 | 436 | ||
831 | === modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt' | |||
832 | --- lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt 2012-03-14 13:19:43 +0000 | |||
833 | +++ lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt 2012-05-21 03:40:21 +0000 | |||
834 | @@ -110,18 +110,7 @@ | |||
835 | 110 | 110 | ||
836 | 111 | <tr><td colspan="2"><br /></td></tr> | 111 | <tr><td colspan="2"><br /></td></tr> |
837 | 112 | 112 | ||
850 | 113 | <tr tal:condition="not: request/features/bugs.statistics_portlet.hide_fixed_elsewhere_count" | 113 | <tr> |
839 | 114 | tal:define="count view/bugs_fixed_elsewhere_count|nothing; | ||
840 | 115 | plural string: Bugs fixed elsewhere; | ||
841 | 116 | singular string: Bug fixed elsewhere;"> | ||
842 | 117 | <td class="bugs-count" tal:content="count" /> | ||
843 | 118 | <td class="bugs-link"> | ||
844 | 119 | <a tal:attributes="href string:${view/bugs_fixed_elsewhere_url}"> | ||
845 | 120 | <metal:message use-macro="context/@@+base-layout-macros/plural-message"/> | ||
846 | 121 | </a> | ||
847 | 122 | </td> | ||
848 | 123 | </tr> | ||
849 | 124 | <tr tal:condition="request/features/bugs.statistics_portlet.hide_fixed_elsewhere_count"> | ||
851 | 125 | <tal:comment condition="nothing"> | 114 | <tal:comment condition="nothing"> |
852 | 126 | No count here, because generating it is expensive. | 115 | No count here, because generating it is expensive. |
853 | 127 | </tal:comment> | 116 | </tal:comment> |
854 | 128 | 117 | ||
855 | === modified file 'lib/lp/services/features/flags.py' | |||
856 | --- lib/lp/services/features/flags.py 2012-05-08 01:31:10 +0000 | |||
857 | +++ lib/lp/services/features/flags.py 2012-05-21 03:40:21 +0000 | |||
858 | @@ -96,13 +96,6 @@ | |||
859 | 96 | '', | 96 | '', |
860 | 97 | '', | 97 | '', |
861 | 98 | ''), | 98 | ''), |
862 | 99 | ('bugs.statistics_portlet.hide_fixed_elsewhere_count', | ||
863 | 100 | 'boolean', | ||
864 | 101 | ('Hides the "Bugs fixed elsewhere" count in the bug target statistics ' | ||
865 | 102 | 'portlet.'), | ||
866 | 103 | '', | ||
867 | 104 | '', | ||
868 | 105 | ''), | ||
869 | 106 | ('code.ajax_revision_diffs.enabled', | 99 | ('code.ajax_revision_diffs.enabled', |
870 | 107 | 'boolean', | 100 | 'boolean', |
871 | 108 | ("Offer expandable inline diffs for branch revisions."), | 101 | ("Offer expandable inline diffs for branch revisions."), |
Looks fine.