Merge lp:~nhandler/launchpad/bugfix151113 into lp:launchpad

Proposed by Nathan Handler
Status: Merged
Approved by: Julian Edwards
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~nhandler/launchpad/bugfix151113
Merge into: lp:launchpad
Diff against target: 83 lines (+13/-13)
3 files modified
lib/canonical/launchpad/emailtemplates/specification-modified.txt (+2/-2)
lib/canonical/launchpad/mailnotification.py (+1/-1)
lib/lp/blueprints/doc/specification-notifications.txt (+10/-10)
To merge this branch: bzr merge lp:~nhandler/launchpad/bugfix151113
Reviewer Review Type Date Requested Status
Julian Edwards (community) code Approve
Review via email: mp+15225@code.launchpad.net

Commit message

The signature in blueprint notifications is no longer indented. The '--' separator also now contains a trailing space to allow mail clients to correctly identify it as a signature. Fixes bug 151113: Notification footer has unnecessary leading spaces

To post a comment you must log in.
Revision history for this message
Nathan Handler (nhandler) wrote :
Download full text (3.6 KiB)

Summary

Bug #151113 describes how there are two spacing issues in the signature of Blueprint e-mail notifications. The first issue is that the '--' separator does not have a trailing space. This causes certain e-mail clients to not recognize it as a signature. The second issue is that the text in the signature is unnecessarily indented by two spaces.

Proposed fix

Matthew Paul Thomas noted in the bug report that the indentation issue needs to be fixed in def notify_specification_subscription_created() and emailtemplates/specification-modified.txt. He also noted that the signature separator trailing space issue needs to be fixed in notify_specification_subscription_created()

Pre-implementation notes

It was agreed that the proposed fix was pretty straight-forward.

Implementation details

lib/canonical/launchpad/emailtemplates/specification-modified.txt:
  * Remove two space indentation of signature
lib/canonical/launchpad/mailnotification.py:
  * Add trailing space to signature separator
  * Remove two space indentation of signature

Tests

$ ./bin/test -vv -t specification-notifications.txt
Running tests at level 1
Running canonical.testing.layers.DatabaseFunctionalLayer tests:
  Set up canonical.testing.layers.BaseLayer in 0.003 seconds.
  Set up canonical.testing.layers.DatabaseLayer in 0.452 seconds.
  Set up canonical.testing.layers.FunctionalLayer in 4.370 seconds.
  Set up canonical.testing.layers.DatabaseFunctionalLayer in 0.000 seconds.
  Running:
 lib/lp/blueprints/tests/../doc/specification-notifications.txt
  Ran 12 tests with 0 failures and 0 errors in 1.406 seconds.
Tearing down left over layers:
  Tear down canonical.testing.layers.DatabaseFunctionalLayer in 0.000 seconds.
  Tear down canonical.testing.layers.DatabaseLayer in 0.018 seconds.
  Tear down canonical.testing.layers.FunctionalLayer ... not supported
  Tear down canonical.testing.layers.BaseLayer in 0.000 seconds.

Demo and Q/A

  * Log on as Sample Person (<email address hidden>:test)
  * Visit https://blueprints.launchpad.dev/ubuntu/+spec/media-integrity-check/+subscribe
  * Click the 'Suscribe' button
  * Verify that the spacing is correct in the email sent from Launchpad
  * Modify the blueprint
  * Verify that the spacing is correct in the email sent from Launchpad

lint

$ make lint
utilities/shhh.py PYTHONPATH= python2.4 bootstrap.py\
                --ez_setup-source=ez_setup.py \
  --download-base=download-cache/dist --eggs=eggs
= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/mailnotification.py
  lib/canonical/launchpad/emailtemplates/specification-modified.txt

diff

