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

Proposed by Gary Poster
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 12339
Proposed branch: lp:~gary/launchpad/bug548
Merge into: lp:launchpad
Diff against target: 59 lines (+22/-10)
2 files modified
lib/lp/registry/browser/person.py (+2/-1)
lib/lp/registry/stories/person/xx-person-edit.txt (+20/-9)
To merge this branch: bzr merge lp:~gary/launchpad/bug548
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+48850@code.launchpad.net

Commit message

[r=gmb][bug=548] adds a simple way to control whether you want to receive bug notifications for changes you generated.

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

Note that the SQL file does not have anything to do with this branch. It will be merged into devel before PQM is reopened.

Revision history for this message
Graham Binns (gmb) :
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/registry/browser/person.py'
2--- lib/lp/registry/browser/person.py 2011-02-05 06:11:48 +0000
3+++ lib/lp/registry/browser/person.py 2011-02-08 13:47:36 +0000
4@@ -4150,7 +4150,8 @@
5 """The Person 'Edit' page."""
6
7 field_names = ['displayname', 'name', 'mugshot', 'homepage_content',
8- 'hide_email_addresses', 'verbose_bugnotifications']
9+ 'hide_email_addresses', 'verbose_bugnotifications',
10+ 'selfgenerated_bugnotifications']
11 custom_widget('mugshot', ImageChangeWidget, ImageChangeWidget.EDIT_STYLE)
12
13 implements(IPersonEditMenu)
14
15=== modified file 'lib/lp/registry/stories/person/xx-person-edit.txt'
16--- lib/lp/registry/stories/person/xx-person-edit.txt 2010-09-17 00:53:33 +0000
17+++ lib/lp/registry/stories/person/xx-person-edit.txt 2011-02-08 13:47:36 +0000
18@@ -57,21 +57,32 @@
19 He will decide to make all bug notifications that are sent to him
20 not include descriptions.
21
22- >>> browser.getControl("Include bug descriptions when sending me "
23- ... "bug notifications").selected
24- True
25-
26- >>> browser.getControl("Include bug descriptions when sending me "
27- ... "bug notifications").click()
28+ >>> bug_description_control = browser.getControl(
29+ ... "Include bug descriptions when sending me bug notifications")
30+ >>> bug_description_control.selected
31+ True
32+ >>> bug_description_control.click()
33+
34+He will also decide to not receive bug notifications generated by his own
35+actions.
36+
37+ >>> self_generated_control = browser.getControl(
38+ ... "Send me bug notifications for changes I make.")
39+ >>> self_generated_control.selected
40+ True
41+ >>> self_generated_control.click()
42+
43 >>> browser.getControl('Save').click()
44-
45 >>> browser.url
46 'http://launchpad.dev/~rayjay'
47
48-We now check to ensure that the verbose bug notifications option was
49-changed:
50+We now check to ensure that the verbose bug notifications option and
51+self-generated bug notification option were changed:
52
53 >>> browser.open('http://launchpad.dev/~rayjay/+edit')
54 >>> browser.getControl("Include bug descriptions when sending me "
55 ... "bug notifications").selected
56 False
57+ >>> browser.getControl(
58+ ... "Send me bug notifications for changes I make.").selected
59+ False