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
1=== modified file 'lib/lp/bugs/browser/bugtask.py'
2--- lib/lp/bugs/browser/bugtask.py 2010-04-26 15:45:47 +0000
3+++ lib/lp/bugs/browser/bugtask.py 2010-05-18 16:40:54 +0000
4@@ -2161,32 +2161,22 @@
5 'bugsupervisor',
6 'securitycontact',
7 'cve',
8- 'subscribe',
9 )
10 elif IDistroSeries.providedBy(bug_target):
11 return (
12 'cve',
13 'nominations',
14- 'subscribe',
15- )
16- elif IDistributionSourcePackage.providedBy(bug_target):
17- return (
18- 'subscribe',
19 )
20 elif IProduct.providedBy(bug_target):
21 return (
22 'bugsupervisor',
23 'securitycontact',
24 'cve',
25- 'subscribe'
26 )
27 elif IProductSeries.providedBy(bug_target):
28 return (
29 'nominations',
30- 'subscribe',
31 )
32- elif IProjectGroup.providedBy(bug_target):
33- return ()
34 else:
35 return ()
36