Merge lp:~edwin-grubbs/launchpad/bug-597738-bug-service-status into lp:launchpad
- bug-597738-bug-service-status
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Edwin Grubbs |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11547 |
Proposed branch: | lp:~edwin-grubbs/launchpad/bug-597738-bug-service-status |
Merge into: | lp:launchpad |
Prerequisite: | lp:~jcsackett/launchpad/deprecate-official_codehosting |
Diff against target: |
550 lines (+193/-107) 13 files modified
lib/lp/answers/browser/questiontarget.py (+0/-16) lib/lp/answers/browser/tests/test_questiontarget.py (+0/-24) lib/lp/answers/templates/unknown-support.pt (+4/-5) lib/lp/bugs/browser/bugtarget.py (+11/-6) lib/lp/bugs/model/bugtask.py (+1/-0) lib/lp/bugs/stories/bugs/xx-front-page-info.txt (+21/-8) lib/lp/bugs/templates/bugtarget-bugs.pt (+62/-24) lib/lp/registry/browser/productseries.py (+19/-2) lib/lp/registry/doc/product.txt (+6/-0) lib/lp/registry/interfaces/product.py (+3/-0) lib/lp/registry/model/product.py (+38/-21) lib/lp/testing/factory.py (+27/-0) lib/lp/testing/menu.py (+1/-1) |
To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-597738-bug-service-status |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | ui | Approve | |
Henning Eggers (community) | ui* | Approve | |
Deryck Hodge (community) | ui | Abstain | |
Jelmer Vernooij (community) | code | Approve | |
Review via email: mp+34250@code.launchpad.net |
Commit message
Description of the change
Summary
-------
This branch provides the user with more information about filing bugs on
the bugs.launchpad.
of the new bug_tracking_usage attribute that returns an enum as opposed
to the old official_malone boolean. If the project is not using
Launchpad as the bug tracker, the page will also inform the user of any
ubuntu packages linked to the project under which bugs can be filed.
This branch is dependent on
lp:~jcsackett/launchpad/deprecate-official_codehosting
Implementation details
-------
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Tests
-----
./bin/test -vv -t 'xx-front-
Demo and Q/A
------------
* Open http://
* Switch the "Bugs are tracked" field between the values.
* Open http://
* If bugs are tracked in launchpad, a bug table should be shown.
* If bugs are tracked externally, the page should contain:
<meta name="robots" content=
<strong>Bugs are tracked in _SOME BUGTRACKER_
<a>Getting started with bug tracking in Launchpad.</a>
Firefox bug reports are also tracked in <a>mozilla-firefox in Ubuntu</a>.
* If launchpad doesn't know where bugs are tracked, it should contain:
<meta name="robots" content=
<strong>
Launchpad does not know where to forward bug reports to contact the*
developers of Mozilla Firefox.
</strong>
<a>Getting started with bug tracking in Launchpad.</a>
Firefox bug reports are tracked in <a>mozilla-firefox in Ubuntu</a>.
Edwin Grubbs (edwin-grubbs) wrote : | # |
> The text "Mozilla Firefox bug reports are tracked in: mozilla-firefox in
> ubuntu, mozilla-firefox in ubuntu." is a bit confusing. The text is repeated,
> but I would also argue that the text should mention somehow that those places
> are not for the bugs for upstream Firefox.
>
> Perhaps something like: "Launchpad keeps track of bug reports for <a>mozilla-
> firefox in Ubuntu</a>."
Hi Jelmer,
Thanks for the review. I've made the wording changes you suggested, and I resolved the merge conflict with devel. When I removed the code that made the results distinct on the distro, I didn't realize that what was really necessary was to make it distinct on the distro/
-Edwin
Jelmer Vernooij (jelmer) : | # |
Deryck Hodge (deryck) wrote : | # |
Since I'm not a UI reviewer, I'll abstain from review; however, as a bugs guy looking at the change, I'm not sure the language is quite right for the case where we don't know where bugs are tracked. Saying Launchpad "does not know where to forward bug reports" assumes the project doesn't host itself on Launchpad. I think it would read better as Launchpad "does not know where $project tracks its bugs." Or something like that.
Just my .02c. :-) Nice work, otherwise.
Cheers,
deryck
Henning Eggers (henninge) wrote : | # |
Hi Edwin!
Thanks for adding these helpful comments. I think the help link is very important. Although you don't mention it it looks like you did the same for answers. Generally this looks good to me although I have a few small comments.
"Launchpad does not know where to forward bug reports to contact the developers of Mozilla Firefox."
That sentence seems to either be missing a "to" or I am misunderstanding it. Maybe it should simply be "Launchpad does not know where to forward bug reports to." or even just "Bugs are not tracked in Launchpad". The latter is consistent with "Bugs are tracked in The Mozilla.org Bug Tracker."
I wonder if the next line should be prefixed with "Hint: Launchpad keeps track of ..." to make clear it's a hint and not contradicting the previous line. The same line on the answers page should be worded similarly.
Actually, I think these wording questions are Matt Revell's domain .... ;-)
OK, here is the real UI issue I have:
"Launchpad allows your project to track questions and create FAQs." sits right on top the helpful links. There should at least be some padding in between those but really I think that line should go away completely. It can be integrated in the help link, e.g. "Getting started with offering support for your project." which explains a bit more what this is about.
With that last change in place, I can approve the UI here. That's it. ;-)
Henning
Edwin Grubbs (edwin-grubbs) wrote : | # |
> Hi Edwin!
> Thanks for adding these helpful comments. I think the help link is very
> important. Although you don't mention it it looks like you did the same for
> answers. Generally this looks good to me although I have a few small comments.
>
> "Launchpad does not know where to forward bug reports to contact the
> developers of Mozilla Firefox."
> That sentence seems to either be missing a "to" or I am misunderstanding it.
> Maybe it should simply be "Launchpad does not know where to forward bug
> reports to." or even just "Bugs are not tracked in Launchpad". The latter is
> consistent with "Bugs are tracked in The Mozilla.org Bug Tracker."
The reason for the wordiness is that I'm trying to explain to the user the difference between reporting a bug on ubuntu's firefox package and reporting a bug to the actual developers, since this page will suggest reporting a bug on the package if the project doesn't use Launchpad as their bug tracker. I want to avoid saying "Bugs are not tracked in Launchpad. You can submit a bug for the firefox package." since that sounds contradictory.
How does this sound? "Mozilla Firefox must be configured in order for Launchpad to forward bugs to the project's developers."
> I wonder if the next line should be prefixed with "Hint: Launchpad keeps track
> of ..." to make clear it's a hint and not contradicting the previous line. The
> same line on the answers page should be worded similarly.
>
> Actually, I think these wording questions are Matt Revell's domain .... ;-)
>
> OK, here is the real UI issue I have:
> "Launchpad allows your project to track questions and create FAQs." sits right
> on top the helpful links. There should at least be some padding in between
> those but really I think that line should go away completely. It can be
> integrated in the help link, e.g. "Getting started with offering support for
> your project." which explains a bit more what this is about.
I think that getting rid of the text looks cleaner than integrating it with the help link, but I don't know how important it is to explain that "offering support" means tracking questions and creating FAQs.
I'll let the secondary UI reviewer weigh in before I change the branch.
> With that last change in place, I can approve the UI here. That's it. ;-)
>
> Henning
Curtis Hovey (sinzui) wrote : | # |
Hi Edwin, et al.
I have some concerns about the consistency of the unknown/external/lp
states for all bug targets and some of their states. I think we need to
address all of these and I think we need to plan one or more branches to
complete the bugs app front page for bugtargets
(distro) https:/
I see a message about forwarding bugs, but I know distros cannot
have remote bug trackers. The choice is Launchpad or does not use
Launchpad. The current message is better
This is a fair example of why we do not use context/title inline.
I see "_Enable bug tracking._" I think there should be an edit icon
preceding it.
(dsp) https:/
Oh my! This implies kubuntu does use bugs. I get an oops if I try to
report bug.
/me looks at fedora on lpnet.
https:/
also prompts me to report a bug and it too oopses :(
^ This is a separate issue but this is exactly the kind of
mis-
done until we address this.
https:/
(project) https:/
Looks good.
(project) https:/
I see
Launchpad keeps track of bug reports for _cnews in ubuntu_,
_pmount in ubuntu_.
which is very odd. Some projects produce 20 packages and some have
names nothing like the upstream project in Lp. I am not sure Launchpad
is tracking this bugs, Ubuntu is. Maybe
Ubuntu tracks bugs related to packages derived from this project:
_cnews in ubuntu_, _pmount in ubuntu_.
(project group) https:/
Implies the project groups has projects that track bugs. This is not
True. The page should state that none of the group's project use
Launchpad to track bugs. There is nothing to configure since the behaviour
is derived from the state of member projects. The answers app tells the
user that Lp does not know where support is managed.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> ...
>
> @@ -162,27 +166,55 @@
>
> <p id="no-
> </tal:no_hot_bugs>
> - </tal:uses_malone>
> -
> - <tal:not_
> - tal:define ="configure_
> - <p id="no-
> - bug tracking.
> - <p tal:condition=
> - id="bugtracker"
> - <tal:bugtracker replace="structure view/bugtracker" />.</strong>
> - </p>
> -
> - <p tal:condition=
Curtis Hovey (sinzui) wrote : | # |
> > Hi Edwin!
> > Thanks for adding these helpful comments. I think the help link is very
> > important. Although you don't mention it it looks like you did the same for
> > answers. Generally this looks good to me although I have a few small
> comments.
> >
> > "Launchpad does not know where to forward bug reports to contact the
> > developers of Mozilla Firefox."
> > That sentence seems to either be missing a "to" or I am misunderstanding
> it.
> > Maybe it should simply be "Launchpad does not know where to forward bug
> > reports to." or even just "Bugs are not tracked in Launchpad". The latter is
> > consistent with "Bugs are tracked in The Mozilla.org Bug Tracker."
>
>
> The reason for the wordiness is that I'm trying to explain to the user the
> difference between reporting a bug on ubuntu's firefox package and reporting a
> bug to the actual developers, since this page will suggest reporting a bug on
> the package if the project doesn't use Launchpad as their bug tracker. I want
> to avoid saying "Bugs are not tracked in Launchpad. You can submit a bug for
> the firefox package." since that sounds contradictory.
>
> How does this sound? "Mozilla Firefox must be configured in order for
> Launchpad to forward bugs to the project's developers."
I think this text is fine. I think part of the problem is really about the Ubuntu case. Ubuntu is not tracking project bugs, it is tracking package bugs:
Ubuntu tracks bugs related to packages derived from this project:
_cnews in ubuntu_, _pmount in ubuntu_.
...
> > integrated in the help link, e.g. "Getting started with offering support for
> > your project." which explains a bit more what this is about.
>
>
> I think that getting rid of the text looks cleaner than integrating it with
> the help link, but I don't know how important it is to explain that "offering
> support" means tracking questions and creating FAQs.
Instead of support, maybe we should just say "questions and FAQs", because that is what we want to know. I will be adding fields for mailing lists and forums for answers in my after hours, so I expect the external page will clearly state where the user can find the answers to his or her questions.
Edwin Grubbs (edwin-grubbs) wrote : | # |
> Hi Edwin, et al.
>
> I have some concerns about the consistency of the unknown/external/lp
> states for all bug targets and some of their states. I think we need to
> address all of these and I think we need to plan one or more branches to
> complete the bugs app front page for bugtargets
>
> (distro) https:/
>
> I see a message about forwarding bugs, but I know distros cannot
> have remote bug trackers. The choice is Launchpad or does not use
> Launchpad. The current message is better
I have added a conditional to display the old message if the context cannot have an external bug tracker.
> This is a fair example of why we do not use context/title inline.
>
> I see "_Enable bug tracking._" I think there should be an edit icon
> preceding it.
I have added the sprite to this link.
> (dsp) https:/
>
> Oh my! This implies kubuntu does use bugs. I get an oops if I try to
> report bug.
> /me looks at fedora on lpnet.
> https:/
> also prompts me to report a bug and it too oopses :(
> ^ This is a separate issue but this is exactly the kind of
> mis-communication we are trying to fix. bridging the grape is not
> done until we address this.
> https:/
The DSP's default view is +bugs instead of +bugs-index, so it has no logic to inform the user that Launchpad doesn't track bugs for the DSP.
> (project) https:/
>
> Looks good.
>
> (project) https:/
>
> I see
> Launchpad keeps track of bug reports for _cnews in ubuntu_,
> _pmount in ubuntu_.
> which is very odd. Some projects produce 20 packages and some have
> names nothing like the upstream project in Lp. I am not sure Launchpad
> is tracking this bugs, Ubuntu is. Maybe
> Ubuntu tracks bugs related to packages derived from this project:
> _cnews in ubuntu_, _pmount in ubuntu_.
I have made that change to the wording.
> (project group) https:/
>
> Implies the project groups has projects that track bugs. This is not
> True. The page should state that none of the group's project use
> Launchpad to track bugs. There is nothing to configure since the behaviour
> is derived from the state of member projects. The answers app tells the
> user that Lp does not know where support is managed.
Just like DSPs, ProjectGroups use +bugs instead of +bugs-index, so it will take some work in a later branch to fix.
> > === modified file 'lib/lp/
> > --- lib/lp/
> > +++ lib/lp/
> > ...
> >
> > @@ -162,27 +166,55 @@
> >
> > <p id="no-
> > </tal:no_hot_bugs>
> > - </tal:uses_malone>
> > -
> > - <tal:not_uses_...
Curtis Hovey (sinzui) wrote : | # |
Thanks for examining these issue and explaining what is happening. I think your branch is fine to land. We can discuss next steps in a separate thread. The series.title is an interesting issue because the attr is in the process of being removed from distroseries as a part of the Derivative distro work.
Preview Diff
1 | === modified file 'lib/lp/answers/browser/questiontarget.py' | |||
2 | --- lib/lp/answers/browser/questiontarget.py 2010-09-03 13:32:42 +0000 | |||
3 | +++ lib/lp/answers/browser/questiontarget.py 2010-09-14 13:29:47 +0000 | |||
4 | @@ -507,22 +507,6 @@ | |||
5 | 507 | question.sourcepackagename.name) | 507 | question.sourcepackagename.name) |
6 | 508 | 508 | ||
7 | 509 | @property | 509 | @property |
8 | 510 | def ubuntu_packages(self): | ||
9 | 511 | """The Ubuntu `IDistributionSourcePackage`s linked to the context. | ||
10 | 512 | |||
11 | 513 | If the context is an `IProduct` and it has `IPackaging` links to | ||
12 | 514 | Ubuntu, a list is returned. Otherwise None is returned | ||
13 | 515 | """ | ||
14 | 516 | if IProduct.providedBy(self.context): | ||
15 | 517 | ubuntu = getUtility(ILaunchpadCelebrities).ubuntu | ||
16 | 518 | packages = [ | ||
17 | 519 | package for package in self.context.distrosourcepackages | ||
18 | 520 | if package.distribution == ubuntu] | ||
19 | 521 | if len(packages) > 0: | ||
20 | 522 | return packages | ||
21 | 523 | return None | ||
22 | 524 | |||
23 | 525 | @property | ||
24 | 526 | def can_configure_answers(self): | 510 | def can_configure_answers(self): |
25 | 527 | """Can the user configure answers for the `IQuestionTarget`.""" | 511 | """Can the user configure answers for the `IQuestionTarget`.""" |
26 | 528 | target = self.context | 512 | target = self.context |
27 | 529 | 513 | ||
28 | === modified file 'lib/lp/answers/browser/tests/test_questiontarget.py' | |||
29 | --- lib/lp/answers/browser/tests/test_questiontarget.py 2010-09-06 09:11:43 +0000 | |||
30 | +++ lib/lp/answers/browser/tests/test_questiontarget.py 2010-09-14 13:29:47 +0000 | |||
31 | @@ -135,30 +135,6 @@ | |||
32 | 135 | self.assertViewTemplate(question_set, 'question-listing.pt') | 135 | self.assertViewTemplate(question_set, 'question-listing.pt') |
33 | 136 | 136 | ||
34 | 137 | 137 | ||
35 | 138 | class TestSearchQuestionsView_ubuntu_packages(TestSearchQuestionsView): | ||
36 | 139 | """Test the behaviour of SearchQuestionsView.ubuntu_packages.""" | ||
37 | 140 | |||
38 | 141 | def test_nonproduct_ubuntu_packages(self): | ||
39 | 142 | distribution = self.factory.makeDistribution() | ||
40 | 143 | view = create_initialized_view(distribution, '+questions') | ||
41 | 144 | packages = view.ubuntu_packages | ||
42 | 145 | self.assertEqual(None, packages) | ||
43 | 146 | |||
44 | 147 | def test_product_ubuntu_packages_unlinked(self): | ||
45 | 148 | product = self.factory.makeProduct() | ||
46 | 149 | view = create_initialized_view(product, '+questions') | ||
47 | 150 | packages = view.ubuntu_packages | ||
48 | 151 | self.assertEqual(None, packages) | ||
49 | 152 | |||
50 | 153 | def test_product_ubuntu_packages_linked(self): | ||
51 | 154 | product = self.factory.makeProduct() | ||
52 | 155 | self.linkPackage(product, 'cow') | ||
53 | 156 | view = create_initialized_view(product, '+questions') | ||
54 | 157 | packages = view.ubuntu_packages | ||
55 | 158 | self.assertEqual(1, len(packages)) | ||
56 | 159 | self.assertEqual('cow', packages[0].name) | ||
57 | 160 | |||
58 | 161 | |||
59 | 162 | class TestSearchQuestionsViewUnknown(TestSearchQuestionsView): | 138 | class TestSearchQuestionsViewUnknown(TestSearchQuestionsView): |
60 | 163 | """Test the behaviour of SearchQuestionsView unknown support.""" | 139 | """Test the behaviour of SearchQuestionsView unknown support.""" |
61 | 164 | 140 | ||
62 | 165 | 141 | ||
63 | === modified file 'lib/lp/answers/templates/unknown-support.pt' | |||
64 | --- lib/lp/answers/templates/unknown-support.pt 2010-08-05 17:14:05 +0000 | |||
65 | +++ lib/lp/answers/templates/unknown-support.pt 2010-09-14 13:29:47 +0000 | |||
66 | @@ -21,9 +21,9 @@ | |||
67 | 21 | </p> | 21 | </p> |
68 | 22 | 22 | ||
69 | 23 | <p id="ubuntu-support" | 23 | <p id="ubuntu-support" |
71 | 24 | tal:define="packages view/ubuntu_packages" | 24 | tal:define="packages context/ubuntu_packages | nothing" |
72 | 25 | tal:condition="packages"> | 25 | tal:condition="packages"> |
74 | 26 | <tal:project replace="context/displayname" /> questions are also | 26 | <tal:project replace="context/displayname" /> questions are |
75 | 27 | tracked in: <tal:packages repeat="package packages"> | 27 | tracked in: <tal:packages repeat="package packages"> |
76 | 28 | <tal:package replace="structure package/fmt:link" /><tal:comma | 28 | <tal:package replace="structure package/fmt:link" /><tal:comma |
77 | 29 | condition="not:repeat/package/end">, </tal:comma></tal:packages>. | 29 | condition="not:repeat/package/end">, </tal:comma></tal:packages>. |
78 | @@ -31,10 +31,9 @@ | |||
79 | 31 | 31 | ||
80 | 32 | <p id="configure-support" | 32 | <p id="configure-support" |
81 | 33 | tal:condition="view/can_configure_answers"> | 33 | tal:condition="view/can_configure_answers"> |
84 | 34 | Launchpad allows your project to track questions and create FAQs. | 34 | <a class="sprite maybe" |
83 | 35 | <br /><a class="sprite maybe" | ||
85 | 36 | href="https://help.launchpad.net/Answers">Getting started | 35 | href="https://help.launchpad.net/Answers">Getting started |
87 | 37 | with support tracking in Launchpad</a>. | 36 | tracking questions and FAQs in Launchpad</a>. |
88 | 38 | <br /><a tal:replace="structure context/menu:overview/configure_answers/fmt:link" /> | 37 | <br /><a tal:replace="structure context/menu:overview/configure_answers/fmt:link" /> |
89 | 39 | </p> | 38 | </p> |
90 | 40 | </div> | 39 | </div> |
91 | 41 | 40 | ||
92 | === modified file 'lib/lp/bugs/browser/bugtarget.py' | |||
93 | --- lib/lp/bugs/browser/bugtarget.py 2010-09-03 03:12:39 +0000 | |||
94 | +++ lib/lp/bugs/browser/bugtarget.py 2010-09-14 13:29:47 +0000 | |||
95 | @@ -1252,13 +1252,18 @@ | |||
96 | 1252 | bug_statuses_to_show.append(BugTaskStatus.FIXRELEASED) | 1252 | bug_statuses_to_show.append(BugTaskStatus.FIXRELEASED) |
97 | 1253 | 1253 | ||
98 | 1254 | @property | 1254 | @property |
103 | 1255 | def uses_launchpad_bugtracker(self): | 1255 | def can_have_external_bugtracker(self): |
104 | 1256 | """Whether this distro or product tracks bugs in launchpad. | 1256 | return (IProduct.providedBy(self.context) |
105 | 1257 | 1257 | or IProductSeries.providedBy(self.context)) | |
106 | 1258 | :returns: boolean | 1258 | |
107 | 1259 | @property | ||
108 | 1260 | def bug_tracking_usage(self): | ||
109 | 1261 | """Whether the context tracks bugs in launchpad. | ||
110 | 1262 | |||
111 | 1263 | :returns: ServiceUsage enum value | ||
112 | 1259 | """ | 1264 | """ |
113 | 1260 | service_usage = IServiceUsage(self.context) | 1265 | service_usage = IServiceUsage(self.context) |
115 | 1261 | return service_usage.bug_tracking_usage == ServiceUsage.LAUNCHPAD | 1266 | return service_usage.bug_tracking_usage |
116 | 1262 | 1267 | ||
117 | 1263 | @property | 1268 | @property |
118 | 1264 | def external_bugtracker(self): | 1269 | def external_bugtracker(self): |
119 | @@ -1278,7 +1283,7 @@ | |||
120 | 1278 | 1283 | ||
121 | 1279 | :returns: str which may contain HTML. | 1284 | :returns: str which may contain HTML. |
122 | 1280 | """ | 1285 | """ |
124 | 1281 | if self.uses_launchpad_bugtracker: | 1286 | if self.bug_tracking_usage == ServiceUsage.LAUNCHPAD: |
125 | 1282 | return 'Launchpad' | 1287 | return 'Launchpad' |
126 | 1283 | elif self.external_bugtracker: | 1288 | elif self.external_bugtracker: |
127 | 1284 | return BugTrackerFormatterAPI(self.external_bugtracker).link(None) | 1289 | return BugTrackerFormatterAPI(self.external_bugtracker).link(None) |
128 | 1285 | 1290 | ||
129 | === modified file 'lib/lp/bugs/model/bugtask.py' | |||
130 | --- lib/lp/bugs/model/bugtask.py 2010-09-03 03:12:39 +0000 | |||
131 | +++ lib/lp/bugs/model/bugtask.py 2010-09-14 13:29:47 +0000 | |||
132 | @@ -159,6 +159,7 @@ | |||
133 | 159 | from lp.soyuz.model.publishing import SourcePackagePublishingHistory | 159 | from lp.soyuz.model.publishing import SourcePackagePublishingHistory |
134 | 160 | from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease | 160 | from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease |
135 | 161 | 161 | ||
136 | 162 | |||
137 | 162 | debbugsseveritymap = { | 163 | debbugsseveritymap = { |
138 | 163 | None: BugTaskImportance.UNDECIDED, | 164 | None: BugTaskImportance.UNDECIDED, |
139 | 164 | 'wishlist': BugTaskImportance.WISHLIST, | 165 | 'wishlist': BugTaskImportance.WISHLIST, |
140 | 165 | 166 | ||
141 | === modified file 'lib/lp/bugs/stories/bugs/xx-front-page-info.txt' | |||
142 | --- lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2010-05-08 15:29:56 +0000 | |||
143 | +++ lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2010-09-14 13:29:47 +0000 | |||
144 | @@ -19,7 +19,8 @@ | |||
145 | 19 | >>> anon_browser.open('http://bugs.launchpad.dev/test-project') | 19 | >>> anon_browser.open('http://bugs.launchpad.dev/test-project') |
146 | 20 | >>> uses_malone_p = find_tag_by_id(anon_browser.contents, 'no-malone') | 20 | >>> uses_malone_p = find_tag_by_id(anon_browser.contents, 'no-malone') |
147 | 21 | >>> print extract_text(uses_malone_p) | 21 | >>> print extract_text(uses_malone_p) |
149 | 22 | Simple Test Project does not use Launchpad for bug tracking. | 22 | Test-project must be configured in order for Launchpad to forward bugs to |
150 | 23 | the project's developers. | ||
151 | 23 | 24 | ||
152 | 24 | Only users who have permission to do so can enable bug tracking | 25 | Only users who have permission to do so can enable bug tracking |
153 | 25 | for a project. | 26 | for a project. |
154 | @@ -53,7 +54,7 @@ | |||
155 | 53 | >>> bug_list = find_tag_by_id( | 54 | >>> bug_list = find_tag_by_id( |
156 | 54 | ... anon_browser.contents, 'no-bugs-filed') | 55 | ... anon_browser.contents, 'no-bugs-filed') |
157 | 55 | >>> print extract_text(bug_list) | 56 | >>> print extract_text(bug_list) |
159 | 56 | There are currently no bugs filed against Project Uses Malone. | 57 | There are currently no bugs filed against Uses-malone. |
160 | 57 | 58 | ||
161 | 58 | Since there are no bugs at all filed for the project, no search box is | 59 | Since there are no bugs at all filed for the project, no search box is |
162 | 59 | shown. | 60 | shown. |
163 | @@ -100,7 +101,7 @@ | |||
164 | 100 | >>> bug_list = find_tag_by_id( | 101 | >>> bug_list = find_tag_by_id( |
165 | 101 | ... anon_browser.contents, 'no-bugs-filed') | 102 | ... anon_browser.contents, 'no-bugs-filed') |
166 | 102 | >>> print extract_text(bug_list) | 103 | >>> print extract_text(bug_list) |
168 | 103 | There are currently no open bugs filed against Project Uses Malone. | 104 | There are currently no open bugs filed against Uses-malone. |
169 | 104 | 105 | ||
170 | 105 | But since the project has a bug, the search box is still visible. | 106 | But since the project has a bug, the search box is still visible. |
171 | 106 | 107 | ||
172 | @@ -112,8 +113,7 @@ | |||
173 | 112 | Advanced search | 113 | Advanced search |
174 | 113 | 114 | ||
175 | 114 | Projects that use an external bug tracker will list the tracker on a | 115 | Projects that use an external bug tracker will list the tracker on a |
178 | 115 | bugs home page in addition to the message that the project does not | 116 | bugs home page. |
177 | 116 | use Launchpad for bug tracking. | ||
179 | 117 | 117 | ||
180 | 118 | >>> login('foo.bar@canonical.com') | 118 | >>> login('foo.bar@canonical.com') |
181 | 119 | >>> some_tracker = factory.makeBugTracker( | 119 | >>> some_tracker = factory.makeBugTracker( |
182 | @@ -121,9 +121,22 @@ | |||
183 | 121 | >>> test_project.bugtracker = some_tracker | 121 | >>> test_project.bugtracker = some_tracker |
184 | 122 | >>> logout() | 122 | >>> logout() |
185 | 123 | >>> anon_browser.open('http://bugs.launchpad.dev/test-project') | 123 | >>> anon_browser.open('http://bugs.launchpad.dev/test-project') |
186 | 124 | >>> uses_malone_p = find_tag_by_id(anon_browser.contents, 'no-malone') | ||
187 | 125 | >>> print extract_text(uses_malone_p) | ||
188 | 126 | Simple Test Project does not use Launchpad for bug tracking. | ||
189 | 127 | >>> tracker_text = find_tag_by_id(anon_browser.contents, 'bugtracker') | 124 | >>> tracker_text = find_tag_by_id(anon_browser.contents, 'bugtracker') |
190 | 128 | >>> print extract_text(tracker_text) | 125 | >>> print extract_text(tracker_text) |
191 | 129 | Bugs are tracked in tracker.example.com/. | 126 | Bugs are tracked in tracker.example.com/. |
192 | 127 | |||
193 | 128 | Projects that are linked to an Ubuntu distro source package and that | ||
194 | 129 | don't use Launchpad for bug tracking will inform the user that a bug can | ||
195 | 130 | be reported on the project's source packages. | ||
196 | 131 | |||
197 | 132 | >>> login('foo.bar@canonical.com') | ||
198 | 133 | >>> factory.makePackagingLink( | ||
199 | 134 | ... productseries=test_project.development_focus, | ||
200 | 135 | ... sourcepackagename='test-project-package', | ||
201 | 136 | ... in_ubuntu=True) | ||
202 | 137 | >>> logout() | ||
203 | 138 | >>> anon_browser.open('http://bugs.launchpad.dev/test-project') | ||
204 | 139 | >>> print extract_text( | ||
205 | 140 | ... find_tag_by_id(anon_browser.contents, 'also-in-ubuntu')) | ||
206 | 141 | Ubuntu also tracks bugs for packages derived from this project: | ||
207 | 142 | test-project-package in ubuntu. | ||
208 | 130 | 143 | ||
209 | === modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt' | |||
210 | --- lib/lp/bugs/templates/bugtarget-bugs.pt 2010-08-04 11:01:15 +0000 | |||
211 | +++ lib/lp/bugs/templates/bugtarget-bugs.pt 2010-09-14 13:29:47 +0000 | |||
212 | @@ -10,12 +10,15 @@ | |||
213 | 10 | i18n:domain="malone" | 10 | i18n:domain="malone" |
214 | 11 | > | 11 | > |
215 | 12 | <metal:block fill-slot="head_epilogue"> | 12 | <metal:block fill-slot="head_epilogue"> |
216 | 13 | <meta tal:condition="not: view/bug_tracking_usage/enumvalue:LAUNCHPAD" | ||
217 | 14 | name="robots" content="noindex,nofollow" /> | ||
218 | 13 | <style type="text/css"> | 15 | <style type="text/css"> |
219 | 14 | p#more-hot-bugs {float:right; margin-top:7px;} | 16 | p#more-hot-bugs {float:right; margin-top:7px;} |
220 | 15 | </style> | 17 | </style> |
221 | 16 | </metal:block> | 18 | </metal:block> |
222 | 17 | <body> | 19 | <body> |
224 | 18 | <tal:side metal:fill-slot="side" condition="view/uses_launchpad_bugtracker"> | 20 | <tal:side metal:fill-slot="side" |
225 | 21 | condition="view/bug_tracking_usage/enumvalue:LAUNCHPAD"> | ||
226 | 19 | <div id="involvement" class="portlet"> | 22 | <div id="involvement" class="portlet"> |
227 | 20 | <ul class="involvement"> | 23 | <ul class="involvement"> |
228 | 21 | <li style="border: none"> | 24 | <li style="border: none"> |
229 | @@ -95,7 +98,8 @@ | |||
230 | 95 | 98 | ||
231 | 96 | 99 | ||
232 | 97 | 100 | ||
234 | 98 | <tal:uses_malone condition="view/uses_launchpad_bugtracker"> | 101 | <tal:uses_launchpad_bugtracker |
235 | 102 | condition="view/bug_tracking_usage/enumvalue:LAUNCHPAD"> | ||
236 | 99 | <tal:has_bugtasks condition="context/has_bugtasks"> | 103 | <tal:has_bugtasks condition="context/has_bugtasks"> |
237 | 100 | <div class="search-box" style="margin-bottom:2em"> | 104 | <div class="search-box" style="margin-bottom:2em"> |
238 | 101 | <metal:search | 105 | <metal:search |
239 | @@ -158,31 +162,65 @@ | |||
240 | 158 | <tal:no_hot_bugs condition="not: view/hot_bugs_info/bugtasks"> | 162 | <tal:no_hot_bugs condition="not: view/hot_bugs_info/bugtasks"> |
241 | 159 | <p id="no-bugs-filed"><strong>There are currently no | 163 | <p id="no-bugs-filed"><strong>There are currently no |
242 | 160 | <span tal:condition="context/has_bugtasks">open</span> bugs filed | 164 | <span tal:condition="context/has_bugtasks">open</span> bugs filed |
244 | 161 | against <tal:project_title replace="context/title" />.</strong></p> | 165 | against <tal:displayname replace="context/displayname" />.</strong></p> |
245 | 162 | 166 | ||
246 | 163 | <p id="no-bugs-report"><a href="+filebug">Report a bug.</a></p> | 167 | <p id="no-bugs-report"><a href="+filebug">Report a bug.</a></p> |
247 | 164 | </tal:no_hot_bugs> | 168 | </tal:no_hot_bugs> |
269 | 165 | </tal:uses_malone> | 169 | </tal:uses_launchpad_bugtracker> |
270 | 166 | 170 | ||
271 | 167 | <tal:not_uses_malone condition="not: view/uses_launchpad_bugtracker" | 171 | <p id="no-malone" |
272 | 168 | tal:define ="configure_bugtracker context/menu:overview/configure_bugtracker | nothing"> | 172 | tal:condition="view/bug_tracking_usage/enumvalue:UNKNOWN"> |
273 | 169 | <p id="no-malone"><strong><tal:project_title replace="context/title" /> does not use Launchpad for | 173 | <strong tal:condition="view/can_have_external_bugtracker"> |
274 | 170 | bug tracking.</strong></p> | 174 | <tal:displayname replace="context/displayname" /> |
275 | 171 | <p tal:condition="view/external_bugtracker" | 175 | must be configured in order for Launchpad to forward bugs to |
276 | 172 | id="bugtracker"><strong>Bugs are tracked in | 176 | the project's developers. |
277 | 173 | <tal:bugtracker replace="structure view/bugtracker" />.</strong> | 177 | </strong> |
278 | 174 | </p> | 178 | <strong tal:condition="not: view/can_have_external_bugtracker"> |
279 | 175 | 179 | <tal:displayname replace="context/displayname" /> | |
280 | 176 | <p tal:condition="context/required:launchpad.Edit" | 180 | does not use Launchpad for bug tracking. |
281 | 177 | id="no-malone-edit" | 181 | </strong> |
282 | 178 | > | 182 | </p> |
283 | 179 | <a tal:condition="configure_bugtracker" | 183 | |
284 | 180 | tal:replace="structure configure_bugtracker/fmt:link"/> | 184 | <p tal:condition="view/external_bugtracker" |
285 | 181 | <a tal:condition="not: configure_bugtracker" | 185 | id="bugtracker"> |
286 | 182 | tal:attributes="href string:${context/fmt:url/+edit}"> | 186 | <strong>Bugs are tracked in |
287 | 183 | Enable bug tracking.</a> | 187 | <tal:bugtracker replace="structure view/bugtracker" />. |
288 | 184 | </p> | 188 | </strong> |
289 | 185 | </tal:not_uses_malone> | 189 | </p> |
290 | 190 | |||
291 | 191 | <tal:also_in_ubuntu | ||
292 | 192 | condition="not: view/bug_tracking_usage/enumvalue:LAUNCHPAD"> | ||
293 | 193 | <p tal:define="packages context/ubuntu_packages | nothing" | ||
294 | 194 | tal:condition="packages" | ||
295 | 195 | id="also-in-ubuntu"> | ||
296 | 196 | Ubuntu | ||
297 | 197 | <tal:also condition="view/external_bugtracker">also</tal:also> | ||
298 | 198 | tracks bugs for packages derived from this project: | ||
299 | 199 | <tal:packages repeat="package packages"> | ||
300 | 200 | <span style="white-space: nowrap" | ||
301 | 201 | tal:content="structure package/fmt:link" /><tal:comma | ||
302 | 202 | condition="not:repeat/package/end">,</tal:comma></tal:packages>. | ||
303 | 203 | </p> | ||
304 | 204 | </tal:also_in_ubuntu> | ||
305 | 205 | |||
306 | 206 | <div | ||
307 | 207 | tal:condition="not: view/bug_tracking_usage/enumvalue:LAUNCHPAD" | ||
308 | 208 | tal:define="configure_bugtracker context/menu:overview/configure_bugtracker | nothing"> | ||
309 | 209 | <a class="sprite maybe" | ||
310 | 210 | href="https://help.launchpad.net/Bugs">Getting started | ||
311 | 211 | with bug tracking in Launchpad</a>. | ||
312 | 212 | |||
313 | 213 | <p tal:condition="context/required:launchpad.Edit" | ||
314 | 214 | id="no-malone-edit" | ||
315 | 215 | > | ||
316 | 216 | <a tal:condition="configure_bugtracker" | ||
317 | 217 | tal:replace="structure configure_bugtracker/fmt:link"/> | ||
318 | 218 | <a class="sprite edit" | ||
319 | 219 | tal:condition="not: configure_bugtracker" | ||
320 | 220 | tal:attributes="href string:${context/fmt:url/+edit}"> | ||
321 | 221 | Enable bug tracking.</a> | ||
322 | 222 | </p> | ||
323 | 223 | </div> | ||
324 | 186 | 224 | ||
325 | 187 | </div><!-- main --> | 225 | </div><!-- main --> |
326 | 188 | </body> | 226 | </body> |
327 | 189 | 227 | ||
328 | === modified file 'lib/lp/registry/browser/productseries.py' | |||
329 | --- lib/lp/registry/browser/productseries.py 2010-09-09 18:21:55 +0000 | |||
330 | +++ lib/lp/registry/browser/productseries.py 2010-09-14 13:29:47 +0000 | |||
331 | @@ -280,12 +280,29 @@ | |||
332 | 280 | usedfor = IProductSeries | 280 | usedfor = IProductSeries |
333 | 281 | facet = 'overview' | 281 | facet = 'overview' |
334 | 282 | links = [ | 282 | links = [ |
337 | 283 | 'edit', 'delete', 'driver', 'link_branch', 'ubuntupkg', | 283 | 'configure_bugtracker', |
338 | 284 | 'create_milestone', 'create_release', 'rdf', 'subscribe', | 284 | 'create_milestone', |
339 | 285 | 'create_release', | ||
340 | 286 | 'delete', | ||
341 | 287 | 'driver', | ||
342 | 288 | 'edit', | ||
343 | 289 | 'link_branch', | ||
344 | 290 | 'rdf', | ||
345 | 285 | 'set_branch', | 291 | 'set_branch', |
346 | 292 | 'subscribe', | ||
347 | 293 | 'ubuntupkg', | ||
348 | 286 | ] | 294 | ] |
349 | 287 | 295 | ||
350 | 288 | @enabled_with_permission('launchpad.Edit') | 296 | @enabled_with_permission('launchpad.Edit') |
351 | 297 | def configure_bugtracker(self): | ||
352 | 298 | text = 'Configure bug tracker' | ||
353 | 299 | summary = 'Specify where bugs are tracked for this project' | ||
354 | 300 | return Link( | ||
355 | 301 | canonical_url(self.context.product, | ||
356 | 302 | view_name='+configure-bugtracker'), | ||
357 | 303 | text, summary, icon='edit') | ||
358 | 304 | |||
359 | 305 | @enabled_with_permission('launchpad.Edit') | ||
360 | 289 | def edit(self): | 306 | def edit(self): |
361 | 290 | """Return a link to edit this series.""" | 307 | """Return a link to edit this series.""" |
362 | 291 | text = 'Change details' | 308 | text = 'Change details' |
363 | 292 | 309 | ||
364 | === modified file 'lib/lp/registry/doc/product.txt' | |||
365 | --- lib/lp/registry/doc/product.txt 2010-09-10 13:29:42 +0000 | |||
366 | +++ lib/lp/registry/doc/product.txt 2010-09-14 13:29:47 +0000 | |||
367 | @@ -225,6 +225,11 @@ | |||
368 | 225 | >>> [(sp.name, sp.distribution.name) for sp in alsa.distrosourcepackages] | 225 | >>> [(sp.name, sp.distribution.name) for sp in alsa.distrosourcepackages] |
369 | 226 | [(u'alsa-utils', u'debian'), (u'alsa-utils', u'ubuntu')] | 226 | [(u'alsa-utils', u'debian'), (u'alsa-utils', u'ubuntu')] |
370 | 227 | 227 | ||
371 | 228 | For convenience, you can get just the distro source packages for Ubuntu. | ||
372 | 229 | |||
373 | 230 | >>> [(sp.name, sp.distribution.name) for sp in alsa.ubuntu_packages] | ||
374 | 231 | [(u'alsa-utils', u'ubuntu')] | ||
375 | 232 | |||
376 | 228 | The date_next_suggest_packaging attribute records the date when Launchpad can | 233 | The date_next_suggest_packaging attribute records the date when Launchpad can |
377 | 229 | resume suggesting Ubuntu packages that the project provides. A value of None | 234 | resume suggesting Ubuntu packages that the project provides. A value of None |
378 | 230 | means that no user has ever confirmed that that the project has no Ubuntu | 235 | means that no user has ever confirmed that that the project has no Ubuntu |
379 | @@ -714,6 +719,7 @@ | |||
380 | 714 | ... print series.name | 719 | ... print series.name |
381 | 715 | trunk | 720 | trunk |
382 | 716 | 721 | ||
383 | 722 | |||
384 | 717 | Changing ownership | 723 | Changing ownership |
385 | 718 | ================== | 724 | ================== |
386 | 719 | 725 | ||
387 | 720 | 726 | ||
388 | === modified file 'lib/lp/registry/interfaces/product.py' | |||
389 | --- lib/lp/registry/interfaces/product.py 2010-08-31 00:02:42 +0000 | |||
390 | +++ lib/lp/registry/interfaces/product.py 2010-09-14 13:29:47 +0000 | |||
391 | @@ -644,6 +644,9 @@ | |||
392 | 644 | distrosourcepackages = Attribute(_("List of distribution packages for " | 644 | distrosourcepackages = Attribute(_("List of distribution packages for " |
393 | 645 | "this product")) | 645 | "this product")) |
394 | 646 | 646 | ||
395 | 647 | ubuntu_packages = Attribute( | ||
396 | 648 | _("List of distribution packages for this product in Ubuntu")) | ||
397 | 649 | |||
398 | 647 | series = exported( | 650 | series = exported( |
399 | 648 | doNotSnapshot( | 651 | doNotSnapshot( |
400 | 649 | CollectionField(value_type=Object(schema=IProductSeries)))) | 652 | CollectionField(value_type=Object(schema=IProductSeries)))) |
401 | 650 | 653 | ||
402 | === modified file 'lib/lp/registry/model/product.py' | |||
403 | --- lib/lp/registry/model/product.py 2010-09-03 11:05:21 +0000 | |||
404 | +++ lib/lp/registry/model/product.py 2010-09-14 13:29:47 +0000 | |||
405 | @@ -48,6 +48,9 @@ | |||
406 | 48 | SQLBase, | 48 | SQLBase, |
407 | 49 | sqlvalues, | 49 | sqlvalues, |
408 | 50 | ) | 50 | ) |
409 | 51 | from canonical.launchpad.components.decoratedresultset import ( | ||
410 | 52 | DecoratedResultSet, | ||
411 | 53 | ) | ||
412 | 51 | from canonical.launchpad.interfaces.launchpad import ( | 54 | from canonical.launchpad.interfaces.launchpad import ( |
413 | 52 | IHasIcon, | 55 | IHasIcon, |
414 | 53 | IHasLogo, | 56 | IHasLogo, |
415 | @@ -64,6 +67,7 @@ | |||
416 | 64 | MAIN_STORE, | 67 | MAIN_STORE, |
417 | 65 | ) | 68 | ) |
418 | 66 | from canonical.launchpad.webapp.sorting import sorted_version_numbers | 69 | from canonical.launchpad.webapp.sorting import sorted_version_numbers |
419 | 70 | |||
420 | 67 | from lp.answers.interfaces.faqtarget import IFAQTarget | 71 | from lp.answers.interfaces.faqtarget import IFAQTarget |
421 | 68 | from lp.answers.interfaces.questioncollection import ( | 72 | from lp.answers.interfaces.questioncollection import ( |
422 | 69 | QUESTION_STATUS_DEFAULT_SEARCH, | 73 | QUESTION_STATUS_DEFAULT_SEARCH, |
423 | @@ -146,6 +150,7 @@ | |||
424 | 146 | from lp.registry.model.productlicense import ProductLicense | 150 | from lp.registry.model.productlicense import ProductLicense |
425 | 147 | from lp.registry.model.productrelease import ProductRelease | 151 | from lp.registry.model.productrelease import ProductRelease |
426 | 148 | from lp.registry.model.productseries import ProductSeries | 152 | from lp.registry.model.productseries import ProductSeries |
427 | 153 | from lp.registry.model.sourcepackagename import SourcePackageName | ||
428 | 149 | from lp.registry.model.structuralsubscription import ( | 154 | from lp.registry.model.structuralsubscription import ( |
429 | 150 | StructuralSubscriptionTargetMixin, | 155 | StructuralSubscriptionTargetMixin, |
430 | 151 | ) | 156 | ) |
431 | @@ -829,28 +834,40 @@ | |||
432 | 829 | (x.sourcepackagename.name, x.distroseries.name, | 834 | (x.sourcepackagename.name, x.distroseries.name, |
433 | 830 | x.distroseries.distribution.name)) | 835 | x.distroseries.distribution.name)) |
434 | 831 | 836 | ||
436 | 832 | @property | 837 | @cachedproperty |
437 | 833 | def distrosourcepackages(self): | 838 | def distrosourcepackages(self): |
458 | 834 | from lp.registry.model.distributionsourcepackage \ | 839 | from lp.registry.model.distributionsourcepackage import ( |
459 | 835 | import DistributionSourcePackage | 840 | DistributionSourcePackage, |
460 | 836 | clause = """ProductSeries.id=Packaging.productseries AND | 841 | ) |
461 | 837 | ProductSeries.product = %s | 842 | store = IStore(Packaging) |
462 | 838 | """ % sqlvalues(self.id) | 843 | origin = [ |
463 | 839 | clauseTables = ['ProductSeries'] | 844 | Packaging, |
464 | 840 | ret = Packaging.select(clause, clauseTables, | 845 | Join(SourcePackageName, |
465 | 841 | prejoins=["sourcepackagename", "distroseries.distribution"]) | 846 | Packaging.sourcepackagename == SourcePackageName.id), |
466 | 842 | distros = set() | 847 | Join(ProductSeries, Packaging.productseries == ProductSeries.id), |
467 | 843 | dsps = [] | 848 | Join(DistroSeries, Packaging.distroseries == DistroSeries.id), |
468 | 844 | for packaging in ret: | 849 | Join(Distribution, DistroSeries.distribution == Distribution.id), |
469 | 845 | distro = packaging.distroseries.distribution | 850 | ] |
470 | 846 | if distro in distros: | 851 | result = store.using(*origin).find( |
471 | 847 | continue | 852 | (SourcePackageName, Distribution), |
472 | 848 | distros.add(distro) | 853 | ProductSeries.product == self) |
473 | 849 | dsps.append(DistributionSourcePackage( | 854 | result = result.order_by(SourcePackageName.name, Distribution.name) |
474 | 850 | sourcepackagename=packaging.sourcepackagename, | 855 | result.config(distinct=True) |
475 | 851 | distribution=distro)) | 856 | |
476 | 852 | return sorted(dsps, key=lambda x: | 857 | return [ |
477 | 853 | (x.sourcepackagename.name, x.distribution.name)) | 858 | DistributionSourcePackage( |
478 | 859 | sourcepackagename=sourcepackagename, | ||
479 | 860 | distribution=distro) | ||
480 | 861 | for sourcepackagename, distro in result] | ||
481 | 862 | |||
482 | 863 | @cachedproperty | ||
483 | 864 | def ubuntu_packages(self): | ||
484 | 865 | """The Ubuntu `IDistributionSourcePackage`s linked to the `IProduct`. | ||
485 | 866 | """ | ||
486 | 867 | ubuntu = getUtility(ILaunchpadCelebrities).ubuntu | ||
487 | 868 | return [ | ||
488 | 869 | package for package in self.distrosourcepackages | ||
489 | 870 | if package.distribution == ubuntu] | ||
490 | 854 | 871 | ||
491 | 855 | @property | 872 | @property |
492 | 856 | def bugtargetdisplayname(self): | 873 | def bugtargetdisplayname(self): |
493 | 857 | 874 | ||
494 | === modified file 'lib/lp/testing/factory.py' | |||
495 | --- lib/lp/testing/factory.py 2010-09-09 20:12:02 +0000 | |||
496 | +++ lib/lp/testing/factory.py 2010-09-14 13:29:47 +0000 | |||
497 | @@ -182,6 +182,10 @@ | |||
498 | 182 | from lp.registry.interfaces.mailinglistsubscription import ( | 182 | from lp.registry.interfaces.mailinglistsubscription import ( |
499 | 183 | MailingListAutoSubscribePolicy, | 183 | MailingListAutoSubscribePolicy, |
500 | 184 | ) | 184 | ) |
501 | 185 | from lp.registry.interfaces.packaging import ( | ||
502 | 186 | IPackagingUtil, | ||
503 | 187 | PackagingType, | ||
504 | 188 | ) | ||
505 | 185 | from lp.registry.interfaces.person import ( | 189 | from lp.registry.interfaces.person import ( |
506 | 186 | IPerson, | 190 | IPerson, |
507 | 187 | IPersonSet, | 191 | IPersonSet, |
508 | @@ -993,6 +997,29 @@ | |||
509 | 993 | removeSecurityProxy(branch).reviewer = reviewer | 997 | removeSecurityProxy(branch).reviewer = reviewer |
510 | 994 | return branch | 998 | return branch |
511 | 995 | 999 | ||
512 | 1000 | def makePackagingLink(self, productseries=None, sourcepackagename=None, | ||
513 | 1001 | distroseries=None, packaging_type=None, owner=None, | ||
514 | 1002 | in_ubuntu=False): | ||
515 | 1003 | if productseries is None: | ||
516 | 1004 | productseries = self.makeProduct().development_focus | ||
517 | 1005 | if sourcepackagename is None or isinstance(sourcepackagename, str): | ||
518 | 1006 | sourcepackagename = self.makeSourcePackageName(sourcepackagename) | ||
519 | 1007 | if distroseries is None: | ||
520 | 1008 | distribution = None | ||
521 | 1009 | if in_ubuntu: | ||
522 | 1010 | distribution = getUtility(ILaunchpadCelebrities).ubuntu | ||
523 | 1011 | distroseries = self.makeDistroSeries(distribution=distribution) | ||
524 | 1012 | if packaging_type is None: | ||
525 | 1013 | packaging_type = PackagingType.PRIME | ||
526 | 1014 | if owner is None: | ||
527 | 1015 | owner = self.makePerson() | ||
528 | 1016 | return getUtility(IPackagingUtil).createPackaging( | ||
529 | 1017 | productseries=productseries, | ||
530 | 1018 | sourcepackagename=sourcepackagename, | ||
531 | 1019 | distroseries=distroseries, | ||
532 | 1020 | packaging=packaging_type, | ||
533 | 1021 | owner=owner) | ||
534 | 1022 | |||
535 | 996 | def makePackageBranch(self, sourcepackage=None, distroseries=None, | 1023 | def makePackageBranch(self, sourcepackage=None, distroseries=None, |
536 | 997 | sourcepackagename=None, **kwargs): | 1024 | sourcepackagename=None, **kwargs): |
537 | 998 | """Make a package branch on an arbitrary package. | 1025 | """Make a package branch on an arbitrary package. |
538 | 999 | 1026 | ||
539 | === modified file 'lib/lp/testing/menu.py' | |||
540 | --- lib/lp/testing/menu.py 2010-09-12 11:43:36 +0000 | |||
541 | +++ lib/lp/testing/menu.py 2010-09-14 13:29:47 +0000 | |||
542 | @@ -11,7 +11,7 @@ | |||
543 | 11 | def check_menu_links(menu): | 11 | def check_menu_links(menu): |
544 | 12 | context = menu.context | 12 | context = menu.context |
545 | 13 | for link in menu.iterlinks(): | 13 | for link in menu.iterlinks(): |
547 | 14 | if link.target.startswith('/'): | 14 | if link.target.startswith(('/', 'http://')): |
548 | 15 | # The context is not the context of this target. | 15 | # The context is not the context of this target. |
549 | 16 | continue | 16 | continue |
550 | 17 | if '?' in link.target: | 17 | if '?' in link.target: |
The text "Mozilla Firefox bug reports are tracked in: mozilla-firefox in ubuntu, mozilla-firefox in ubuntu." is a bit confusing. The text is repeated, but I would also argue that the text should mention somehow that those places are not for the bugs for upstream Firefox.
Perhaps something like: "Launchpad keeps track of bug reports for <a>mozilla-firefox in Ubuntu</a>."