← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #770387 in Launchpad itself: "After changing the subscription option for my user, there's no notification about the change made"
  https://bugs.launchpad.net/launchpad/+bug/770387

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

This is a very simple branch to add a confirmation that we saved your personal details on the +edit page.  It is not specific to the bug that this nominally fixes because the entire page had the behavior described for the new field.

I considered constructing a more specific message about what you changed, but it would have made the confirmation message more unwieldy; it doesn't have much precedence in Launchpad, if any, to my knowledge; and the Launchpad form machinery is not currently structured in such a way as to provide information about what was changed.

Lint is happy.
-- 
https://code.launchpad.net/~gary/launchpad/bug770387/+merge/59269
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~gary/launchpad/bug770387 into lp:launchpad.
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2011-04-26 16:39:33 +0000
+++ lib/lp/registry/browser/person.py	2011-04-27 18:48:31 +0000
@@ -4223,6 +4223,8 @@
             removeSecurityProxy(self.context).name = new_name
             del data['name']
         self.updateContextFromData(data)
+        self.request.response.addInfoNotification(
+            'The changes to your personal details have been saved.')
 
 
 class PersonBrandingView(BrandingChangeView):

=== modified file 'lib/lp/registry/stories/person/xx-person-edit.txt'
--- lib/lp/registry/stories/person/xx-person-edit.txt	2011-04-26 13:57:15 +0000
+++ lib/lp/registry/stories/person/xx-person-edit.txt	2011-04-27 18:48:31 +0000
@@ -40,6 +40,9 @@
 
     >>> browser.url
     'http://launchpad.dev/~rayjay'
+    >>> ('The changes to your personal details have been saved.'
+    ...  in browser.contents)
+    True
 
 Now we check to make sure the displayname was changed and stripped.
 


Follow ups