Merge lp:~stevenk/launchpad/stop-lying-please into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 16637
Proposed branch: lp:~stevenk/launchpad/stop-lying-please
Merge into: lp:launchpad
Diff against target: 50 lines (+6/-7)
2 files modified
lib/lp/bugs/browser/structuralsubscription.py (+3/-4)
lib/lp/registry/browser/team.py (+3/-3)
To merge this branch: bzr merge lp:~stevenk/launchpad/stop-lying-please
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+165000@code.launchpad.net

Commit message

Fix two small lies in the structural subscription notifications and the team reassignment mail notification.

Description of the change

Fix two small lies in the structural subscription notifications and the team reassignment mail notification.

Structural subscriptions have been filtering bugs for over a year now, so only saying 'public bugs' is wrong and misleading.

No longer spoof the old owner when a team is reassigned.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
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/structuralsubscription.py'
--- lib/lp/bugs/browser/structuralsubscription.py 2012-09-17 16:13:40 +0000
+++ lib/lp/bugs/browser/structuralsubscription.py 2013-05-22 02:27:28 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009-2012 Canonical Ltd. This software is licensed under the1# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4__metaclass__ = type4__metaclass__ = type
@@ -244,14 +244,13 @@
244 self.request.response.addNotification(244 self.request.response.addNotification(
245 'You have subscribed to "%s". You will now receive an '245 'You have subscribed to "%s". You will now receive an '
246 'e-mail each time someone reports or changes one of '246 'e-mail each time someone reports or changes one of '
247 'its public bugs.' % target.displayname)247 'its bugs.' % target.displayname)
248 elif is_subscribed and not subscribe:248 elif is_subscribed and not subscribe:
249 target.removeBugSubscription(self.user, self.user)249 target.removeBugSubscription(self.user, self.user)
250 self.request.response.addNotification(250 self.request.response.addNotification(
251 'You have unsubscribed from "%s". You '251 'You have unsubscribed from "%s". You '
252 'will no longer automatically receive e-mail about '252 'will no longer automatically receive e-mail about '
253 'changes to its public bugs.'253 'changes to its bugs.' % target.displayname)
254 % target.displayname)
255 else:254 else:
256 # The subscription status did not change: nothing to do.255 # The subscription status did not change: nothing to do.
257 pass256 pass
258257
=== modified file 'lib/lp/registry/browser/team.py'
--- lib/lp/registry/browser/team.py 2013-04-10 08:09:05 +0000
+++ lib/lp/registry/browser/team.py 2013-05-22 02:27:28 +0000
@@ -1,4 +1,4 @@
1# Copyright 2009-2012 Canonical Ltd. This software is licensed under the1# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4__metaclass__ = type4__metaclass__ = type
@@ -2098,11 +2098,11 @@
2098 # proposed members they'll be made administrators of the team.2098 # proposed members they'll be made administrators of the team.
2099 if newOwner not in team.inactivemembers:2099 if newOwner not in team.inactivemembers:
2100 team.addMember(2100 team.addMember(
2101 newOwner, reviewer=oldOwner,2101 newOwner, reviewer=self.user,
2102 status=TeamMembershipStatus.ADMIN, force_team_add=True)2102 status=TeamMembershipStatus.ADMIN, force_team_add=True)
2103 if oldOwner not in team.inactivemembers:2103 if oldOwner not in team.inactivemembers:
2104 team.addMember(2104 team.addMember(
2105 oldOwner, reviewer=oldOwner,2105 oldOwner, reviewer=self.user,
2106 status=TeamMembershipStatus.ADMIN, force_team_add=True)2106 status=TeamMembershipStatus.ADMIN, force_team_add=True)
21072107
2108 # If the current logged in user cannot see the team anymore as a2108 # If the current logged in user cannot see the team anymore as a