Merge lp:~deryck/launchpad/subscribe-to-bug-mail-twice-577768 into lp:launchpad

Proposed by Deryck Hodge
Status: Merged
Approved by: Deryck Hodge
Approved revision: no longer in the source branch.
Merged at revision: 10899
Proposed branch: lp:~deryck/launchpad/subscribe-to-bug-mail-twice-577768
Merge into: lp:launchpad
Diff against target: 35 lines (+0/-10)
1 file modified
lib/lp/bugs/browser/bugtask.py (+0/-10)
To merge this branch: bzr merge lp:~deryck/launchpad/subscribe-to-bug-mail-twice-577768
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+25532@code.launchpad.net

Commit message

Remove extra "Subscribe to bug mail" link.

Description of the change

This is a fix for bug 577768, which notes that there were two 'Subscribe
to bug mail' links on certain bug listings.

This fixes that by removing the subscribe link from the
BugTaskSearchListingMenu. There is also a tiny bit of code refactor
here to remove elif sections that return () the same as the final
catch-all return.

I didn't add a test to ensure there is only one link, since that seemed
overkill to me. The existing tests continue to pass because the primary
'subscribe to bug mail' link is still there.

= 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/bugtask.py

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2010-04-26 15:45:47 +0000
+++ lib/lp/bugs/browser/bugtask.py 2010-05-18 16:40:54 +0000
@@ -2161,32 +2161,22 @@
2161 'bugsupervisor',2161 'bugsupervisor',
2162 'securitycontact',2162 'securitycontact',
2163 'cve',2163 'cve',
2164 'subscribe',
2165 )2164 )
2166 elif IDistroSeries.providedBy(bug_target):2165 elif IDistroSeries.providedBy(bug_target):
2167 return (2166 return (
2168 'cve',2167 'cve',
2169 'nominations',2168 'nominations',
2170 'subscribe',
2171 )
2172 elif IDistributionSourcePackage.providedBy(bug_target):
2173 return (
2174 'subscribe',
2175 )2169 )
2176 elif IProduct.providedBy(bug_target):2170 elif IProduct.providedBy(bug_target):
2177 return (2171 return (
2178 'bugsupervisor',2172 'bugsupervisor',
2179 'securitycontact',2173 'securitycontact',
2180 'cve',2174 'cve',
2181 'subscribe'
2182 )2175 )
2183 elif IProductSeries.providedBy(bug_target):2176 elif IProductSeries.providedBy(bug_target):
2184 return (2177 return (
2185 'nominations',2178 'nominations',
2186 'subscribe',
2187 )2179 )
2188 elif IProjectGroup.providedBy(bug_target):
2189 return ()
2190 else:2180 else:
2191 return ()2181 return ()
21922182