don't show series-targetted bugs in portal for obsolete series

Bug #364712 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Deryck Hodge

Bug Description

This seems to be a new regression?

The bugs list page shows all the series on the project, but it should hide obsolete series.

Related branches

Revision history for this message
Martin Pool (mbp) wrote :
Deryck Hodge (deryck)
tags: added: series-milestone-ui
Changed in malone:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Deryck Hodge (deryck) wrote :

We should get this in our 3.0 UI updates. It's fairly easy to fix.

The following quickly-hacked-out and not-quite-perfect patch gets much of the way there:

=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py 2009-07-27 14:14:53 +0000
+++ lib/lp/bugs/browser/bugtarget.py 2009-08-14 15:05:20 +0000
@@ -1139,11 +1139,13 @@

         series_buglistings = []
         for series in serieses:
- series_buglistings.append(
- dict(
- title=series.name,
- url=canonical_url(series) + "/+bugs",
- count=series.open_bugtasks.count()))
+ series_bug_count = series.open_bugtasks.count()
+ if series_bug_count:
+ series_buglistings.append(
+ dict(
+ title=series.name,
+ url=canonical_url(series) + "/+bugs",
+ count=series_bug_count))

         return series_buglistings

=== modified file 'lib/lp/bugs/templates/bugtask-portlet-seriesbugs.pt'
--- lib/lp/bugs/templates/bugtask-portlet-seriesbugs.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/bugs/templates/bugtask-portlet-seriesbugs.pt 2009-08-14 15:11:39 +0000
@@ -3,7 +3,8 @@
   xmlns:metal="http://xml.zope.org/namespaces/metal"
   xmlns:i18n="http://xml.zope.org/namespaces/i18n"
   class="portlet" id="portlet-release-critical-bugs"
- tal:define="series_buglistings view/series_buglistings">
+ tal:define="series_buglistings view/series_buglistings"
+ tal:condition="series_buglistings">

   <h2>Series-targeted bugs</h2>

Deryck Hodge (deryck)
Changed in malone:
assignee: nobody → Deryck Hodge (deryck)
milestone: none → 2.2.8
status: Triaged → In Progress
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r9136.

Changed in malone:
status: In Progress → Fix Committed
Deryck Hodge (deryck)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.