Code review comment for lp:~deryck/launchpad/series-targeted-with-zero-bugs-364712

Revision history for this message
Deryck Hodge (deryck) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

= Summary =

Bug 364712 notes that the list of links in the "Series-targeted bugs" on
a project's bugs home page lists obsolete series (or series with no bugs
listed).

== Proposed fix ==

A series should not be listed if it has no open bugs.

== Pre-implementation notes ==

None

== Implementation details ==

This branch fixes that by not adding the series to the list of
series_buglistings if the series.open_bugtasks.count() is 0.

Also, the template is modified to not included the portlet if the list
is empty using a tal:condition on series_buglistings.

There are some unused import clean ups here as well, which make lint
complained about.

== Tests ==

Run the now updated test:

./bin/test -vv -t xx-portlets-bug-series.txt

== Demo and Q/A ==

Demo:
    * Go to http://bugs.launchpad.dev/firefox
    * Verify that the 1.0 series is shown, with 1 bug
    * Go to https://bugs.launchpad.dev/jokosher
    * Verify that there is no "Series-targeted bugs" section

Q/A
    * Go to https://bugs.edge.launchpad.net/bzr
    * Verify that there is no "Series-targeted bugs" section
    * Go to https://bugs.edge.launchpad.net/malone
    * Verify that only the 1.2 series is listed, with 4 bugs

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/bugs/browser/bugtarget.py
  lib/lp/bugs/templates/bugtask-portlet-seriesbugs.pt
  lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqJlvUACgkQ4glRK0DaE8jjeQCg4/m+95yKNsNRDIhGU7fj9wS+
8J4An12G6d/WvHBApXmauazYyH8VFRRa
=vvUS
-----END PGP SIGNATURE-----

« Back to merge proposal