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
=== 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-24 23:05:40 +0000
@@ -3,5 +3,5 @@
3%(info_fields)s3%(info_fields)s
44
5-- 5--
6 %(spec_title)s6%(spec_title)s
7 %(spec_url)s7%(spec_url)s
88
=== modified file 'lib/canonical/launchpad/mailnotification.py'
--- lib/canonical/launchpad/mailnotification.py 2009-11-05 19:59:52 +0000
+++ lib/canonical/launchpad/mailnotification.py 2009-11-24 23:05:40 +0000
@@ -1077,7 +1077,7 @@
1077 body = mailwrapper.format(1077 body = mailwrapper.format(
1078 'You are now subscribed to the blueprint '1078 'You are now subscribed to the blueprint '
1079 '%(blueprint_name)s - %(blueprint_title)s.\n\n'1079 '%(blueprint_name)s - %(blueprint_title)s.\n\n'
1080 '--\n %(blueprint_url)s' %1080 '-- \n%(blueprint_url)s' %
1081 {'blueprint_name': spec.name,1081 {'blueprint_name': spec.name,
1082 'blueprint_title': spec.title,1082 'blueprint_title': spec.title,
1083 'blueprint_url': canonical_url(spec)})1083 'blueprint_url': canonical_url(spec)})
10841084
=== modified file 'lib/lp/blueprints/doc/specification-notifications.txt'
--- lib/lp/blueprints/doc/specification-notifications.txt 2009-08-13 19:03:36 +0000
+++ lib/lp/blueprints/doc/specification-notifications.txt 2009-11-24 23:05:40 +0000
@@ -126,8 +126,8 @@
126 Definition Status: Drafting => Pending Approval126 Definition Status: Drafting => Pending Approval
127 <BLANKLINE>127 <BLANKLINE>
128 -- 128 --
129 Support Native SVG Objects129 Support Native SVG Objects
130 http://blueprints.launchpad.dev/firefox/+spec/svg-support130 http://blueprints.launchpad.dev/firefox/+spec/svg-support
131 <BLANKLINE>131 <BLANKLINE>
132132
133Whiteboard change:133Whiteboard change:
@@ -170,8 +170,8 @@
170 Another paragraph170 Another paragraph
171 <BLANKLINE>171 <BLANKLINE>
172 -- 172 --
173 Support Native SVG Objects173 Support Native SVG Objects
174 http://blueprints.launchpad.dev/firefox/+spec/svg-support174 http://blueprints.launchpad.dev/firefox/+spec/svg-support
175 <BLANKLINE>175 <BLANKLINE>
176176
177177
@@ -213,8 +213,8 @@
213 + Excellent work.213 + Excellent work.
214 <BLANKLINE>214 <BLANKLINE>
215 -- 215 --
216 Support Native SVG Objects216 Support Native SVG Objects
217 http://blueprints.launchpad.dev/firefox/+spec/svg-support217 http://blueprints.launchpad.dev/firefox/+spec/svg-support
218 <BLANKLINE>218 <BLANKLINE>
219219
220Change priority:220Change priority:
@@ -246,8 +246,8 @@
246 Priority: High => Essential246 Priority: High => Essential
247 <BLANKLINE>247 <BLANKLINE>
248 -- 248 --
249 Support Native SVG Objects249 Support Native SVG Objects
250 http://blueprints.launchpad.dev/firefox/+spec/svg-support250 http://blueprints.launchpad.dev/firefox/+spec/svg-support
251 <BLANKLINE>251 <BLANKLINE>
252252
253Change approver, assignee and drafter:253Change approver, assignee and drafter:
@@ -282,8 +282,8 @@
282 Drafter: Robert Collins => Foo Bar282 Drafter: Robert Collins => Foo Bar
283 <BLANKLINE>283 <BLANKLINE>
284 -- 284 --
285 Support Native SVG Objects285 Support Native SVG Objects
286 http://blueprints.launchpad.dev/firefox/+spec/svg-support286 http://blueprints.launchpad.dev/firefox/+spec/svg-support
287 <BLANKLINE>287 <BLANKLINE>
288288
289If we do a change, which we don't yet support sending a notification289If we do a change, which we don't yet support sending a notification