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
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: launchpad/ mailnotificatio n.py:
* Remove two space indentation of signature
lib/canonical/
* Add trailing space to signature separator
* Remove two space indentation of signature
Tests
$ ./bin/test -vv -t specification- notifications. txt testing. layers. DatabaseFunctio nalLayer tests: testing. layers. BaseLayer in 0.003 seconds. testing. layers. DatabaseLayer in 0.452 seconds. testing. layers. FunctionalLayer in 4.370 seconds. testing. layers. DatabaseFunctio nalLayer in 0.000 seconds. blueprints/ tests/. ./doc/specifica tion-notificati ons.txt testing. layers. DatabaseFunctio nalLayer in 0.000 seconds. testing. layers. DatabaseLayer in 0.018 seconds. testing. layers. FunctionalLayer ... not supported testing. layers. BaseLayer in 0.000 seconds.
Running tests at level 1
Running canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Set up canonical.
Running:
lib/lp/
Ran 12 tests with 0 failures and 0 errors in 1.406 seconds.
Tearing down left over layers:
Tear down canonical.
Tear down canonical.
Tear down canonical.
Tear down canonical.
Demo and Q/A
* Log on as Sample Person (<email address hidden>:test) /blueprints. launchpad. dev/ubuntu/ +spec/media- integrity- check/+ subscribe
* Visit https:/
* 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
--ez_ setup-source= ez_setup. py \ base=download- cache/dist --eggs=eggs
utilities/shhh.py PYTHONPATH= python2.4 bootstrap.py\
--download-
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ mailnotificatio n.py /launchpad/ emailtemplates/ specification- modified. txt
lib/canonical
lib/canonical
diff
{{{ launchpad/ emailtemplates/ specification- modified. txt' launchpad/ emailtemplates/ specification- modified. txt 2007-07-09 08:44:46 +0000 launchpad/ emailtemplates/ specification- modified. txt 2009-11-16 02:18:50 +0000
=== modified file 'lib/canonical/
--- lib/canonical/
+++ lib/canonical/
@@ -3,5 +3,5 @@
%(info_fields)s
--
- %(spec_title)s
- %(spec_url)s
+%(spec_title)s
+%(spec_url)s
=== modified file 'lib/canonical/ launchpad/ mailnotificatio n.py' launchpad/ mailnotificatio n.py 2009-11-05 19:59:52 +0000 launchpad/ mailnotificatio n.py 2009-11-16 02:18:50 +0000
'%(blueprint_ name)s - %(blueprint_ title)s. \n\n' url)s' %
{'blueprint_ name': spec.name,
'blueprint_ title': spec.title,
'blueprint_ url': canonical_ url(spec) })
--- lib/canonical/
+++ lib/canonical/
@@ -1077,7 +1077,7 @@
body = mailwrapper.format(
'You are now subscribed to the blueprint '
- '--\n %(blueprint_url)s' %
+ '-- \n%(blueprint_
}}}