Merge lp:~stevenk/launchpad/notify-when-spec-renamed-redux into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 16518
Proposed branch: lp:~stevenk/launchpad/notify-when-spec-renamed-redux
Merge into: lp:launchpad
Diff against target: 15 lines (+4/-1)
1 file modified
lib/lp/blueprints/mail/notifications.py (+4/-1)
To merge this branch: bzr merge lp:~stevenk/launchpad/notify-when-spec-renamed-redux
Reviewer Review Type Date Requested Status
William Grant code Approve
Steve Kowalik (community) code Approve
Review via email: mp+151678@code.launchpad.net

Commit message

Correctly notify by mail when a specification's name changes.

Description of the change

Turns out the change for this bug does not work, and the existing code for was enums only. I've moved it out and tested it works locally.

To post a comment you must log in.
Revision history for this message
Steve Kowalik (stevenk) :
review: Approve (code)
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
1=== modified file 'lib/lp/blueprints/mail/notifications.py'
2--- lib/lp/blueprints/mail/notifications.py 2013-03-04 06:11:42 +0000
3+++ lib/lp/blueprints/mail/notifications.py 2013-03-05 04:35:24 +0000
4@@ -36,7 +36,10 @@
5 subject = specification_notification_subject(spec)
6 indent = ' ' * 4
7 info_lines = []
8- for dbitem_name in ('name', 'definition_status', 'priority'):
9+ if spec_delta.name:
10+ info_lines.append('%sname: %s => %s' % (
11+ indent, spec_delta.name['old'], spec_delta.name['new']))
12+ for dbitem_name in ('definition_status', 'priority'):
13 title = ISpecification[dbitem_name].title
14 assert ISpecification[dbitem_name].required, (
15 "The mail notification assumes %s can't be None" % dbitem_name)