{{{
=== modified file 'lib/canonical/launchpad/emailtemplates/specification-modified.txt'
--- lib/canonical/launchpad/emailtemplates/specification-modified.txt 2007-07-09 08:44:46 +0000
+++ lib/canonical/launchpad/emailtemplates/specification-modified.txt 2009-11-16 02:18:50 +0000
@@ -3,5 +3,5 @@
 %(info_fields)s

 --
- %(spec_title)s
- %(spec_url)s
+%(spec_title)s
+%(spec_url)s

=== modified file 'lib/canonical/launchpad/mailnotificati...

Read more...

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Looks good, thanks for the contribution! Can you please get someone else to land it, I don't have access to my box that I use to run all the tests at the moment.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/emailtemplates/specification-modified.txt'
2--- lib/canonical/launchpad/emailtemplates/specification-modified.txt 2007-07-09 08:44:46 +0000
3+++ lib/canonical/launchpad/emailtemplates/specification-modified.txt 2009-11-24 23:05:40 +0000
4@@ -3,5 +3,5 @@
5 %(info_fields)s
6
7 --
8- %(spec_title)s
9- %(spec_url)s
10+%(spec_title)s
11+%(spec_url)s
12
13=== modified file 'lib/canonical/launchpad/mailnotification.py'
14--- lib/canonical/launchpad/mailnotification.py 2009-11-05 19:59:52 +0000
15+++ lib/canonical/launchpad/mailnotification.py 2009-11-24 23:05:40 +0000
16@@ -1077,7 +1077,7 @@
17 body = mailwrapper.format(
18 'You are now subscribed to the blueprint '
19 '%(blueprint_name)s - %(blueprint_title)s.\n\n'
20- '--\n %(blueprint_url)s' %
21+ '-- \n%(blueprint_url)s' %
22 {'blueprint_name': spec.name,
23 'blueprint_title': spec.title,
24 'blueprint_url': canonical_url(spec)})
25
26=== modified file 'lib/lp/blueprints/doc/specification-notifications.txt'
27--- lib/lp/blueprints/doc/specification-notifications.txt 2009-08-13 19:03:36 +0000
28+++ lib/lp/blueprints/doc/specification-notifications.txt 2009-11-24 23:05:40 +0000
29@@ -126,8 +126,8 @@
30 Definition Status: Drafting => Pending Approval
31 <BLANKLINE>
32 --
33- Support Native SVG Objects
34- http://blueprints.launchpad.dev/firefox/+spec/svg-support
35+ Support Native SVG Objects
36+ http://blueprints.launchpad.dev/firefox/+spec/svg-support
37 <BLANKLINE>
38
39 Whiteboard change:
40@@ -170,8 +170,8 @@
41 Another paragraph
42 <BLANKLINE>
43 --
44- Support Native SVG Objects
45- http://blueprints.launchpad.dev/firefox/+spec/svg-support
46+ Support Native SVG Objects
47+ http://blueprints.launchpad.dev/firefox/+spec/svg-support
48 <BLANKLINE>
49
50
51@@ -213,8 +213,8 @@
52 + Excellent work.
53 <BLANKLINE>
54 --
55- Support Native SVG Objects
56- http://blueprints.launchpad.dev/firefox/+spec/svg-support
57+ Support Native SVG Objects
58+ http://blueprints.launchpad.dev/firefox/+spec/svg-support
59 <BLANKLINE>
60
61 Change priority:
62@@ -246,8 +246,8 @@
63 Priority: High => Essential
64 <BLANKLINE>
65 --
66- Support Native SVG Objects
67- http://blueprints.launchpad.dev/firefox/+spec/svg-support
68+ Support Native SVG Objects
69+ http://blueprints.launchpad.dev/firefox/+spec/svg-support
70 <BLANKLINE>
71
72 Change approver, assignee and drafter:
73@@ -282,8 +282,8 @@
74 Drafter: Robert Collins => Foo Bar
75 <BLANKLINE>
76 --
77- Support Native SVG Objects
78- http://blueprints.launchpad.dev/firefox/+spec/svg-support
79+ Support Native SVG Objects
80+ http://blueprints.launchpad.dev/firefox/+spec/svg-support
81 <BLANKLINE>
82
83 If we do a change, which we don't yet support sending a notification