I had been waiting on some notifications fixes to be able to land this branch, but turns out, the older way of doing this is correct because the notifications have to appear inside the form. Here's a diff of the change back to the original template, with 3.0 mechanical updates plus removing the obsolete test. === modified file 'lib/lp/bugs/browser/bug.py' --- lib/lp/bugs/browser/bug.py 2009-08-21 12:57:32 +0000 +++ lib/lp/bugs/browser/bug.py 2009-08-21 15:31:10 +0000 @@ -549,7 +549,6 @@ custom_widget('title', TextWidget, displayWidth=30) custom_widget('tags', BugTagsWidget) next_url = None - label = 'Edit Bug Information' _confirm_new_tags = False @@ -558,9 +557,14 @@ self.notifications = [] @property + def label(self): + """The form label.""" + return 'Edit details for bug #%d' % self.context.id + + @property def page_title(self): """The page title.""" - return 'Edit %s ' % self.context.title + return self.label @property def cancel_url(self): === modified file 'lib/lp/bugs/browser/configure.zcml' --- lib/lp/bugs/browser/configure.zcml 2009-08-21 12:57:32 +0000 +++ lib/lp/bugs/browser/configure.zcml 2009-08-21 15:19:06 +0000 @@ -485,7 +485,7 @@ name="+edit" for="lp.bugs.interfaces.bugtask.IBugTask" class="lp.bugs.browser.bug.BugEditView" - template="../../app/templates/generic-edit.pt" + template="../templates/bug-edit.pt" permission="launchpad.Edit"/> >> user_browser.open( - ... 'http://bugs.launchpad.dev/debian/+source/mozilla-firefox/+bug/3') - >>> print user_browser.contents - <... - ...Activity log... - ...Mark as duplicate... - -On other bug views, the 'Mark as duplicate' link can be found in the actions -menu. - - >>> user_browser.getLink(url='+edit').click() - >>> print find_tags_by_class( - ... user_browser.contents, 'menu-link-markduplicate')[0].renderContents() - Mark as duplicate - - Tests the marking of a bug that is a duplicate of a duplicate. - - >>> user_browser.getLink('Mark as duplicate').click() - >>> print user_browser.url - http://bugs.launchpad.dev/debian/+source/mozilla-firefox/+bug/3/+duplicate - - >>> user_browser.getControl('Duplicate Of').value = '6' - >>> user_browser.getControl('Change').click() - >>> print user_browser.contents - <... -

There is 1 error.

- ... - ...already a duplicate... - - - Tests the marking of a bug that is a duplicate of itself. - - >>> user_browser.getControl('Duplicate Of').value = '3' - >>> user_browser.getControl('Change').click() - >>> print user_browser.contents - <... -

There is 1 error.

- ... - ...can't mark a bug as a duplicate of itself... - ... - - - Tests the marking of a bug that is already marked as duplicate with - the same value. In this case, nothing should happen, since nothing - changed. - - >>> user_browser.open( - ... 'http://bugs.launchpad.dev/firefox/+bug/6/+duplicate') - >>> user_browser.getControl('Duplicate Of').value - '5' - >>> user_browser.getControl('Change').click() - >>> user_browser.url - 'http://bugs.launchpad.dev/firefox/+bug/6' - - - Tests the input of data that is not a valid value. - - >>> user_browser.open( - ... 'http://bugs.launchpad.dev/firefox/+bug/6/+duplicate') - >>> user_browser.getControl('Duplicate Of').value = 'xajskd' - >>> user_browser.getControl('Change').click() - >>> print user_browser.contents - <... - ...Not a valid bug number or nickname... - ... - - Tests using a bug nickname as the duplicate value - - >>> user_browser.open( - ... 'http://bugs.launchpad.dev/evolution/+bug/7/+duplicate') - >>> user_browser.getControl('Duplicate Of').value = 'blackhole' - >>> user_browser.getControl('Change').click() - >>> user_browser.url - 'http://bugs.launchpad.dev/evolution/+bug/7' - - - Marking a bugX as a duplicate of bugY is not allowed if bugX has dupes. - - >>> user_browser.open( - ... 'http://bugs.launchpad.dev/firefox/+bug/5/+duplicate') - >>> user_browser.getControl('Duplicate Of').value = '4' - >>> user_browser.getControl('Change').click() - >>> print user_browser.contents - <... - ...There are other bugs already... - ... - - >>> from canonical.launchpad.database import Bug - >>> Bug.get(5).duplicateof is None - True === added file 'lib/lp/bugs/templates/bug-edit.pt' --- lib/lp/bugs/templates/bug-edit.pt 1970-01-01 00:00:00 +0000 +++ lib/lp/bugs/templates/bug-edit.pt 2009-08-21 15:29:26 +0000 @@ -0,0 +1,22 @@ + + +
+
+ +

+ Confirmation message. +

+
+
+
+ +