Here's an updated diff, with the correct fix, I hope.
=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py 2009-09-24 16:33:25 +0000
+++ lib/lp/bugs/browser/bugtarget.py 2009-09-25 00:59:30 +0000
@@ -67,6 +67,7 @@
from lp.registry.interfaces.distroseries import IDistroSeries
from lp.registry.interfaces.product import IProduct, IProject
from lp.registry.interfaces.productseries import IProductSeries
+from lp.registry.interfaces.sourcepackage import ISourcePackage
from canonical.launchpad.webapp import (
LaunchpadEditFormView, LaunchpadFormView, LaunchpadView, action,
canonical_url, custom_widget, safe_action)
@@ -350,16 +351,16 @@
@property
def no_ubuntu_redirect(self):
if IDistribution.providedBy(self.context):
- return (
- self.request.form.get('no-redirect') is not None or
- [key for key in self.request.form.keys()
- if 'field.actions' in key] != [] or
- self.user.inTeam(self.context.bug_supervisor))
- else:
- return (
- self.request.form.get('no-redirect') is not None or
- [key for key in self.request.form.keys()
- if 'field.actions' in key] != [])
+ bug_supervisor = self.context.bug_supervisor
+ elif (IDistributionSourcePackage.providedBy(self.context) or
+ ISourcePackage.providedBy(self.context)):
+ bug_supervisor = self.context.distribution.bug_supervisor
+
+ return (
+ self.request.form.get('no-redirect') is not None or
+ [key for key in self.request.form.keys()
+ if 'field.actions' in key] != [] or
+ self.user.inTeam(bug_supervisor))
def getPackageNameFieldCSSClass(self):
"""Return the CSS class for the packagename field."""
-The bug supervisor is considered only for the distribution itself,
-not for a source package. Source packages should still redirect,
-regardless of the user being Ubuntu's bug supervisor.
+Source packages are also not redirected for Ubuntu's bug supervisor.
Here's an updated diff, with the correct fix, I hope.
=== modified file 'lib/lp/ bugs/browser/ bugtarget. py' bugs/browser/ bugtarget. py 2009-09-24 16:33:25 +0000 bugs/browser/ bugtarget. py 2009-09-25 00:59:30 +0000 interfaces. distroseries import IDistroSeries interfaces. product import IProduct, IProject interfaces. productseries import IProductSeries interfaces. sourcepackage import ISourcePackage launchpad. webapp import ( ditFormView, LaunchpadFormView, LaunchpadView, action, redirect( self): providedBy( self.context) : form.get( 'no-redirect' ) is not None or form.keys( ) inTeam( self.context. bug_supervisor) ) form.get( 'no-redirect' ) is not None or form.keys( ) bug_supervisor ourcePackage. providedBy( self.context) or providedBy( self.context) ): distribution. bug_supervisor form.get( 'no-redirect' ) is not None or form.keys( ) inTeam( bug_supervisor) )
--- lib/lp/
+++ lib/lp/
@@ -67,6 +67,7 @@
from lp.registry.
from lp.registry.
from lp.registry.
+from lp.registry.
from canonical.
LaunchpadE
canonical_url, custom_widget, safe_action)
@@ -350,16 +351,16 @@
@property
def no_ubuntu_
if IDistribution.
- return (
- self.request.
- [key for key in self.request.
- if 'field.actions' in key] != [] or
- self.user.
- else:
- return (
- self.request.
- [key for key in self.request.
- if 'field.actions' in key] != [])
+ bug_supervisor = self.context.
+ elif (IDistributionS
+ ISourcePackage.
+ bug_supervisor = self.context.
+
+ return (
+ self.request.
+ [key for key in self.request.
+ if 'field.actions' in key] != [] or
+ self.user.
def getPackageNameF ieldCSSClass( self):
"""Return the CSS class for the packagename field."""
=== modified file 'lib/lp/ bugs/stories/ guided- filebug/ xx-ubuntu- filebug. txt' bugs/stories/ guided- filebug/ xx-ubuntu- filebug. txt 2009-09-24 16:33:25 +0000 bugs/stories/ guided- filebug/ xx-ubuntu- filebug. txt 2009-09-25 00:35:07 +0000
--- lib/lp/
+++ lib/lp/
@@ -57,14 +57,12 @@
>>> print admin_browser.title
Report a bug about Ubuntu...
-The bug supervisor is considered only for the distribution itself,
-not for a source package. Source packages should still redirect,
-regardless of the user being Ubuntu's bug supervisor.
+Source packages are also not redirected for Ubuntu's bug supervisor.
>>> admin_browser.open( bugs.launchpad. dev/ubuntu/ +source/ mozilla- firefox/ +filebug') launchpad. dev/+tour/ index bugs.launchpad. dev/ubuntu/ +source/ mozilla- firefox/ +filebug
... 'http://
>>> print admin_browser.url
- http://
+ http://
Filing bugs with Apport also allows us to get to the bug filing interface.