Merge lp:~adeuring/launchpad/bug-588276 into lp:launchpad

Proposed by Abel Deuring
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 11018
Proposed branch: lp:~adeuring/launchpad/bug-588276
Merge into: lp:launchpad
Diff against target: 524 lines (+343/-11)
9 files modified
lib/lp/bugs/browser/bugtarget.py (+45/-1)
lib/lp/bugs/browser/tests/test_bugtarget_configure.py (+5/-1)
lib/lp/bugs/browser/tests/test_bugtarget_filebug.py (+264/-0)
lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt (+18/-2)
lib/lp/registry/browser/distribution.py (+2/-1)
lib/lp/registry/browser/distributionsourcepackage.py (+1/-0)
lib/lp/registry/browser/project.py (+3/-2)
lib/lp/registry/browser/tests/distribution-views.txt (+4/-3)
lib/lp/registry/browser/tests/distributionsourcepackage-views.txt (+1/-1)
To merge this branch: bzr merge lp:~adeuring/launchpad/bug-588276
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+27606@code.launchpad.net

Description of the change

This branch fixes bug 588276: "Enable use of bug_reported_acknowledgement in web UI"

It adds the field bug_reported_acknowledgement to edit forms for IDistribution, IDistributionSourcePackage, IProduct, IProjectGroup; FileBugViewBase.submit_bug_action() now tries to retrieve the bug filing acknowledgement message from the bug target and its parents. This is done in the new method getAcknowledgementMessage().

The property bug_reported_acknowledgement is defined for all bug targets, but only the four bug target types IDistribution, IDistributionSourcePackage, IProduct, IProjectGroup have database columns for it; other bug targets (IProductSeries, IDistroSeries, ISourcePackage) inherit it from their parents.

This acquisition logic is fine, but it ignores the case that a customized message is defined for a project group but not for a project within the project group, or for a distribution but not for DistributionSourcePackage. We should show in this case not the standard messae, but the message defined for the project group or the distribution, respectively.

Hence I duplicated/generalized the "acquisition logic" in the browser class method getAcknowledgementmessage() so that it works for DSP -> distribtuion and product -> project group too.

tests:

bin/test -t test_bugtarget_filebug (for getAcknowledgementmessage())
bin/test -t xx-bug-reporting-guidelines.txt (changes edit forms; shows that the notification shown in the web UI when a bug has been filed is customnizable).

no lint

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) wrote :

> + "bug_reported_acknowledgement",
> ]
> custom_widget('bugtracker', ProductBugTrackerWidget)
>
> @@ -443,7 +446,7 @@
> else:
> private = False
>
> - notifications = ["Thank you for your bug report."]
> + notifications = [self.getAcknowledgementMessage(self.context)]
> params = CreateBugParams(
> title=title, comment=comment, owner=self.user,
> security_related=security_related, private=private,
> @@ -775,6 +778,47 @@
> })
> return guidelines
>
> + default_bug_reported_acknowledgement = "Thank you for your bug report."
> +
> + def getAcknowledgementMessage(self, context):
> + """An acknowlegement message displayed to the user."""
> + # If a given context has not a custom message, we go up in the

