Merge lp:~deryck/launchpad/bug-count-filters-503222 into lp:launchpad

Proposed by Deryck Hodge
Status: Merged
Approved by: Deryck Hodge
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~deryck/launchpad/bug-count-filters-503222
Merge into: lp:launchpad
Diff against target: 928 lines (+293/-114)
11 files modified
lib/lp/bugs/browser/bugtask.py (+23/-0)
lib/lp/bugs/doc/bugtask-package-bugcounts.txt (+10/-0)
lib/lp/bugs/interfaces/bugtarget.py (+2/-0)
lib/lp/bugs/model/bugtarget.py (+13/-1)
lib/lp/bugs/model/bugtask.py (+7/-2)
lib/lp/bugs/stories/patches-view/patches-view.txt (+27/-12)
lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt (+133/-61)
lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt (+61/-37)
lib/lp/registry/browser/person.py (+15/-0)
lib/lp/registry/configure.zcml (+1/-0)
lib/lp/registry/model/sourcepackage.py (+1/-1)
To merge this branch: bzr merge lp:~deryck/launchpad/bug-count-filters-503222
Reviewer Review Type Date Requested Status
Curtis Hovey (community) ui Approve
Eleanor Berger (community) code ui* Approve
Review via email: mp+23386@code.launchpad.net

Commit message

Add counts for HIGH and INPROGRESS bugs to the portlet on a project's bugs home page.

Description of the change

This branch is largely just a test clean up of a branch mbp did for
adding high and in progress bug filters to a project's bugs home page.
The initial branch passed review, but some tests were failing.

The initial MP is here:

https://code.edge.launchpad.net/~mbp/launchpad/503222-bug-counts/+merge/18543

All I had to do was fix a couple tests. To do this, I had to add a
high_bugs_count to BugTaskSet._getBugCountsForDistribution. I also
update mbp's branch to use the filter pluralization technique kfogel
applied to this template a couple weeks back. Since there are new bits,
it seemed appropriate to get it reviewed again.

I think the UI for the filters is being stretched to its maximum
usefulness with this addition, but I would like to ask the UI reviewer
to be forgiving under the assumption that the bugs team will not allow
any additional filters here before we rework this area of the template.

To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) :
review: Approve (code)
Revision history for this message
Deryck Hodge (deryck) wrote :
Revision history for this message
Eleanor Berger (intellectronica) :
review: Approve (code ui*)
Revision history for this message
Eleanor Berger (intellectronica) wrote :

Regarding the UI, I expressed some reservation about "N In-progress bugs", but eventually agreed that it's better, for readability, than the more grammatical option.

Revision history for this message
Curtis Hovey (sinzui) wrote :

I agree that the filters are stretched to their max. I pondered the ordering since I did not
understand why New was not close to open and in-progress. We could split the list into two groups.

2 New bugs
3 Open bugs
1 In-progress bug
1
Critical bug
0
High importance bugs

0 Bugs assigned to me
0 Bugs with patches
0 Bugs fixed elsewhere
1 Open CVE bug - CVE report

review: Needs Information (ui)
Revision history for this message
Curtis Hovey (sinzui) wrote :

Deryck and I talked on IRC and agree that spliting the list into group of status/importance and a group of interesting bugs would make the list easier to use.

