← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~gary/launchpad/bug548 into lp:launchpad

 

Gary Poster has proposed merging lp:~gary/launchpad/bug548 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #548 Launchpad sends change notification updates to the person who requested the change
  https://bugs.launchpad.net/bugs/548

For more details, see:
https://code.launchpad.net/~gary/launchpad/bug548/+merge/48850

This branch adds a simple way to control whether you want to receive bug notifications for changes you generated.  It is as described in the first paragraph of https://dev.launchpad.net/yellow/Subscriptions#Turning%20off%20emails%20about%20your%20own%20actions .

Note that we expect this functionality to be even more important in the "Email from structural subscriptions" story, as described in the second paragraph of that text.  That is currently being mocked up and prepared for user testing.

Functionality tests already exist from previous branches.  Therefore, this branch merely shows that the widget exists and can be manipulated.

make lint was happy.

To QA, log in as a user, go to the user's "details" page, and deselect this option ("Send me bug notifications for changes I make.").  Then go to a bug to which the user is subscribed, and make a change.  Ask the LOSAs to run "cronscripts/send-bug-notifications.py -vv" and give you the output (warn them that it might be large).  In that output, verify that the user did not get a notification for the change that the user made.


-- 
https://code.launchpad.net/~gary/launchpad/bug548/+merge/48850
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~gary/launchpad/bug548 into lp:launchpad.
=== added file 'database/schema/patch-2208-38-1.sql'
--- database/schema/patch-2208-38-1.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-38-1.sql	2011-02-07 21:38:56 +0000
@@ -0,0 +1,8 @@
+SET client_min_messages=ERROR;
+
+INSERT INTO PersonSettings (person)
+    SELECT id FROM Person WHERE teamowner IS NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 38, 1);
+
+

=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2011-02-05 06:11:48 +0000
+++ lib/lp/registry/browser/person.py	2011-02-07 21:38:56 +0000
@@ -4150,7 +4150,8 @@
     """The Person 'Edit' page."""
 
     field_names = ['displayname', 'name', 'mugshot', 'homepage_content',
-                   'hide_email_addresses', 'verbose_bugnotifications']
+                   'hide_email_addresses', 'verbose_bugnotifications',
+                   'selfgenerated_bugnotifications']
     custom_widget('mugshot', ImageChangeWidget, ImageChangeWidget.EDIT_STYLE)
 
     implements(IPersonEditMenu)

=== modified file 'lib/lp/registry/stories/person/xx-person-edit.txt'
--- lib/lp/registry/stories/person/xx-person-edit.txt	2010-09-17 00:53:33 +0000
+++ lib/lp/registry/stories/person/xx-person-edit.txt	2011-02-07 21:38:56 +0000
@@ -57,21 +57,32 @@
 He will decide to make all bug notifications that are sent to him
 not include descriptions.
 
-    >>> browser.getControl("Include bug descriptions when sending me "
-    ...     "bug notifications").selected
-    True
-
-    >>> browser.getControl("Include bug descriptions when sending me "
-    ...     "bug notifications").click()
+    >>> bug_description_control = browser.getControl(
+    ...     "Include bug descriptions when sending me bug notifications")
+    >>> bug_description_control.selected
+    True
+    >>> bug_description_control.click()
+
+He will also decide to not receive bug notifications generated by his own
+actions.
+
+    >>> self_generated_control = browser.getControl(
+    ...     "Send me bug notifications for changes I make.")
+    >>> self_generated_control.selected
+    True
+    >>> self_generated_control.click()
+
     >>> browser.getControl('Save').click()
-
     >>> browser.url
     'http://launchpad.dev/~rayjay'
 
-We now check to ensure that the verbose bug notifications option was
-changed:
+We now check to ensure that the verbose bug notifications option and
+self-generated bug notification option were changed:
 
     >>> browser.open('http://launchpad.dev/~rayjay/+edit')
     >>> browser.getControl("Include bug descriptions when sending me "
     ...     "bug notifications").selected
     False
+    >>> browser.getControl(
+    ...     "Send me bug notifications for changes I make.").selected
+    False


Follow ups