Minor grammatical nit pick: "does not have a" reads better than "has not a".

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/bugs/browser/bugtarget.py'
2--- lib/lp/bugs/browser/bugtarget.py 2010-06-08 10:36:00 +0000
3+++ lib/lp/bugs/browser/bugtarget.py 2010-06-16 08:24:32 +0000
4@@ -120,6 +120,8 @@
5 remote_product = copy_field(IProduct['remote_product'])
6 bug_reporting_guidelines = copy_field(
7 IBugTarget['bug_reporting_guidelines'])
8+ bug_reported_acknowledgement = copy_field(
9+ IBugTarget['bug_reported_acknowledgement'])
10
11
12 def product_to_productbugconfiguration(product):
13@@ -141,6 +143,7 @@
14 "enable_bug_expiration",
15 "remote_product",
16 "bug_reporting_guidelines",
17+ "bug_reported_acknowledgement",
18 ]
19 custom_widget('bugtracker', ProductBugTrackerWidget)
20
21@@ -443,7 +446,7 @@
22 else:
23 private = False
24
25- notifications = ["Thank you for your bug report."]
26+ notifications = [self.getAcknowledgementMessage(self.context)]
27 params = CreateBugParams(
28 title=title, comment=comment, owner=self.user,
29 security_related=security_related, private=private,
30@@ -775,6 +778,47 @@
31 })
32 return guidelines
33
34+ default_bug_reported_acknowledgement = "Thank you for your bug report."
35+
36+ def getAcknowledgementMessage(self, context):
37+ """An acknowlegement message displayed to the user."""
38+ # If a given context doesnot have a custom message, we go up in the
39+ # "object hierachy" until we find one. If no cusotmized messages
40+ # exist for any conext, a default message is returned.
41+ #
42+ # bug_reported_acknowledgement is defined as a "real" property
43+ # for IDistribution, IDistributionSourcePackage, IProduct and
44+ # IProjectGroup. Other IBugTarget implementations inherit this
45+ # property from their parents. For these classes, we can directly
46+ # try to find a custom message farther up in the hierarchy.
47+ message = context.bug_reported_acknowledgement
48+ if message is not None and len(message.strip()) > 0:
49+ return message
50+ next_context = None
51+ if IProductSeries.providedBy(context):
52+ # we don't need to look at
53+ # context.product.bug_reported_acknowledgement because a
54+ # product series inherits this property from the product.
55+ next_context = context.product.project
56+ elif IProduct.providedBy(context):
57+ next_context = context.project
58+ elif IDistributionSourcePackage.providedBy(context):
59+ next_context = context.distribution
60+ # IDistroseries and ISourcePackage inherit
61+ # bug_reported_acknowledgement from their IDistribution, so we
62+ # don't need to look up this property in IDistribution.
63+ # IDistribution and IProjectGroup don't have any parents.
64+ elif (IDistribution.providedBy(context) or
65+ IProjectGroup.providedBy(context) or
66+ IDistroSeries.providedBy(context) or
67+ ISourcePackage.providedBy(context)):
68+ pass
69+ else:
70+ raise TypeError("Unexpected bug target: %r" % context)
71+ if next_context is not None:
72+ return self.getAcknowledgementMessage(next_context)
73+ return self.default_bug_reported_acknowledgement
74+
75 @cachedproperty
76 def extra_data_processing_job(self):
77 """Return the ProcessApportBlobJob for a given BLOB token."""
78
79=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_configure.py'
80--- lib/lp/bugs/browser/tests/test_bugtarget_configure.py 2010-05-26 18:52:31 +0000
81+++ lib/lp/bugs/browser/tests/test_bugtarget_configure.py 2010-06-16 08:24:32 +0000
82@@ -31,6 +31,7 @@
83 'field.enable_bug_expiration': 'on',
84 'field.remote_product': 'sf-boing',
85 'field.bug_reporting_guidelines': 'guidelines',
86+ 'field.bug_reported_acknowledgement': 'acknowledgement message',
87 'field.actions.change': 'Change',
88 }
89
90@@ -42,7 +43,7 @@
91 fields = [
92 'bug_supervisor', 'security_contact', 'bugtracker',
93 'enable_bug_expiration', 'remote_product',
94- 'bug_reporting_guidelines']
95+ 'bug_reporting_guidelines', 'bug_reported_acknowledgement']
96 self.assertEqual(fields, view.field_names)
97 self.assertEqual('http://launchpad.dev/boing', view.next_url)
98 self.assertEqual('http://launchpad.dev/boing', view.cancel_url)
99@@ -61,6 +62,9 @@
100 self.assertTrue(self.product.enable_bug_expiration)
101 self.assertEqual('sf-boing', self.product.remote_product)
102 self.assertEqual('guidelines', self.product.bug_reporting_guidelines)
103+ self.assertEqual(
104+ 'acknowledgement message',
105+ self.product.bug_reported_acknowledgement)
106
107 def test_bug_supervisor_invalid(self):
108 # Verify that invalid bug_supervisor states are reported.
109
110=== added file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py'
111--- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 1970-01-01 00:00:00 +0000
112+++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2010-06-16 08:24:32 +0000
113@@ -0,0 +1,264 @@
114+# Copyright 2010 Canonical Ltd. This software is licensed under the
115+# GNU Affero General Public License version 3 (see the file LICENSE).
116+
117+__metaclass__ = type
118+
119+
120+import unittest
121+
122+from canonical.launchpad.ftests import login
123+from canonical.launchpad.webapp.servers import LaunchpadTestRequest
124+from canonical.testing import LaunchpadFunctionalLayer
125+
126+from lp.bugs.browser.bugtarget import FileBugInlineFormView
127+from lp.testing import login_person, TestCaseWithFactory
128+from lp.testing.views import create_initialized_view
129+
130+class TestBugTargetFileBugConfirmationMessage(TestCaseWithFactory):
131+
132+ layer = LaunchpadFunctionalLayer
133+
134+ def setUp(self):
135+ super(TestBugTargetFileBugConfirmationMessage, self).setUp()
136+ login('foo.bar@canonical.com')
137+ self.product = self.factory.makeProduct()
138+
139+ def test_getAcknowledgementMessage_product(self):
140+ # If there is not customized confirmation message, a default
141+ # message is displayed.
142+ product = self.factory.makeProduct()
143+ view = FileBugInlineFormView(product, LaunchpadTestRequest())
144+ self.assertEqual(
145+ u"Thank you for your bug report.",
146+ view.getAcknowledgementMessage(product))
147+
148+ # If a product contains a customized bug filing confirmation
149+ # message, it is retrieved by
150+ # FilebugViewBase.bug_reported_acknowledgement
151+ product.bug_reported_acknowledgement = (
152+ u"We really appreciate your bug report")
153+ view = FileBugInlineFormView(product, LaunchpadTestRequest())
154+ self.assertEqual(
155+ u"We really appreciate your bug report",
156+ view.getAcknowledgementMessage(product))
157+
158+ # If the custom message is set to a string containing only white,
159+ # space, the default message is used again.
160+ product.bug_reported_acknowledgement = ' \t'
161+ view = FileBugInlineFormView(product, LaunchpadTestRequest())
162+ self.assertEqual(
163+ u"Thank you for your bug report.",
164+ view.getAcknowledgementMessage(product))
165+
166+ def test_getAcknowledgementMessage_product_in_project_group(self):
167+ # If a product is part of a project group and if the project
168+ # group has a customized bug filing confirmation message,
169+ # this message is displayed.
170+ project_group = self.factory.makeProject()
171+ product = self.factory.makeProduct(project=project_group)
172+
173+ # Without any customized bug filing confirmation message, the
174+ # default message is used.
175+ view = FileBugInlineFormView(product, LaunchpadTestRequest())
176+ self.assertEqual(
177+ u"Thank you for your bug report.",
178+ view.getAcknowledgementMessage(product))
179+
180+ # If the project group has a customized message, it is used.
181+ project_group.bug_reported_acknowledgement = (
182+ "Thanks for filing a bug for one of our many products.")
183+ view = FileBugInlineFormView(product, LaunchpadTestRequest())
184+ self.assertEqual(
185+ u"Thanks for filing a bug for one of our many products.",
186+ view.getAcknowledgementMessage(product))
187+
188+ # But if the product itself has a customized message too, this
189+ # message is used instead of the project group's message.
190+ product.bug_reported_acknowledgement = (
191+ u"Thanks for filing a bug for this very special product.")
192+ view = FileBugInlineFormView(product, LaunchpadTestRequest())
193+ self.assertEqual(
194+ u"Thanks for filing a bug for this very special product.",
195+ view.getAcknowledgementMessage(product))
196+
197+ def test_getAcknowledgementMessage_product_series(self):
198+ # If there is not customized confirmation message, a default
199+ # message is displayed.
200+ product_series = self.factory.makeProductSeries()
201+ view = FileBugInlineFormView(product_series, LaunchpadTestRequest())
202+ self.assertEqual(
203+ u"Thank you for your bug report.",
204+ view.getAcknowledgementMessage(product_series))
205+
206+ # If a product contains a customized bug filing confirmation
207+ # message, it is retrieved for a product series context by
208+ # FilebugViewBase.bug_reported_acknowledgement
209+ product_series.product.bug_reported_acknowledgement = (
210+ u"We really appreciate your bug report")
211+ view = FileBugInlineFormView(product_series, LaunchpadTestRequest())
212+ self.assertEqual(
213+ u"We really appreciate your bug report",
214+ view.getAcknowledgementMessage(product_series))
215+
216+ def test_getAcknowledgementMessage_product_series_in_project_group(self):
217+ # If a product_series is part of a project group and if the project
218+ # group has a customized bug filing confirmation message,
219+ # this message is displayed.
220+ project_group = self.factory.makeProject()
221+ product = self.factory.makeProduct(project=project_group)
222+ product_series = self.factory.makeProductSeries(product=product)
223+
224+ # Without any customized bug filing confirmation message, the
225+ # default message is used.
226+ view = FileBugInlineFormView(product_series, LaunchpadTestRequest())
227+ self.assertEqual(
228+ u"Thank you for your bug report.",
229+ view.getAcknowledgementMessage(product_series))
230+
231+ # If the project group has a customized message, it is used.
232+ project_group.bug_reported_acknowledgement = (
233+ u"Thanks for filing a bug for one of our many product_seriess.")
234+ view = FileBugInlineFormView(product_series, LaunchpadTestRequest())
235+ self.assertEqual(
236+ u"Thanks for filing a bug for one of our many product_seriess.",
237+ view.getAcknowledgementMessage(product_series))
238+
239+ # But if the product has a customized message too, this
240+ # message is used instead of the project group's message.
241+ product.bug_reported_acknowledgement = (
242+ u"Thanks for filing a bug for this very special product.")
243+ view = FileBugInlineFormView(product_series, LaunchpadTestRequest())
244+ self.assertEqual(
245+ u"Thanks for filing a bug for this very special product.",
246+ view.getAcknowledgementMessage(product_series))
247+
248+ def test_getAcknowledgementMessage_distribution(self):
249+ # If there is not customized confirmation message, a default
250+ # message is displayed.
251+ distribution = self.factory.makeDistribution()
252+ view = FileBugInlineFormView(distribution, LaunchpadTestRequest())
253+ self.assertEqual(
254+ u"Thank you for your bug report.",
255+ view.getAcknowledgementMessage(distribution))
256+
257+ # If a distribution contains a customized bug filing confirmation
258+ # message, it is retrieved by
259+ # FilebugViewBase.bug_reported_acknowledgement
260+ distribution.bug_reported_acknowledgement = (
261+ u"We really appreciate your bug report")
262+ view = FileBugInlineFormView(distribution, LaunchpadTestRequest())
263+ self.assertEqual(
264+ u"We really appreciate your bug report",
265+ view.getAcknowledgementMessage(distribution))
266+
267+ def test_getAcknowledgementMessage_distroseries(self):
268+ # If there is not customized confirmation message, a default
269+ # message is displayed.
270+ distroseries = self.factory.makeDistroSeries()
271+ view = FileBugInlineFormView(distroseries, LaunchpadTestRequest())
272+ self.assertEqual(
273+ u"Thank you for your bug report.",
274+ view.getAcknowledgementMessage(distroseries))
275+
276+ # DistroSeries objects do not have their own, independent
277+ # property bug_reported_acknowledgement; instead, it is
278+ # acquired from the parent distribution.
279+ distroseries.distribution.bug_reported_acknowledgement = (
280+ u"We really appreciate your bug report")
281+ view = FileBugInlineFormView(distroseries, LaunchpadTestRequest())
282+ self.assertEqual(
283+ u"We really appreciate your bug report",
284+ view.getAcknowledgementMessage(distroseries))
285+
286+ def test_getAcknowledgementMessage_sourcepackage(self):
287+ # If there is not customized confirmation message, a default
288+ # message is displayed.
289+ sourcepackage = self.factory.makeSourcePackage()
290+ view = FileBugInlineFormView(sourcepackage, LaunchpadTestRequest())
291+ self.assertEqual(
292+ u"Thank you for your bug report.",
293+ view.getAcknowledgementMessage(sourcepackage))
294+
295+ # SourcePackage objects do not have their own, independent
296+ # property bug_reported_acknowledgement; instead, it is
297+ # acquired from the parent distribution.
298+ sourcepackage.distribution.bug_reported_acknowledgement = (
299+ u"We really appreciate your bug report")
300+ view = FileBugInlineFormView(sourcepackage, LaunchpadTestRequest())
301+ self.assertEqual(
302+ u"We really appreciate your bug report",
303+ view.getAcknowledgementMessage(sourcepackage))
304+
305+ def test_getAcknowledgementMessage_distributionsourcepackage(self):
306+ # If there is not customized confirmation message, a default
307+ # message is displayed.
308+ dsp = self.factory.makeDistributionSourcePackage()
309+ view = FileBugInlineFormView(dsp, LaunchpadTestRequest())
310+ self.assertEqual(
311+ u"Thank you for your bug report.",
312+ view.getAcknowledgementMessage(dsp))
313+
314+ # If a custom message is defined for a DSP, it is used instead of
315+ # the default message.
316+ dsp.bug_reported_acknowledgement = (
317+ u"We really appreciate your bug report")
318+ view = FileBugInlineFormView(dsp, LaunchpadTestRequest())
319+ self.assertEqual(
320+ u"We really appreciate your bug report",
321+ view.getAcknowledgementMessage(dsp))
322+
323+ def test_getAcknowledgementMessage_dsp_custom_distro_message(self):
324+ # If a distribution has a customized conformatom message, it
325+ # is used for bugs filed on DsitributionSourcePackages.
326+ dsp = self.factory.makeDistributionSourcePackage()
327+ dsp.distribution.bug_reported_acknowledgement = (
328+ u"Thank you for filing a bug in our distribution")
329+ view = FileBugInlineFormView(dsp, LaunchpadTestRequest())
330+ self.assertEqual(
331+ u"Thank you for filing a bug in our distribution",
332+ view.getAcknowledgementMessage(dsp))
333+
334+ # Bug if a custom message is defined for a DSP, it is used instead of
335+ # the message for the distribution.
336+ dsp.bug_reported_acknowledgement = (
337+ u"Thank you for filing a bug for this DSP")
338+ view = FileBugInlineFormView(dsp, LaunchpadTestRequest())
339+ self.assertEqual(
340+ u"Thank you for filing a bug for this DSP",
341+ view.getAcknowledgementMessage(dsp))
342+
343+ def test_bug_filed_acknowlegdgement_notification(self):
344+ # When a user files a bug, an acknowledgement notification is added
345+ # to the response.
346+ product = self.factory.makeProduct()
347+ login_person(product.owner)
348+ view = FileBugInlineFormView(product, LaunchpadTestRequest())
349+ form_data = {
350+ 'title': 'A bug title',
351+ 'comment': 'whatever',
352+ }
353+ view = create_initialized_view(product, name='+filebug')
354+ view.submit_bug_action.success(form_data)
355+ self.assertEqual(
356+ ["Thank you for your bug report."],
357+ [notification.message
358+ for notification in view.request.response.notifications])
359+
360+ # This message can be customized.
361+ product.bug_reported_acknowledgement = (
362+ u"We really appreciate your bug report")
363+ view = create_initialized_view(product, name='+filebug')
364+ view.submit_bug_action.success(form_data)
365+ self.assertEqual(
366+ [u"We really appreciate your bug report"],
367+ [notification.message
368+ for notification in view.request.response.notifications])
369+
370+def test_suite():
371+ suite = unittest.TestSuite()
372+ suite.addTest(unittest.makeSuite(TestBugTargetFileBugConfirmationMessage))
373+ return suite
374+
375+
376+if __name__ == '__main__':
377+ unittest.TextTestRunner().run(test_suite())
378
379=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt'
380--- lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt 2010-03-16 22:07:45 +0000
381+++ lib/lp/bugs/stories/guided-filebug/xx-bug-reporting-guidelines.txt 2010-06-16 08:24:32 +0000
382@@ -1,7 +1,9 @@
383-= Bug Reporting Guidelines =
384+= Bug Reporting Guidelines and acknowledgement messages =
385
386 Some helpful explanatory text - guidelines - can be set for
387-distributions, product groups, products, and source packages.
388+distributions, product groups, products, and source packages, as wel
389+as an acknowledgement message that is displayed when a bug has been
390+filed.
391
392 >>> contexts = [
393 ... ('Ubuntu', 'ubuntu', '+edit'),
394@@ -16,6 +18,9 @@
395 ... admin_browser.getControl(
396 ... name='field.bug_reporting_guidelines').value = (
397 ... "The version of %s you're using." % (context_name,))
398+ ... admin_browser.getControl(
399+ ... name='field.bug_reported_acknowledgement').value = (
400+ ... "Thank you for filing a bug for %s" % context_name)
401 ... if context_path == 'ubuntu':
402 ... admin_browser.getControl('Change', index=3).click()
403 ... else:
404@@ -30,6 +35,9 @@
405 ... print ' <%s>' % user_browser.url
406 ... print extract_text(find_tag_by_id(
407 ... user_browser.contents, 'bug-reporting-guidelines'))
408+ >>> def print_acknowledgement_message(browser):
409+ ... print extract_text(find_tags_by_class(
410+ ... user_browser.contents, 'informational message')[0])
411
412 >>> for context_name, context_path, view in contexts:
413 ... filebug_url = (
414@@ -49,22 +57,29 @@
415 ... user_browser.open(filebug_url)
416 ... user_browser.getControl('Summary').value = "It doesn't work"
417 ... user_browser.getControl('Continue').click()
418+ ... user_browser.getControl('Further information').value = (
419+ ... 'please help!')
420 ... print_guidelines(context_name, user_browser)
421+ ... user_browser.getControl('Submit Bug Report').click()
422+ ... print_acknowledgement_message(user_browser)
423 *
424 Ubuntu
425 <http://launchpad.dev/ubuntu/+filebug>
426 Ubuntu guidelines:
427 The version of Ubuntu you're using.
428+ Thank you for filing a bug for Ubuntu
429 *
430 Mozilla
431 <http://launchpad.dev/mozilla/+filebug>
432 The Mozilla Project guidelines:
433 The version of Mozilla you're using.
434+ Thank you for filing a bug for Mozilla
435 *
436 Firefox
437 <http://launchpad.dev/firefox/+filebug>
438 Mozilla Firefox guidelines:
439 The version of Firefox you're using.
440+ Thank you for filing a bug for Firefox
441 *
442 alsa-utils in Ubuntu
443 <http://launchpad.dev/ubuntu/+source/alsa-utils/+filebug>
444@@ -72,6 +87,7 @@
445 The version of alsa-utils in Ubuntu you're using.
446 Ubuntu guidelines:
447 The version of Ubuntu you're using.
448+ Thank you for filing a bug for alsa-utils in Ubuntu
449
450 Note how the alsa-utils in Ubuntu specific guidelines were displayed
451 followed by the general Ubuntu guidelines.
452
453=== modified file 'lib/lp/registry/browser/distribution.py'
454--- lib/lp/registry/browser/distribution.py 2010-05-14 08:05:23 +0000
455+++ lib/lp/registry/browser/distribution.py 2010-06-16 08:24:32 +0000
456@@ -767,7 +767,8 @@
457
458 schema = IDistribution
459 field_names = ['displayname', 'title', 'summary', 'description',
460- 'bug_reporting_guidelines', 'icon', 'logo', 'mugshot',
461+ 'bug_reporting_guidelines', 'bug_reported_acknowledgement',
462+ 'icon', 'logo', 'mugshot',
463 'official_malone', 'enable_bug_expiration',
464 'official_blueprints', 'official_rosetta',
465 'official_answers', 'translation_focus', ]
466
467=== modified file 'lib/lp/registry/browser/distributionsourcepackage.py'
468--- lib/lp/registry/browser/distributionsourcepackage.py 2010-03-03 19:15:17 +0000
469+++ lib/lp/registry/browser/distributionsourcepackage.py 2010-06-16 08:24:32 +0000
470@@ -478,6 +478,7 @@
471 schema = IDistributionSourcePackage
472 field_names = [
473 'bug_reporting_guidelines',
474+ 'bug_reported_acknowledgement',
475 ]
476
477 @property
478
479=== modified file 'lib/lp/registry/browser/project.py'
480--- lib/lp/registry/browser/project.py 2010-05-11 17:43:20 +0000
481+++ lib/lp/registry/browser/project.py 2010-06-16 08:24:32 +0000
482@@ -324,8 +324,9 @@
483 schema = IProjectGroup
484 field_names = [
485 'name', 'displayname', 'title', 'summary', 'description',
486- 'bug_reporting_guidelines', 'homepageurl', 'bugtracker',
487- 'sourceforgeproject', 'freshmeatproject', 'wikiurl']
488+ 'bug_reporting_guidelines', 'bug_reported_acknowledgement',
489+ 'homepageurl', 'bugtracker', 'sourceforgeproject',
490+ 'freshmeatproject', 'wikiurl']
491
492
493 @action('Change Details', name='change')
494
495=== modified file 'lib/lp/registry/browser/tests/distribution-views.txt'
496--- lib/lp/registry/browser/tests/distribution-views.txt 2010-05-19 16:58:45 +0000
497+++ lib/lp/registry/browser/tests/distribution-views.txt 2010-06-16 08:24:32 +0000
498@@ -111,9 +111,10 @@
499
500 >>> view.field_names
501 ['displayname', 'title', 'summary', 'description',
502- 'bug_reporting_guidelines', 'icon', 'logo', 'mugshot', 'official_malone',
503- 'enable_bug_expiration', 'official_blueprints', 'official_rosetta',
504- 'official_answers', 'translation_focus']
505+ 'bug_reporting_guidelines', 'bug_reported_acknowledgement', 'icon',
506+ 'logo', 'mugshot', 'official_malone', 'enable_bug_expiration',
507+ 'official_blueprints', 'official_rosetta', 'official_answers',
508+ 'translation_focus']
509
510 >>> del form['field.name']
511 >>> del form['field.actions.save']
512
513=== modified file 'lib/lp/registry/browser/tests/distributionsourcepackage-views.txt'
514--- lib/lp/registry/browser/tests/distributionsourcepackage-views.txt 2009-12-13 11:55:40 +0000
515+++ lib/lp/registry/browser/tests/distributionsourcepackage-views.txt 2010-06-16 08:24:32 +0000
516@@ -165,7 +165,7 @@
517 The view allows the user the set the bug_reporting_guidelines field.
518
519 >>> view.field_names
520- ['bug_reporting_guidelines']
521+ ['bug_reporting_guidelines', 'bug_reported_acknowledgement']
522
523 >>> print package.bug_reporting_guidelines
524 None