review: Approve (ui)

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 2010-04-05 21:10:31 +0000
3+++ lib/lp/bugs/browser/bugtask.py 2010-04-16 13:05:50 +0000
4@@ -1798,6 +1798,12 @@
5 status=BugTaskStatus.NEW.title)
6
7 @property
8+ def inprogress_bugs_url(self):
9+ """A URL to a page of inprogress bugs."""
10+ return get_buglisting_search_filter_url(
11+ status=BugTaskStatus.INPROGRESS.title)
12+
13+ @property
14 def open_bugs_url(self):
15 """A URL to a list of open bugs."""
16 return canonical_url(self.context, view_name='+bugs')
17@@ -1810,6 +1816,13 @@
18 importance=BugTaskImportance.CRITICAL.title)
19
20 @property
21+ def high_bugs_url(self):
22+ """A URL to a list of high priority bugs."""
23+ return get_buglisting_search_filter_url(
24+ status=[status.title for status in UNRESOLVED_BUGTASK_STATUSES],
25+ importance=BugTaskImportance.HIGH.title)
26+
27+ @property
28 def my_bugs_url(self):
29 """A URL to a list of bugs assigned to the user, or None."""
30 if self.user is None:
31@@ -1878,11 +1891,21 @@
32 return self.context.open_bugtasks.count()
33
34 @property
35+ def inprogress_bugs_count(self):
36+ """A count of in-progress bugs."""
37+ return self.context.inprogress_bugtasks.count()
38+
39+ @property
40 def critical_bugs_count(self):
41 """A count of critical bugs."""
42 return self.context.critical_bugtasks.count()
43
44 @property
45+ def high_bugs_count(self):
46+ """A count of high priority bugs."""
47+ return self.context.high_bugtasks.count()
48+
49+ @property
50 def my_bugs_count(self):
51 """A count of bugs assigned to the user, or None."""
52 if self.user is None:
53
54=== modified file 'lib/lp/bugs/doc/bugtask-package-bugcounts.txt'
55--- lib/lp/bugs/doc/bugtask-package-bugcounts.txt 2009-06-12 16:36:02 +0000
56+++ lib/lp/bugs/doc/bugtask-package-bugcounts.txt 2010-04-16 13:05:50 +0000
57@@ -36,18 +36,21 @@
58 ... print_package_counts(package_count)
59 open: 3
60 open_critical: 0
61+ open_high: 0
62 open_inprogress: 0
63 open_unassigned: 2
64 package: mozilla-firefox (Debian)
65 <BLANKLINE>
66 open: 1
67 open_critical: 0
68+ open_high: 0
69 open_inprogress: 0
70 open_unassigned: 1
71 package: mozilla-firefox (Ubuntu)
72 <BLANKLINE>
73 open: 0
74 open_critical: 0
75+ open_high: 0
76 open_inprogress: 0
77 open_unassigned: 0
78 package: pmount (Ubuntu)
79@@ -71,6 +74,7 @@
80 >>> print_package_counts(package_counts[1])
81 open: 2
82 open_critical: 0
83+ open_high: 0
84 open_inprogress: 0
85 open_unassigned: 2
86 package: mozilla-firefox (Ubuntu)
87@@ -90,6 +94,7 @@
88 >>> print_package_counts(package_counts[1])
89 open: 2
90 open_critical: 1
91+ open_high: 0
92 open_inprogress: 0
93 open_unassigned: 2
94 package: mozilla-firefox (Ubuntu)
95@@ -105,6 +110,7 @@
96 >>> print_package_counts(package_counts[1])
97 open: 2
98 open_critical: 1
99+ open_high: 0
100 open_inprogress: 0
101 open_unassigned: 1
102 package: mozilla-firefox (Ubuntu)
103@@ -121,6 +127,7 @@
104 >>> print_package_counts(package_counts[1])
105 open: 2
106 open_critical: 1
107+ open_high: 0
108 open_inprogress: 1
109 open_unassigned: 1
110 package: mozilla-firefox (Ubuntu)
111@@ -141,6 +148,7 @@
112 >>> print_package_counts(package_counts[1])
113 open: 1
114 open_critical: 0
115+ open_high: 0
116 open_inprogress: 0
117 open_unassigned: 1
118 package: mozilla-firefox (Ubuntu)
119@@ -152,6 +160,7 @@
120 >>> print_package_counts(package_counts[1])
121 open: 2
122 open_critical: 1
123+ open_high: 0
124 open_inprogress: 1
125 open_unassigned: 1
126 package: mozilla-firefox (Ubuntu)
127@@ -168,6 +177,7 @@
128 >>> print_package_counts(package_counts[1])
129 open: 1
130 open_critical: 0
131+ open_high: 0
132 open_inprogress: 0
133 open_unassigned: 1
134 package: mozilla-firefox (Ubuntu)
135
136=== modified file 'lib/lp/bugs/interfaces/bugtarget.py'
137--- lib/lp/bugs/interfaces/bugtarget.py 2010-03-24 12:48:22 +0000
138+++ lib/lp/bugs/interfaces/bugtarget.py 2010-04-16 13:05:50 +0000
139@@ -50,6 +50,8 @@
140 closed_bugtasks = Attribute("A list of closed bugTasks for this target.")
141 inprogress_bugtasks = Attribute(
142 "A list of in-progress bugTasks for this target.")
143+ high_bugtasks = Attribute(
144+ "A list of high importance BugTasks for this target.")
145 critical_bugtasks = Attribute(
146 "A list of critical BugTasks for this target.")
147 new_bugtasks = Attribute("A list of New BugTasks for this target.")
148
149=== modified file 'lib/lp/bugs/model/bugtarget.py'
150--- lib/lp/bugs/model/bugtarget.py 2010-03-19 18:44:56 +0000
151+++ lib/lp/bugs/model/bugtarget.py 2010-04-16 13:05:50 +0000
152@@ -126,6 +126,17 @@
153 return self.searchTasks(open_tasks_query)
154
155 @property
156+ def high_bugtasks(self):
157+ """See `IHasBugs`."""
158+ high_tasks_query = BugTaskSearchParams(
159+ user=getUtility(ILaunchBag).user,
160+ importance=BugTaskImportance.HIGH,
161+ status=any(*UNRESOLVED_BUGTASK_STATUSES),
162+ omit_dupes=True)
163+
164+ return self.searchTasks(high_tasks_query)
165+
166+ @property
167 def critical_bugtasks(self):
168 """See `IHasBugs`."""
169 critical_tasks_query = BugTaskSearchParams(
170@@ -140,7 +151,8 @@
171 def inprogress_bugtasks(self):
172 """See `IHasBugs`."""
173 inprogress_tasks_query = BugTaskSearchParams(
174- user=getUtility(ILaunchBag).user, status=BugTaskStatus.INPROGRESS,
175+ user=getUtility(ILaunchBag).user,
176+ status=BugTaskStatus.INPROGRESS,
177 omit_dupes=True)
178
179 return self.searchTasks(inprogress_tasks_query)
180
181=== modified file 'lib/lp/bugs/model/bugtask.py'
182--- lib/lp/bugs/model/bugtask.py 2010-04-01 21:37:09 +0000
183+++ lib/lp/bugs/model/bugtask.py 2010-04-16 13:05:50 +0000
184@@ -2467,6 +2467,9 @@
185 sum_template % (
186 'BugTask.status %s' % search_value_to_where_condition(
187 BugTaskStatus.INPROGRESS), 'open_inprogress_bugs'),
188+ sum_template % (
189+ 'BugTask.importance %s' % search_value_to_where_condition(
190+ BugTaskImportance.HIGH), 'open_high_bugs'),
191 ]
192
193 conditions = [
194@@ -2495,7 +2498,8 @@
195 counts = []
196 for (distro_id, spn_id, open_bugs,
197 open_critical_bugs, open_unassigned_bugs,
198- open_inprogress_bugs) in shortlist(cur.fetchall()):
199+ open_inprogress_bugs,
200+ open_high_bugs) in shortlist(cur.fetchall()):
201 distribution = distribution_set.get(distro_id)
202 sourcepackagename = sourcepackagename_set.get(spn_id)
203 source_package = distribution.getSourcePackage(sourcepackagename)
204@@ -2510,6 +2514,7 @@
205 open_critical=open_critical_bugs,
206 open_unassigned=open_unassigned_bugs,
207 open_inprogress=open_inprogress_bugs,
208+ open_high=open_high_bugs,
209 )
210 counts.append(package_counts)
211
212@@ -2523,7 +2528,7 @@
213 package_counts = dict(
214 package=distribution.getSourcePackage(sourcepackagename),
215 open=0, open_critical=0, open_unassigned=0,
216- open_inprogress=0)
217+ open_inprogress=0, open_high=0)
218 counts.append(package_counts)
219
220 return counts
221
222=== modified file 'lib/lp/bugs/stories/patches-view/patches-view.txt'
223--- lib/lp/bugs/stories/patches-view/patches-view.txt 2010-04-12 15:48:06 +0000
224+++ lib/lp/bugs/stories/patches-view/patches-view.txt 2010-04-16 13:05:50 +0000
225@@ -440,56 +440,71 @@
226 ... print_bugfilters_portlet_unfilled,
227 ... print_bugfilters_portlet_filled)
228 >>> print_bugfilters_portlet_unfilled(anon_browser, 'patchy-product-1')
229+ New bugs
230 Open bugs
231+ In-progress bugs
232 Critical bugs
233+ High importance bugs
234+ <BLANKLINE>
235+ Bugs with patches
236 Bugs fixed elsewhere
237- New bugs
238 Open CVE bugs - CVE reports
239 Bugs need forwarding upstream
240- Bugs with patches
241 Subscribe to bug mail
242 --> http://bugs.launchpad.dev/patchy-product-1/+subscribe
243
244 >>> print_bugfilters_portlet_filled(anon_browser, 'patchy-product-1')
245+ 1 New bug
246 3 Open bugs
247+ 0 In-progress bugs
248 1 Critical bug
249+ 0 High importance bugs
250+ <BLANKLINE>
251+ 3 Bugs with patches
252 0 Bugs fixed elsewhere
253- 1 New bug
254 0 Open CVE bugs - CVE reports
255 3 Bugs need forwarding upstream
256- 3 Bugs with patches
257
258 It's also linked to from a portlet on the source package bugs page:
259
260 >>> print_bugfilters_portlet_filled(anon_browser, 'ubuntu/+source/a52dec')
261+ 0 New bugs
262 1 Open bug
263+ 0 In-progress bugs
264 0 Critical bugs
265+ 1 High importance bug
266+ <BLANKLINE>
267+ 1 Bug with a patch
268 1 Bug fixed elsewhere
269- 0 New bugs
270 0 Open CVE bugs
271- 1 Bug with a patch
272
273 And from a portlet on the distro series bugs page:
274
275 >>> print_bugfilters_portlet_filled(anon_browser, 'ubuntu/hoary')
276+ 2 New bugs
277 2 Open bugs
278+ 0 In-progress bugs
279 0 Critical bugs
280+ 0 High importance bugs
281+ 0 Incomplete bugs (can expire)
282+ <BLANKLINE>
283+ 1 Bug with a patch
284 0 Bugs fixed elsewhere
285- 2 New bugs
286 1 Open CVE bug - CVE report
287- 0 Incomplete bugs (can expire)
288- 1 Bug with a patch
289
290 And from a portlet on the distro bugs page:
291
292 >>> print_bugfilters_portlet_filled(anon_browser, 'ubuntu')
293+ 6 New bugs
294 9 Open bugs
295+ 0 In-progress bugs
296 0 Critical bugs
297+ 1 High importance bug
298+ 0 Incomplete bugs (can expire)
299+ <BLANKLINE>
300+ 5 Bugs with patches
301 2 Bugs fixed elsewhere
302- 6 New bugs
303 2 Open CVE bugs - CVE reports
304- 0 Incomplete bugs (can expire)
305- 5 Bugs with patches
306
307 The number of bugs with patches shown in the bugfilter stats portlet
308 might be lower than the number of bugs (bugtasks) listed on the
309
310=== modified file 'lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt'
311--- lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt 2010-03-12 07:59:29 +0000
312+++ lib/lp/bugs/stories/xx-bugs-statistics-portlet.txt 2010-04-16 13:05:50 +0000
313@@ -17,45 +17,57 @@
314 ... print_bugfilters_portlet_unfilled,
315 ... print_bugfilters_portlet_filled)
316 >>> print_bugfilters_portlet_unfilled(anon_browser, path)
317+ New bugs
318 Open bugs
319+ In-progress bugs
320 Critical bugs
321+ High importance bugs
322+ <BLANKLINE>
323+ Bugs with patches
324 Bugs fixed elsewhere
325- New bugs
326 Open CVE bugs - CVE reports
327- Bugs with patches
328 Subscribe to bug mail
329 --> http://bugs.launchpad.dev/debian/+subscribe
330
331 >>> print_bugfilters_portlet_filled(anon_browser, path)
332+ 1 New bug
333 3 Open bugs
334+ 0 In-progress bugs
335 0 Critical bugs
336+ 0 High importance bugs
337+ <BLANKLINE>
338+ 0 Bugs with patches
339 0 Bugs fixed elsewhere
340- 1 New bug
341 2 Open CVE bugs - CVE reports
342- 0 Bugs with patches
343
344 Once the user has identified him or herself, information on assigned
345 bugs is also shown.
346
347 >>> print_bugfilters_portlet_unfilled(user_browser, path)
348+ New bugs
349 Open bugs
350+ In-progress bugs
351+ Critical bugs
352+ High importance bugs
353+ <BLANKLINE>
354 Bugs assigned to me
355- Critical bugs
356+ Bugs with patches
357 Bugs fixed elsewhere
358- New bugs
359 Open CVE bugs - CVE reports
360- Bugs with patches
361 Subscribe to bug mail
362 --> http://bugs.launchpad.dev/debian/+subscribe
363
364 >>> print_bugfilters_portlet_filled(user_browser, path)
365+ 1 New bug
366 3 Open bugs
367+ 0 In-progress bugs
368+ 0 Critical bugs
369+ 0 High importance bugs
370+ <BLANKLINE>
371 0 Bugs assigned to me
372- 0 Critical bugs
373+ 0 Bugs with patches
374 0 Bugs fixed elsewhere
375- 1 New bug
376 2 Open CVE bugs - CVE reports
377- 0 Bugs with patches
378
379 The content includes a link to the distribution CVE report.
380
381@@ -71,49 +83,61 @@
382 link to review nominations.
383
384 >>> print_bugfilters_portlet_unfilled(anon_browser, path)
385+ New bugs
386 Open bugs
387+ In-progress bugs
388 Critical bugs
389+ High importance bugs
390+ <BLANKLINE>
391+ Bugs with patches
392 Bugs fixed elsewhere
393- New bugs
394 Open CVE bugs - CVE reports
395- Bugs with patches
396 Subscribe to bug mail
397 --> http://bugs.launchpad.dev/debian/woody/+subscribe
398 Review nominations
399 --> http://bugs.launchpad.dev/debian/woody/+nominations
400
401 >>> print_bugfilters_portlet_filled(anon_browser, path)
402+ 2 New bugs
403 2 Open bugs
404+ 0 In-progress bugs
405 0 Critical bugs
406+ 0 High importance bugs
407+ <BLANKLINE>
408+ 0 Bugs with patches
409 0 Bugs fixed elsewhere
410- 2 New bugs
411 1 Open CVE bug - CVE report
412- 0 Bugs with patches
413
414 Once the user has identified him or herself, information on assigned
415 bugs is also shown.
416
417 >>> print_bugfilters_portlet_unfilled(user_browser, path)
418+ New bugs
419 Open bugs
420+ In-progress bugs
421+ Critical bugs
422+ High importance bugs
423+ <BLANKLINE>
424 Bugs assigned to me
425- Critical bugs
426+ Bugs with patches
427 Bugs fixed elsewhere
428- New bugs
429 Open CVE bugs - CVE reports
430- Bugs with patches
431 Subscribe to bug mail
432 --> http://bugs.launchpad.dev/debian/woody/+subscribe
433 Review nominations
434 --> http://bugs.launchpad.dev/debian/woody/+nominations
435
436 >>> print_bugfilters_portlet_filled(user_browser, path)
437+ 2 New bugs
438 2 Open bugs
439+ 0 In-progress bugs
440+ 0 Critical bugs
441+ 0 High importance bugs
442+ <BLANKLINE>
443 0 Bugs assigned to me
444- 0 Critical bugs
445+ 0 Bugs with patches
446 0 Bugs fixed elsewhere
447- 2 New bugs
448 1 Open CVE bug - CVE report
449- 0 Bugs with patches
450
451 The content includes a link to the distribution CVE report.
452
453@@ -128,45 +152,57 @@
454 If the user is not logged-in general stats are shown.
455
456 >>> print_bugfilters_portlet_unfilled(anon_browser, path)
457+ New bugs
458 Open bugs
459+ In-progress bugs
460 Critical bugs
461+ High importance bugs
462+ <BLANKLINE>
463+ Bugs with patches
464 Bugs fixed elsewhere
465- New bugs
466 Open CVE bugs
467- Bugs with patches
468 Subscribe to bug mail
469 --> http://bugs.launchpad.dev/debian/+source/mozilla-firefox/+subscribe
470
471 >>> print_bugfilters_portlet_filled(anon_browser, path)
472+ 1 New bug
473 3 Open bugs
474+ 0 In-progress bugs
475 0 Critical bugs
476+ 0 High importance bugs
477+ <BLANKLINE>
478+ 0 Bugs with patches
479 0 Bugs fixed elsewhere
480- 1 New bug
481 2 Open CVE bugs
482- 0 Bugs with patches
483
484 Once the user has identified him or herself, information on assigned
485 bugs is also shown.
486
487 >>> print_bugfilters_portlet_unfilled(user_browser, path)
488+ New bugs
489 Open bugs
490+ In-progress bugs
491+ Critical bugs
492+ High importance bugs
493+ <BLANKLINE>
494 Bugs assigned to me
495- Critical bugs
496+ Bugs with patches
497 Bugs fixed elsewhere
498- New bugs
499 Open CVE bugs
500- Bugs with patches
501 Subscribe to bug mail
502 --> http://bugs.launchpad.dev/debian/+source/mozilla-firefox/+subscribe
503
504 >>> print_bugfilters_portlet_filled(user_browser, path)
505+ 1 New bug
506 3 Open bugs
507+ 0 In-progress bugs
508+ 0 Critical bugs
509+ 0 High importance bugs
510+ <BLANKLINE>
511 0 Bugs assigned to me
512- 0 Critical bugs
513+ 0 Bugs with patches
514 0 Bugs fixed elsewhere
515- 1 New bug
516 2 Open CVE bugs
517- 0 Bugs with patches
518
519 Note that the "CVE reports" link is not shown above; distribution
520 source packages do not have a CVE reports page.
521@@ -185,41 +221,53 @@
522 option to subscribe to bug mail.
523
524 >>> print_bugfilters_portlet_unfilled(anon_browser, path)
525+ New bugs
526 Open bugs
527+ In-progress bugs
528 Critical bugs
529+ High importance bugs
530+ <BLANKLINE>
531+ Bugs with patches
532 Bugs fixed elsewhere
533- New bugs
534 Open CVE bugs
535- Bugs with patches
536
537 >>> print_bugfilters_portlet_filled(anon_browser, path)
538+ 2 New bugs
539 2 Open bugs
540+ 0 In-progress bugs
541 0 Critical bugs
542+ 0 High importance bugs
543+ <BLANKLINE>
544+ 0 Bugs with patches
545 0 Bugs fixed elsewhere
546- 2 New bugs
547 1 Open CVE bug
548- 0 Bugs with patches
549
550 Once the user has identified him or herself, information on assigned
551 bugs is also shown.
552
553 >>> print_bugfilters_portlet_unfilled(user_browser, path)
554+ New bugs
555 Open bugs
556+ In-progress bugs
557+ Critical bugs
558+ High importance bugs
559+ <BLANKLINE>
560 Bugs assigned to me
561- Critical bugs
562+ Bugs with patches
563 Bugs fixed elsewhere
564- New bugs
565 Open CVE bugs
566- Bugs with patches
567-
568+
569 >>> print_bugfilters_portlet_filled(user_browser, path)
570+ 2 New bugs
571 2 Open bugs
572+ 0 In-progress bugs
573+ 0 Critical bugs
574+ 0 High importance bugs
575+ <BLANKLINE>
576 0 Bugs assigned to me
577- 0 Critical bugs
578+ 0 Bugs with patches
579 0 Bugs fixed elsewhere
580- 2 New bugs
581 1 Open CVE bug
582- 0 Bugs with patches
583
584 Note that the "CVE reports" link is not shown above; source packages
585 do not have a CVE reports page.
586@@ -237,45 +285,57 @@
587 If the user is not logged-in general stats are shown.
588
589 >>> print_bugfilters_portlet_unfilled(anon_browser, path)
590+ New bugs
591 Open bugs
592+ In-progress bugs
593 Critical bugs
594+ High importance bugs
595+ <BLANKLINE>
596+ Bugs with patches
597 Bugs fixed elsewhere
598- New bugs
599 Open CVE bugs
600- Bugs with patches
601 Subscribe to bug mail
602 --> http://bugs.launchpad.dev/mozilla/+subscribe
603
604 >>> print_bugfilters_portlet_filled(anon_browser, path)
605+ 4 New bugs
606 4 Open bugs
607+ 0 In-progress bugs
608 1 Critical bug
609+ 0 High importance bugs
610+ <BLANKLINE>
611+ 0 Bugs with patches
612 0 Bugs fixed elsewhere
613- 4 New bugs
614 1 Open CVE bug
615- 0 Bugs with patches
616
617 Once the user has identified him or herself, information on assigned
618 bugs is also shown.
619
620 >>> print_bugfilters_portlet_unfilled(user_browser, path)
621+ New bugs
622 Open bugs
623+ In-progress bugs
624+ Critical bugs
625+ High importance bugs
626+ <BLANKLINE>
627 Bugs assigned to me
628- Critical bugs
629+ Bugs with patches
630 Bugs fixed elsewhere
631- New bugs
632 Open CVE bugs
633- Bugs with patches
634 Subscribe to bug mail
635 --> http://bugs.launchpad.dev/mozilla/+subscribe
636
637 >>> print_bugfilters_portlet_filled(user_browser, path)
638+ 4 New bugs
639 4 Open bugs
640+ 0 In-progress bugs
641+ 1 Critical bug
642+ 0 High importance bugs
643+ <BLANKLINE>
644 0 Bugs assigned to me
645- 1 Critical bug
646+ 0 Bugs with patches
647 0 Bugs fixed elsewhere
648- 4 New bugs
649 1 Open CVE bug
650- 0 Bugs with patches
651
652 Note that the "CVE reports" link is not shown above; project groups do
653 not have a CVE reports page.
654@@ -293,45 +353,57 @@
655 If the user is not logged-in general stats are shown.
656
657 >>> print_bugfilters_portlet_unfilled(anon_browser, path)
658+ New bugs
659 Open bugs
660+ In-progress bugs
661 Critical bugs
662+ High importance bugs
663+ <BLANKLINE>
664+ Bugs with patches
665 Bugs fixed elsewhere
666- New bugs
667 Open CVE bugs - CVE reports
668- Bugs with patches
669 Subscribe to bug mail
670 --> http://bugs.launchpad.dev/firefox/+subscribe
671
672 >>> print_bugfilters_portlet_filled(anon_browser, path)
673+ 3 New bugs
674 3 Open bugs
675+ 0 In-progress bugs
676 1 Critical bug
677+ 0 High importance bugs
678+ <BLANKLINE>
679+ 0 Bugs with patches
680 0 Bugs fixed elsewhere
681- 3 New bugs
682 1 Open CVE bug - CVE report
683- 0 Bugs with patches
684
685 Once the user has identified him or herself, information on assigned
686 bugs is also shown.
687
688 >>> print_bugfilters_portlet_unfilled(user_browser, path)
689+ New bugs
690 Open bugs
691+ In-progress bugs
692+ Critical bugs
693+ High importance bugs
694+ <BLANKLINE>
695 Bugs assigned to me
696- Critical bugs
697+ Bugs with patches
698 Bugs fixed elsewhere
699- New bugs
700 Open CVE bugs - CVE reports
701- Bugs with patches
702 Subscribe to bug mail
703 --> http://bugs.launchpad.dev/firefox/+subscribe
704
705 >>> print_bugfilters_portlet_filled(user_browser, path)
706+ 3 New bugs
707 3 Open bugs
708+ 0 In-progress bugs
709+ 1 Critical bug
710+ 0 High importance bugs
711+ <BLANKLINE>
712 0 Bugs assigned to me
713- 1 Critical bug
714+ 0 Bugs with patches
715 0 Bugs fixed elsewhere
716- 3 New bugs
717 1 Open CVE bug - CVE report
718- 0 Bugs with patches
719
720
721 The content includes a link to the distribution CVE report.
722
723=== modified file 'lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt'
724--- lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt 2010-03-12 07:59:29 +0000
725+++ lib/lp/bugs/templates/bugtarget-portlet-bugfilters-content.pt 2010-04-16 13:05:50 +0000
726@@ -6,6 +6,16 @@
727 template can be rendered by a view that does not have count
728 information available.
729 </tal:comment>
730+ <tr tal:define="count view/new_bugs_count|nothing;
731+ plural string: New bugs;
732+ singular string: New bug;">
733+ <td class="bugs-count" tal:content="count" />
734+ <td class="bugs-link">
735+ <a tal:attributes="href string:${view/new_bugs_url}">
736+ <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
737+ </a>
738+ </td>
739+ </tr>
740 <tr tal:define="count view/open_bugs_count|nothing;
741 plural string: Open bugs;
742 singular string: Open bug;">
743@@ -16,6 +26,52 @@
744 </a>
745 </td>
746 </tr>
747+ <tr tal:define="count view/inprogress_bugs_count|nothing;
748+ plural string: In-progress bugs;
749+ singular string: In-progress bug;">
750+ <td class="bugs-count" tal:content="count" />
751+ <td class="bugs-link">
752+ <a tal:attributes="href view/inprogress_bugs_url">
753+ <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
754+ </a>
755+ </td>
756+ </tr>
757+ <tr tal:define="count view/critical_bugs_count|nothing;
758+ plural string: Critical bugs;
759+ singular string: Critical bug;">
760+ <td class="bugs-count" tal:content="count" />
761+ <td class="bugs-link">
762+ <a tal:attributes="href string:${view/critical_bugs_url}">
763+ <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
764+ </a>
765+ </td>
766+ </tr>
767+ <tr tal:define="count view/high_bugs_count|nothing;
768+ plural string: High importance bugs;
769+ singular string: High importance bug;">
770+ <td class="bugs-count" tal:content="count" />
771+ <td class="bugs-link">
772+ <a tal:attributes="href view/high_bugs_url">
773+ <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
774+ </a>
775+ </td>
776+ </tr>
777+ <tr tal:condition="view/expirable_bugs_url"
778+ tal:define="count view/expirable_bugs_count|nothing;
779+ plural string: Incomplete bugs;
780+ singular string: Incomplete bug;">
781+ <td class="bugs-count" tal:content="count" />
782+ <td class="bugs-link">
783+ <a tal:attributes="href string:${view/expirable_bugs_url}">
784+ <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
785+ </a>
786+ (can expire)
787+ </td>
788+ </tr>
789+ <tal:comment condition="nothing">
790+ This empty table row is used to create space between filter groups.
791+ </tal:comment>
792+ <tr><td colspan="2"><br /></td></tr>
793 <tr tal:condition="view/user"
794 tal:define="count view/my_bugs_count|nothing;
795 plural string: Bugs assigned to me;
796@@ -27,12 +83,12 @@
797 </a>
798 </td>
799 </tr>
800- <tr tal:define="count view/critical_bugs_count|nothing;
801- plural string: Critical bugs;
802- singular string: Critical bug;">
803- <td class="bugs-count" tal:content="count" />
804+ <tr tal:define="count view/bugs_with_patches_count|nothing;
805+ plural string: Bugs with patches;
806+ singular string: Bug with a patch;">
807+ <td class="bugs-count" tal:content="count"/>
808 <td class="bugs-link">
809- <a tal:attributes="href string:${view/critical_bugs_url}">
810+ <a tal:attributes="href string:${context/fmt:url}/+patches">
811 <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
812 </a>
813 </td>
814@@ -47,16 +103,6 @@
815 </a>
816 </td>
817 </tr>
818- <tr tal:define="count view/new_bugs_count|nothing;
819- plural string: New bugs;
820- singular string: New bug;">
821- <td class="bugs-count" tal:content="count" />
822- <td class="bugs-link">
823- <a tal:attributes="href string:${view/new_bugs_url}">
824- <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
825- </a>
826- </td>
827- </tr>
828 <tr tal:define="count view/open_cve_bugs_count|nothing;
829 plural string: Open CVE bugs;
830 singular string: Open CVE bug;">
831@@ -74,18 +120,6 @@
832 </span>
833 </td>
834 </tr>
835- <tr tal:condition="view/expirable_bugs_url"
836- tal:define="count view/expirable_bugs_count|nothing;
837- plural string: Incomplete bugs;
838- singular string: Incomplete bug;">
839- <td class="bugs-count" tal:content="count" />
840- <td class="bugs-link">
841- <a tal:attributes="href string:${view/expirable_bugs_url}">
842- <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
843- </a>
844- (can expire)
845- </td>
846- </tr>
847 <tr tal:condition="view/pending_bugwatches_url"
848 tal:define="count view/pending_bugwatches_count|nothing;
849 plural string: Bugs need forwarding upstream;
850@@ -97,14 +131,4 @@
851 </a>
852 </td>
853 </tr>
854- <tr tal:define="count view/bugs_with_patches_count|nothing;
855- plural string: Bugs with patches;
856- singular string: Bug with a patch;">
857- <td class="bugs-count" tal:content="count"/>
858- <td class="bugs-link">
859- <a tal:attributes="href string:${context/fmt:url}/+patches">
860- <metal:message use-macro="context/@@+base-layout-macros/plural-message"/>
861- </a>
862- </td>
863- </tr>
864 </tal:portlet-bug-filters-content>
865
866=== modified file 'lib/lp/registry/browser/person.py'
867--- lib/lp/registry/browser/person.py 2010-04-09 15:46:09 +0000
868+++ lib/lp/registry/browser/person.py 2010-04-16 13:05:50 +0000
869@@ -1858,6 +1858,7 @@
870 totals = {
871 'open_bugs_count': 0,
872 'critical_bugs_count': 0,
873+ 'high_bugs_count': 0,
874 'unassigned_bugs_count': 0,
875 'inprogress_bugs_count': 0,
876 }
877@@ -1884,6 +1885,8 @@
878 'open_bugs_url': self.getOpenBugsURL(package),
879 'critical_bugs_count': package_counts['open_critical'],
880 'critical_bugs_url': self.getCriticalBugsURL(package),
881+ 'high_bugs_count': package_counts['open_high'],
882+ 'high_bugs_url': self.getHighBugsURL(package),
883 'unassigned_bugs_count': package_counts['open_unassigned'],
884 'unassigned_bugs_url': self.getUnassignedBugsURL(package),
885 'inprogress_bugs_count': package_counts['open_inprogress'],
886@@ -1972,6 +1975,18 @@
887 distributionsourcepackage=distributionsourcepackage,
888 extra_params=critical_bugs_params)
889
890+ def getHighBugsURL(self, distributionsourcepackage):
891+ """Return the URL for high importance bugs on distributionsourcepackage."""
892+ high_bugs_params = {
893+ 'field.status': [], 'field.importance': "High"}
894+
895+ for status in UNRESOLVED_BUGTASK_STATUSES:
896+ high_bugs_params["field.status"].append(status.title)
897+
898+ return self.getBugSubscriberPackageSearchURL(
899+ distributionsourcepackage=distributionsourcepackage,
900+ extra_params=high_bugs_params)
901+
902 def getUnassignedBugsURL(self, distributionsourcepackage):
903 """Return the URL for unassigned bugs on distributionsourcepackage."""
904 unassigned_bugs_params = {
905
906=== modified file 'lib/lp/registry/configure.zcml'
907--- lib/lp/registry/configure.zcml 2010-03-30 21:32:50 +0000
908+++ lib/lp/registry/configure.zcml 2010-04-16 13:05:50 +0000
909@@ -392,6 +392,7 @@
910 open_bugtasks
911 closed_bugtasks
912 critical_bugtasks
913+ high_bugtasks
914 inprogress_bugtasks
915 unassigned_bugtasks
916 new_bugtasks
917
918=== modified file 'lib/lp/registry/model/sourcepackage.py'
919--- lib/lp/registry/model/sourcepackage.py 2010-04-13 15:12:18 +0000
920+++ lib/lp/registry/model/sourcepackage.py 2010-04-16 13:05:50 +0000
921@@ -2,7 +2,7 @@
922 # GNU Affero General Public License version 3 (see the file LICENSE).
923
924 # pylint: disable-msg=E0611,W0212
925-"""Database classes that implement SourcePacakge items."""
926+"""Database classes that implement SourcePackage items."""
927
928 __metaclass__ = type
929