Merge lp:~intellectronica/launchpad/distroseries-source-package-filebug-no-redirect into lp:launchpad

Proposed by Eleanor Berger
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~intellectronica/launchpad/distroseries-source-package-filebug-no-redirect
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~intellectronica/launchpad/distroseries-source-package-filebug-no-redirect
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical Approve
Henning Eggers (community) code Approve
Review via email: mp+12232@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) wrote :

When the user tries to file a bug on ubuntu we redirect them to a wiki page telling them they should use apport. we block that redirection if the user provides the no-redirect parameter, but that parameter needs to be carried on if we redirect to a new context.

Revision history for this message
Henning Eggers (henninge) :
review: Approve (code)
Revision history for this message
Brad Crittenden (bac) wrote :

Thanks for the additional test, Tom.

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configs/development/launchpad-lazr.conf'
2--- configs/development/launchpad-lazr.conf 2009-09-14 19:32:10 +0000
3+++ configs/development/launchpad-lazr.conf 2009-09-22 15:47:48 +0000
4@@ -160,6 +160,7 @@
5 debbugs_db_location: lib/canonical/launchpad/scripts/tests
6 comments_list_max_length: 7
7 comments_list_truncate_to: 4
8+ubuntu_disable_filebug: false
9
10 [mailman]
11 launch: True
12
13=== modified file 'lib/lp/registry/browser/distroseries.py'
14--- lib/lp/registry/browser/distroseries.py 2009-09-15 01:17:46 +0000
15+++ lib/lp/registry/browser/distroseries.py 2009-09-22 15:47:48 +0000
16@@ -352,8 +352,11 @@
17 Filing a bug on a distribution series is not directly
18 permitted; we redirect to the distribution's file
19 """
20- distro_url = canonical_url(self.context.distribution)
21- return self.request.response.redirect(distro_url + "/+filebug")
22+ distro_url = canonical_url(
23+ self.context.distribution, view_name='+filebug')
24+ if self.request.form.get('no-redirect') is not None:
25+ distro_url += '?no-redirect'
26+ return self.request.response.redirect(distro_url)
27
28 @property
29 def show_arch_selector(self):
30
31=== modified file 'lib/lp/registry/browser/sourcepackage.py'
32--- lib/lp/registry/browser/sourcepackage.py 2009-09-18 12:18:51 +0000
33+++ lib/lp/registry/browser/sourcepackage.py 2009-09-22 15:47:48 +0000
34@@ -65,7 +65,11 @@
35 distro_sourcepackage = sourcepackage.distribution.getSourcePackage(
36 sourcepackage.name)
37
38- return redirection(canonical_url(distro_sourcepackage) + "/+filebug")
39+ redirection_url = canonical_url(
40+ distro_sourcepackage, view_name='+filebug')
41+ if self.request.form.get('no-redirect') is not None:
42+ redirection_url += '?no-redirect'
43+ return redirection(redirection_url)
44
45
46 class SourcePackageBreadcrumb(Breadcrumb):