Merge lp:~gmb/launchpad/bug-276723 into lp:launchpad

Proposed by Graham Binns
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 11990
Proposed branch: lp:~gmb/launchpad/bug-276723
Merge into: lp:launchpad
Diff against target: 510 lines (+106/-79)
4 files modified
lib/canonical/launchpad/emailtemplates/bug-notification-verbose.txt (+5/-3)
lib/canonical/launchpad/emailtemplates/bug-notification.txt (+4/-2)
lib/lp/bugs/doc/bugnotification-sending.txt (+96/-68)
lib/lp/bugs/scripts/bugnotification.py (+1/-6)
To merge this branch: bzr merge lp:~gmb/launchpad/bug-276723
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+41952@code.launchpad.net

Commit message

[r=adeuring][ui=none][bug=276723] The bugmail footer has been reformatted to be clearer and more consistently organised.

Description of the change

This branch fixes bug 276723 by altering the formatting of the bugmail
footer. The code changes are very slight but there are a lot of doctest
changes, since the exact formatting has to be corrected over and over
and over again.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) wrote :

looks good

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/bug-notification-verbose.txt'
2--- lib/canonical/launchpad/emailtemplates/bug-notification-verbose.txt 2009-11-17 17:33:28 +0000
3+++ lib/canonical/launchpad/emailtemplates/bug-notification-verbose.txt 2010-11-26 14:08:20 +0000
4@@ -1,13 +1,15 @@
5 %(content)s
6
7 --
8-%(bug_title)s
9+%(notification_rationale)s
10 %(bug_url)s
11-%(notification_rationale)s
12+
13+Title:
14+ %(bug_title)s
15
16 %(bug_statuses)s
17
18 Bug description:
19-%(bug_description)s
20+ %(bug_description)s
21
22 %(unsubscribe_notice)s
23
24=== modified file 'lib/canonical/launchpad/emailtemplates/bug-notification.txt'
25--- lib/canonical/launchpad/emailtemplates/bug-notification.txt 2007-03-15 22:11:44 +0000
26+++ lib/canonical/launchpad/emailtemplates/bug-notification.txt 2010-11-26 14:08:20 +0000
27@@ -1,6 +1,8 @@
28 %(content)s
29
30 --
31-%(bug_title)s
32+%(notification_rationale)s
33 %(bug_url)s
34-%(notification_rationale)s
35+
36+Title:
37+ %(bug_title)s
38
39=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
40--- lib/lp/bugs/doc/bugnotification-sending.txt 2010-10-18 22:24:59 +0000
41+++ lib/lp/bugs/doc/bugnotification-sending.txt 2010-11-26 14:08:20 +0000
42@@ -85,10 +85,12 @@
43 a comment.
44 <BLANKLINE>
45 ...
46- Firefox does not support SVG
47- http://bugs.launchpad.dev/bugs/1
48 You received this bug notification because you are subscribed to
49 mozilla-firefox in ubuntu.
50+ http://bugs.launchpad.dev/bugs/1
51+ <BLANKLINE>
52+ Title:
53+ Firefox does not support SVG
54 <BLANKLINE>
55 ----------------------------------------------------------------------
56 To: mark@example.com
57@@ -99,9 +101,11 @@
58 a comment.
59 <BLANKLINE>
60 ...
61- Firefox does not support SVG
62- http://bugs.launchpad.dev/bugs/1
63 You received this bug notification because you are a bug assignee.
64+ http://bugs.launchpad.dev/bugs/1
65+ <BLANKLINE>
66+ Title:
67+ Firefox does not support SVG
68 <BLANKLINE>
69 ----------------------------------------------------------------------
70 To: support@ubuntu.com
71@@ -112,10 +116,12 @@
72 a comment.
73 <BLANKLINE>
74 --
75- Firefox does not support SVG
76- http://bugs.launchpad.dev/bugs/1
77 You received this bug notification because you are a member of Ubuntu
78 Team, which is the registrant for Ubuntu.
79+ http://bugs.launchpad.dev/bugs/1
80+ <BLANKLINE>
81+ Title:
82+ Firefox does not support SVG
83 <BLANKLINE>
84 ----------------------------------------------------------------------
85 To: test@canonical.com
86@@ -126,10 +132,12 @@
87 a comment.
88 <BLANKLINE>
89 ...
90- Firefox does not support SVG
91- http://bugs.launchpad.dev/bugs/1
92 You received this bug notification because you are a direct subscriber
93 of the bug.
94+ http://bugs.launchpad.dev/bugs/1
95+ <BLANKLINE>
96+ Title:
97+ Firefox does not support SVG
98 <BLANKLINE>
99 ----------------------------------------------------------------------
100
101@@ -197,11 +205,12 @@
102 a new comment.
103 <BLANKLINE>
104 --
105- Firefox does not support SVG
106- http://bugs.launchpad.dev/bugs/1
107 You received this bug notification because you are a member of Ubuntu
108 Team, which is the registrant for Ubuntu.
109+ http://bugs.launchpad.dev/bugs/1
110 <BLANKLINE>
111+ Title:
112+ Firefox does not support SVG
113 ----------------------------------------------------------------------
114 To: test@canonical.com
115 ...
116@@ -239,10 +248,12 @@
117 ** Visibility changed to: Private.
118 <BLANKLINE>
119 ...
120- Firefox does not support SVG
121- http://bugs.launchpad.dev/bugs/1
122 You received this bug notification because you are a member of Ubuntu
123 Team, which is the registrant for Ubuntu.
124+ http://bugs.launchpad.dev/bugs/1
125+ <BLANKLINE>
126+ Title:
127+ Firefox does not support SVG
128 <BLANKLINE>
129 ----------------------------------------------------------------------
130 To: test@canonical.com
131@@ -292,11 +303,13 @@
132 <BLANKLINE>
133 ** Visibility changed to: Public.
134 <BLANKLINE>
135- --
136- Firefox does not support SVG
137- http://bugs.launchpad.dev/bugs/1
138+ --
139 You received this bug notification because you are a member of Ubuntu
140 Team, which is the registrant for Ubuntu.
141+ http://bugs.launchpad.dev/bugs/1
142+ <BLANKLINE>
143+ Title:
144+ Firefox does not support SVG
145 ----------------------------------------------------------------------
146 To: test@canonical.com
147 ...
148@@ -323,10 +336,12 @@
149 [...,
150 '',
151 '-- ',
152- 'Firefox does not support SVG',
153+ 'You received this bug notification because you are a direct subscriber',
154+ 'of the bug.',
155 'http://bugs.launchpad.dev/bugs/1',
156- 'You received this bug notification because you are a direct subscriber',
157- 'of the bug.']
158+ '',
159+ 'Title:',
160+ ' Firefox does not support SVG']
161
162 >>> flush_notifications()
163
164@@ -418,10 +433,12 @@
165 a comment.
166 <BLANKLINE>
167 --
168- new bug
169- http://bugs.launchpad.dev/bugs/16
170 You received this bug notification because you are a member of Ubuntu
171 Team, which is the registrant for Ubuntu.
172+ http://bugs.launchpad.dev/bugs/16
173+ <BLANKLINE>
174+ Title:
175+ new bug
176 <BLANKLINE>
177 ----------------------------------------------------------------------
178 To: test@canonical.com
179@@ -435,10 +452,12 @@
180 a comment.
181 <BLANKLINE>
182 --
183- new bug
184- http://bugs.launchpad.dev/bugs/16
185 You received this bug notification because you are a direct subscriber
186 of the bug.
187+ http://bugs.launchpad.dev/bugs/16
188+ <BLANKLINE>
189+ Title:
190+ new bug
191 <BLANKLINE>
192 ----------------------------------------------------------------------
193
194@@ -615,11 +634,12 @@
195 <BLANKLINE>
196 -- =
197 <BLANKLINE>
198- Firefox does not support SVG
199- http://bugs.launchpad.dev/bugs/1
200 You received this bug notification because you are subscribed to
201 mozilla-firefox in ubuntu.
202+ http://bugs.launchpad.dev/bugs/1
203 <BLANKLINE>
204+ Title:
205+ Firefox does not support SVG
206 INFO Notifying marilize@hbd.com about bug 1.
207 ...
208 INFO Notifying mark@example.com about bug 1.
209@@ -959,10 +979,12 @@
210 a really simple comment.
211 <BLANKLINE>
212 --
213- Foo is broken
214- http://bugs.launchpad.dev/bugs/...
215 You received this bug notification because you are a direct subscriber
216 of the bug.
217+ http://bugs.launchpad.dev/bugs/...
218+ <BLANKLINE>
219+ Title:
220+ Foo is broken
221 <BLANKLINE>
222 ----------------------------------------------------------------------
223
224@@ -978,10 +1000,12 @@
225 a really simple comment.
226 <BLANKLINE>
227 --
228- Foo is broken
229- http://bugs.launchpad.dev/bugs/...
230 You received this bug notification because you are a member of Verbose
231 Team, which is a direct subscriber.
232+ http://bugs.launchpad.dev/bugs/...
233+ <BLANKLINE>
234+ Title:
235+ Foo is broken
236 <BLANKLINE>
237 ----------------------------------------------------------------------
238
239@@ -996,15 +1020,18 @@
240 a really simple comment.
241 <BLANKLINE>
242 --
243- Foo is broken
244- http://bugs.launchpad.dev/bugs/...
245 You received this bug notification because you are a direct subscriber
246 of the bug.
247- <BLANKLINE>
248- Status in Foo: New
249+ http://bugs.launchpad.dev/bugs/...
250+ <BLANKLINE>
251+ Title:
252+ Foo is broken
253+ <BLANKLINE>
254+ Status in Foo:
255+ New
256 <BLANKLINE>
257 Bug description:
258- desc
259+ desc
260 <BLANKLINE>
261 To unsubscribe from this bug, go to:
262 http://bugs.launchpad.dev/.../+bug/.../+subscribe
263@@ -1022,15 +1049,18 @@
264 a really simple comment.
265 <BLANKLINE>
266 --
267- Foo is broken
268- http://bugs.launchpad.dev/bugs/...
269 You received this bug notification because you are a member of Concise
270 Team, which is a direct subscriber.
271- <BLANKLINE>
272- Status in Foo: New
273+ http://bugs.launchpad.dev/bugs/...
274+ <BLANKLINE>
275+ Title:
276+ Foo is broken
277+ <BLANKLINE>
278+ Status in Foo:
279+ New
280 <BLANKLINE>
281 Bug description:
282- desc
283+ desc
284 <BLANKLINE>
285 ----------------------------------------------------------------------
286
287@@ -1075,18 +1105,18 @@
288 ...
289 You received this bug notification because you are subscribed to
290 mozilla-firefox in ubuntu.
291- <BLANKLINE>
292+ ...
293 ----------------------------------------------------------------------
294 To: marilize@hbd.com
295 ...
296 You received this bug notification because you are a member of ShipIt
297 Administrators, which is a direct subscriber.
298- <BLANKLINE>
299+ ...
300 ----------------------------------------------------------------------
301 To: mark@example.com
302 ...
303 You received this bug notification because you are a bug assignee.
304- <BLANKLINE>
305+ ...
306 ----------------------------------------------------------------------
307 To: no-priv@canonical.com
308 From: Sample Person <...@bugs.launchpad.net>
309@@ -1096,23 +1126,21 @@
310 another comment.
311 <BLANKLINE>
312 --
313- Firefox does not support SVG
314- http://bugs.launchpad.dev/bugs/1
315 You received this bug notification because you are subscribed to Mozilla
316 Firefox.
317- <BLANKLINE>
318+ ...
319 ----------------------------------------------------------------------
320 To: support@ubuntu.com
321 ...
322 You received this bug notification because you are a member of Ubuntu
323 Team, which is the registrant for Ubuntu.
324- <BLANKLINE>
325+ ...
326 ----------------------------------------------------------------------
327 To: test@canonical.com
328 ...
329 You received this bug notification because you are a direct subscriber
330 of the bug.
331- <BLANKLINE>
332+ ...
333 ----------------------------------------------------------------------
334
335 If Sample Person's notification level is set to METADATA, he receives
336@@ -1138,7 +1166,7 @@
337 ...
338 You received this bug notification because you are subscribed to
339 mozilla-firefox in ubuntu.
340- <BLANKLINE>
341+ ...
342 ----------------------------------------------------------------------
343 To: marilize@hbd.com
344 From: Sample Person <...@bugs.launchpad.net>
345@@ -1148,28 +1176,26 @@
346 no comment for no-priv.
347 <BLANKLINE>
348 --
349- Firefox does not support SVG
350- http://bugs.launchpad.dev/bugs/1
351 You received this bug notification because you are a member of ShipIt
352 Administrators, which is a direct subscriber.
353- <BLANKLINE>
354+ ...
355 ----------------------------------------------------------------------
356 To: mark@example.com
357 ...
358 You received this bug notification because you are a bug assignee.
359- <BLANKLINE>
360+ ...
361 ----------------------------------------------------------------------
362 To: support@ubuntu.com
363 ...
364 You received this bug notification because you are a member of Ubuntu
365 Team, which is the registrant for Ubuntu.
366- <BLANKLINE>
367+ ...
368 ----------------------------------------------------------------------
369 To: test@canonical.com
370 ...
371 You received this bug notification because you are a direct subscriber
372 of the bug.
373- <BLANKLINE>
374+ ...
375 ----------------------------------------------------------------------
376
377 The notifications generated by addChangeNotification() are sent only to
378@@ -1189,18 +1215,19 @@
379 ...
380 You received this bug notification because you are subscribed to
381 mozilla-firefox in ubuntu.
382- <BLANKLINE>
383+ http://bugs.launchpad.dev/bugs/1
384+ ...
385 ----------------------------------------------------------------------
386 To: marilize@hbd.com
387 ...
388 You received this bug notification because you are a member of ShipIt
389 Administrators, which is a direct subscriber.
390- <BLANKLINE>
391+ ...
392 ----------------------------------------------------------------------
393 To: mark@example.com
394 ...
395 You received this bug notification because you are a bug assignee.
396- <BLANKLINE>
397+ ...
398 ----------------------------------------------------------------------
399 To: no-priv@canonical.com
400 From: Sample Person <...@bugs.launchpad.net>
401@@ -1211,24 +1238,22 @@
402 <BLANKLINE>
403 ** Summary changed to: whatever.
404 <BLANKLINE>
405- --
406- Firefox does not support SVG
407- http://bugs.launchpad.dev/bugs/1
408+ --
409 You received this bug notification because you are subscribed to Mozilla
410 Firefox.
411- <BLANKLINE>
412+ ...
413 ----------------------------------------------------------------------
414 To: support@ubuntu.com
415 ...
416 You received this bug notification because you are a member of Ubuntu
417 Team, which is the registrant for Ubuntu.
418- <BLANKLINE>
419+ ...
420 ----------------------------------------------------------------------
421 To: test@canonical.com
422 ...
423 You received this bug notification because you are a direct subscriber
424 of the bug.
425- <BLANKLINE>
426+ ...
427 ----------------------------------------------------------------------
428
429 If Sample Person sets his notification level to LIFECYCLE, he receives
430@@ -1252,6 +1277,7 @@
431 ...
432 You received this bug notification because you are subscribed to
433 mozilla-firefox in ubuntu.
434+ ...
435 <BLANKLINE>
436 ----------------------------------------------------------------------
437 To: marilize@hbd.com
438@@ -1261,27 +1287,29 @@
439 <BLANKLINE>
440 ** Summary changed to: something.
441 <BLANKLINE>
442- --
443- Firefox does not support SVG
444- http://bugs.launchpad.dev/bugs/1
445+ --
446 You received this bug notification because you are a member of ShipIt
447 Administrators, which is a direct subscriber.
448+ http://bugs.launchpad.dev/bugs/1
449+ <BLANKLINE>
450+ Title:
451+ Firefox does not support SVG
452 <BLANKLINE>
453 ----------------------------------------------------------------------
454 To: mark@example.com
455 ...
456 You received this bug notification because you are a bug assignee.
457- <BLANKLINE>
458+ ...
459 ----------------------------------------------------------------------
460 To: support@ubuntu.com
461 ...
462 You received this bug notification because you are a member of Ubuntu
463 Team, which is the registrant for Ubuntu.
464- <BLANKLINE>
465+ ...
466 ----------------------------------------------------------------------
467 To: test@canonical.com
468 ...
469 You received this bug notification because you are a direct subscriber
470 of the bug.
471- <BLANKLINE>
472+ ...
473 ----------------------------------------------------------------------
474
475=== modified file 'lib/lp/bugs/scripts/bugnotification.py'
476--- lib/lp/bugs/scripts/bugnotification.py 2010-09-24 22:30:48 +0000
477+++ lib/lp/bugs/scripts/bugnotification.py 2010-11-26 14:08:20 +0000
478@@ -16,23 +16,18 @@
479 from operator import itemgetter
480
481 import transaction
482-from zope.component import getUtility
483
484-from canonical.config import config
485 from canonical.launchpad.helpers import (
486 emailPeople,
487 get_email_template,
488 )
489-from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
490 from canonical.launchpad.scripts.logger import log
491 from canonical.launchpad.webapp import canonical_url
492-from lp.bugs.interfaces.bugmessage import IBugMessageSet
493 from lp.bugs.mail.bugnotificationbuilder import (
494 BugNotificationBuilder,
495 get_bugmail_from_address,
496 )
497 from lp.bugs.mail.newbug import generate_bug_add_email
498-from lp.registry.interfaces.person import IPersonSet
499 from lp.services.mail.mailwrapper import MailWrapper
500
501
502@@ -138,7 +133,7 @@
503 email_template = 'bug-notification-verbose.txt'
504 body_data['bug_description'] = bug.description
505
506- status_base = "Status in %s: %s"
507+ status_base = "Status in %s:\n %s"
508 status_strings = []
509 for bug_task in bug.bugtasks:
510 status_strings.append(status_base % (bug_task.target.title,