← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~sinzui/launchpad/bug-supervisor-docs-0 into lp:launchpad

 

Curtis Hovey has proposed merging lp:~sinzui/launchpad/bug-supervisor-docs-0 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #217337 in Launchpad itself: "Documentation says Bug supervisors are subscribed to all bug reports"
  https://bugs.launchpad.net/launchpad/+bug/217337

For more details, see:
https://code.launchpad.net/~sinzui/launchpad/bug-supervisor-docs-0/+merge/70651

iUpdate documentation to explain how the bug supervisor is getting bug mail.

    Launchpad bug: https://bugs.launchpad.net/bugs/217337
    Pre-implementation: teal squad

This bug was reported when the bug supervisor was automatically subscribed to
bugs. This is no longer the case, but documentation still says that this so.
https://help.launchpad.net/BugSupervisors
https://help.launchpad.net/Bugs/Subscriptions
IHasBugSupervisor docstrings.

When a user or team is set as the bug supervisor, a structural subscription
is created and it can be changed to restrict kinds of notifications that
are sent

--------------------------------------------------------------------

RULES

    * Update the wiki pages to explain the bug mail subscription.
    * Update The interface to explain that bug mail can be changed.
    * Add a notice with a link to change bug mail that is shown when
      the bug supervisor is set.


QA

    * Visit a project you manage and choose to change the bug supervisor.
    * Verify that the form states that the bug supervisor can change the
      bug mail rules.
    * Set someone to the role.
    * Verify a notice is shown explaining that the bug mail can be changed.
    * Follow the link in the notice and verify you are shown the subscription.


LINT

    lib/lp/bugs/browser/bugsupervisor.py
    lib/lp/bugs/browser/tests/test_bugsupervisor.py
    lib/lp/bugs/interfaces/bugsupervisor.py


TEST

    ./bin/test -vv lp.bugs.browser.tests.test_bugsupervisor


IMPLEMENTATION

Added a notice with a link to the bug subscription.
    lib/lp/bugs/browser/bugsupervisor.py
    lib/lp/bugs/browser/tests/test_bugsupervisor.py

Updated the the documentation in the interface
    lib/lp/bugs/interfaces/bugsupervisor.py
-- 
https://code.launchpad.net/~sinzui/launchpad/bug-supervisor-docs-0/+merge/70651
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/bug-supervisor-docs-0 into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/bugsupervisor.py'
--- lib/lp/bugs/browser/bugsupervisor.py	2010-08-20 20:31:18 +0000
+++ lib/lp/bugs/browser/bugsupervisor.py	2011-08-06 15:28:33 +0000
@@ -16,6 +16,7 @@
     action,
     LaunchpadEditFormView,
     )
+from canonical.launchpad.webapp.menu import structured
 from canonical.launchpad.webapp.publisher import canonical_url
 from lp.bugs.browser.bugrole import BugRoleMixin
 from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
@@ -69,6 +70,13 @@
         bug_supervisor = data['bug_supervisor']
         self.changeBugSupervisor(bug_supervisor)
         if bug_supervisor is None:
-            self.request.response.addNotification(
+            message = (
                 "Successfully cleared the bug supervisor. "
                 "You can set the bug supervisor again at any time.")
+        else:
+            message = structured(
+                'A bug mail subscription was created for the bug supervisor. '
+                'You can <a href="%s/+subscriptions">edit bug mail</a> '
+                'to change which notifications will be sent.',
+                canonical_url(self.context))
+        self.request.response.addNotification(message)

=== modified file 'lib/lp/bugs/browser/tests/test_bugsupervisor.py'
--- lib/lp/bugs/browser/tests/test_bugsupervisor.py	2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/browser/tests/test_bugsupervisor.py	2011-08-06 15:28:33 +0000
@@ -64,7 +64,12 @@
         self.assertEqual([], view.errors)
         self.assertEqual(self.product.bug_supervisor, self.owner)
         notifications = view.request.response.notifications
-        self.assertEqual(0, len(notifications))
+        self.assertEqual(1, len(notifications))
+        expected = (
+            'A bug mail subscription was created for the bug supervisor. '
+            'You can <a href="http://launchpad.dev/boing/+subscriptions";>'
+            'edit bug mail</a> to change which notifications will be sent.')
+        self.assertEqual(expected, notifications.pop().message)
 
     def test_owner_appoint_self_from_another(self):
         self.product.setBugSupervisor(self.team, self.owner)

=== modified file 'lib/lp/bugs/interfaces/bugsupervisor.py'
--- lib/lp/bugs/interfaces/bugsupervisor.py	2011-03-23 13:51:39 +0000
+++ lib/lp/bugs/interfaces/bugsupervisor.py	2011-08-06 15:28:33 +0000
@@ -33,10 +33,9 @@
         title=_("Bug Supervisor"),
         description=_(
             "The Launchpad id of the person or team (preferred) responsible "
-            "for bug management.  The bug supervisor will be subscribed to "
-            "all bugs and will receive email about all activity on all bugs "
-            "for this project, so that should be a factor in your decision.  "
-            "The bug supervisor will also have access to all private bugs."),
+            "for bug management. Mail about all bug activity will be sent to "
+            "the supervisor by default. The bug supervisor can change the "
+            "bug mail rules to limit the volume of email."),
         required=False, vocabulary='ValidPersonOrTeam', readonly=True))
 
     @mutator_for(bug_supervisor)