Merge lp:~bac/launchpad/bug-639703-pg-bugs into lp:launchpad

Proposed by Brad Crittenden
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 11737
Proposed branch: lp:~bac/launchpad/bug-639703-pg-bugs
Merge into: lp:launchpad
Diff against target: 557 lines (+242/-74)
13 files modified
lib/canonical/launchpad/pagetitles.py (+0/-2)
lib/lp/bugs/browser/bugtask.py (+12/-2)
lib/lp/bugs/browser/tests/test_bugtask.py (+108/-2)
lib/lp/bugs/configure.zcml (+6/-0)
lib/lp/bugs/stories/bug-release-management/xx-review-nominated-bugs.txt (+4/-4)
lib/lp/bugs/stories/bugs/xx-front-page-search.txt (+2/-2)
lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt (+13/-1)
lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt (+13/-1)
lib/lp/bugs/stories/bugs/xx-project-bugs-page.txt (+1/-1)
lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt (+1/-1)
lib/lp/bugs/templates/buglisting-default.pt (+77/-54)
lib/lp/soyuz/stories/packaging/package-pages-navigation.txt (+1/-2)
lib/lp/testing/views.py (+4/-2)
To merge this branch: bzr merge lp:~bac/launchpad/bug-639703-pg-bugs
Reviewer Review Type Date Requested Status
Gavin Panella (community) Abstain
Henning Eggers (community) code ui* Approve
Curtis Hovey (community) ui Approve
Matthew Revell (community) text Approve
Review via email: mp+37463@code.launchpad.net

Commit message

Correctly report bug tracking status for project groups.

Description of the change

= Summary =

Currently if a project group has sub-projects but none use Launchpad for
bug tracking a user will be allowed to attempt to file a bug. At the
next step the user is informed there are no projects that track bugs in LP.

== Proposed fix ==

Prevent such a project group from displaying the portlets and providing
links to bug reporting and other bug activities.

== Pre-implementation notes ==

Talk with Curtis

== Implementation details ==

As above

== Tests ==

bin/test -vvm lp.bugs -t test_bugtask

== Demo and Q/A ==

Create a project group and see that it states it does not use Launchpad
for bug tracking. Add a project that does not use bug tracking and
ensure the message is the same. Set one of the project to do bug
tracking and observe the change in the page.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/testing/views.py
  lib/lp/bugs/templates/buglisting-default.pt
  lib/lp/bugs/browser/tests/test_bugtask.py
  lib/lp/bugs/browser/bugtask.py

./lib/lp/bugs/browser/bugtask.py
    2201: Line exceeds 78 characters.

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :
Revision history for this message
Henning Eggers (henninge) wrote :
Download full text (7.8 KiB)

Hello Bac,
thanks for making Launchpad a bit more user-friendly! ;-) I still need to send
you on another round-trip, though. Please find my comments below.

Henning

Am 04.10.2010 15:44, schrieb Brad Crittenden:
> === modified file 'lib/lp/bugs/browser/bugtask.py'
> --- lib/lp/bugs/browser/bugtask.py 2010-09-28 14:50:19 +0000
> +++ lib/lp/bugs/browser/bugtask.py 2010-10-04 12:55:59 +0000
> @@ -168,6 +168,7 @@
> ObjectImageDisplayAPI,
> PersonFormatterAPI,
> )
> +
> from canonical.lazr.interfaces import IObjectPrivacy
> from canonical.lazr.utils import smartquote
> from canonical.widgets.bug import BugTagsWidget
> @@ -2987,8 +2988,17 @@
> return False
>
> @property
> + def should_show_bug_information(self):
> + """Return False if a project group that does not use Launchpad."""
> + if not self._projectContext():
> + return True
> + involvement = getMultiAdapter((self.context, self.request),
> + name="+get-involved")
> + return involvement.official_malone

This seems odd, to create a view just to get a property that is really a
property of the context. The "official_malone" property should be defined in
ProjectGroup and could be implemented like this: ;-)

    @cachedproperty
    def offcial_malone(self):
        return any([product.offcial_malone for product in self.products])

Unless I misunderstood something, I see this misuse of a view as a real
blocker for landing this. This earned you the "need-fixing" ;-)

> +
> + @property
> def form_has_errors(self):
> - """Return True of the form has errors, otherwise False."""
> + """Return True if the form has errors, otherwise False."""

Good catch! ;)

> return len(self.errors) > 0
>
> def validateVocabulariesAdvancedForm(self):
>
> === modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
> --- lib/lp/bugs/browser/tests/test_bugtask.py 2010-09-23 14:51:48 +0000
> +++ lib/lp/bugs/browser/tests/test_bugtask.py 2010-10-04 12:55:59 +0000

[...]

> @@ -418,6 +424,88 @@
> view.form_fields['assignee'].field.vocabularyName)
>
>
> +class TestProjectGroupBugs(TestCaseWithFactory):
> + """Test the bugs overview page for Project Groups."""
> +
> + layer = LaunchpadFunctionalLayer
> +
> + def setUp(self):
> + super(TestProjectGroupBugs, self).setUp()
> + self.owner = self.factory.makePerson(name='bob')
> + self.projectgroup = self.factory.makeProject(name='container',
> + owner=self.owner)
> +
> + def makeSubordinateProduct(self, tracks_bugs_in_lp):
> + """Create a new product and add it to the project group."""
> + product = self.factory.makeProduct(official_malone=tracks_bugs_in_lp)
> + with person_logged_in(product.owner):
> + product.project = self.projectgroup
> + expected = {True: 'LAUNCHPAD',
> + False: 'UNKNOWN',
> + }
> + self.assertEqual(
> + expected[tracks_bugs_in_lp], product.bug_tracking_usage.name)

This looks like a forgotten sanity check? If you wish t...

Read more...

review: Needs Fixing (code)
Revision history for this message
Matthew Revell (matthew.revell) wrote :

Very happy to see this change, thanks Brad.

I'd like to suggest some alternative text:

  Sorry, you can't report a bug for the $ProjectGroup project group. None of the
  projects within the group use Launchpad for bug tracking. Please check the
  $ProjectGroup website for details of where they track bug reports.

I have suggested this change because I think the most important thing about the message is that you can't report the bug you wanted to. Only then should we explain why. I think we should then give the person a next step ... ideally we should link to their external bug tracker, or as a second-best we should link to the project's website. If we can't do either, I think the above text is a nod towards being helpful.

review: Needs Fixing (text)
Revision history for this message
Brad Crittenden (bac) wrote :
Download full text (3.3 KiB)

On Oct 4, 2010, at 22:39 , Henning Eggers wrote:

> Review: Needs Fixing code
> Hello Bac,
> thanks for making Launchpad a bit more user-friendly! ;-) I still need to send
> you on another round-trip, though. Please find my comments below.
>

Thanks for the review Henning.

> Henning
>
> Am 04.10.2010 15:44, schrieb Brad Crittenden:
>> === modified file 'lib/lp/bugs/browser/bugtask.py'
>>
>> @property
>> + def should_show_bug_information(self):
>> + """Return False if a project group that does not use Launchpad."""
>> + if not self._projectContext():
>> + return True
>> + involvement = getMultiAdapter((self.context, self.request),
>> + name="+get-involved")
>> + return involvement.official_malone
>
> This seems odd, to create a view just to get a property that is really a
> property of the context. The "official_malone" property should be defined in
> ProjectGroup and could be implemented like this: ;-)
>
> @cachedproperty
> def offcial_malone(self):
> return any([product.offcial_malone for product in self.products])
>
> Unless I misunderstood something, I see this misuse of a view as a real
> blocker for landing this. This earned you the "need-fixing" ;-)

It does look odd, Henning. For a lot of pillars, including ProjectGroup, the official usage flags are set in PillarView. The pattern you see here is repeated elsewhere.

On IRC we discussed landing this branch and later looking at moving the settings to the appropriate models. The bug for that work is bug 655036.
>
>> @@ -418,6 +424,88 @@
>> view.form_fields['assignee'].field.vocabularyName)
>>
>>
>> +class TestProjectGroupBugs(TestCaseWithFactory):
>> + """Test the bugs overview page for Project Groups."""
>> +
>> + layer = LaunchpadFunctionalLayer
>> +
>> + def setUp(self):
>> + super(TestProjectGroupBugs, self).setUp()
>> + self.owner = self.factory.makePerson(name='bob')
>> + self.projectgroup = self.factory.makeProject(name='container',
>> + owner=self.owner)
>> +
>> + def makeSubordinateProduct(self, tracks_bugs_in_lp):
>> + """Create a new product and add it to the project group."""
>> + product = self.factory.makeProduct(official_malone=tracks_bugs_in_lp)
>> + with person_logged_in(product.owner):
>> + product.project = self.projectgroup
>> + expected = {True: 'LAUNCHPAD',
>> + False: 'UNKNOWN',
>> + }
>> + self.assertEqual(
>> + expected[tracks_bugs_in_lp], product.bug_tracking_usage.name)
>
> This looks like a forgotten sanity check? If you wish to keep it in here you
> should give it its own tests and mention in the comment their sanity nature.

Yes, it serves no purpose and is removed.

>
>> +
>> + def test_empty_project_group(self):
>
> This one and the next three tests belong in the model tests for
> ProjectGroup.official_malone.

Deferred.

>> + def test_project_group_has_portlets_link_if_using_LP(self):
>> + # A project group that has no projects using Launchpad ...

Read more...

Revision history for this message
Brad Crittenden (bac) wrote :

Thanks for the text changes Matthew. On IRC we agreed on:

            You cannot report a bug for <tal:name replace="name"/> as none of
            the projects within the group use Launchpad for bug tracking.
            Please check the individual projects for details
            of where bugs are reported.

Revision history for this message
Matthew Revell (matthew.revell) :
review: Approve (text)
Revision history for this message
Henning Eggers (henninge) wrote :

So, the code is good now. Thanks for adding the XXX and filing the bug.

UI-wise I find the page too empty and inconsistent with similar pages we have on project groups and projects. Please have a look here:
http://people.canonical.com/~henninge/screenshots/unconfigured_blueprints_pg.png
http://people.canonical.com/~henninge/screenshots/unconfigured_bugtracker.png

The page will at least need a page heading and bread crumbs. The text should most likely be <strong> like on the other pages to indicate that it needs attention. Add a help link for bonus points. ;-)

Thanks

approved code
needs-fixing ui*

review: Needs Fixing (code ui*)
Revision history for this message
Brad Crittenden (bac) wrote :

Hi Henning,

Thanks for the UI review. I have added the page heading and breadcrumbs:

http://people.canonical.com/~bac/pg-bugs-no-projects.png
http://people.canonical.com/~bac/pg-bugs-mit-projects.png

I have not yet added a help link but will do so, pending Curtis' UI mentoring review.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thanks Brad and Henning. This is a very nice fix and I am very pleased we fixed some 3.0-ism too. As Henning pointed, we want a consistent experience:

The page should show the owner the same help link as is shown on projects:
    (i) Getting started with bug tracking in Launchpad.
    <https://help.launchpad.net/Bugs>

There is a secondary issue that help does not explain exactly what bug tracking features project groups provide. Actually, Lp has a poor understanding of what PGs provide. I think PG documentation is a secondary issue. We will discuss PGs over the next few months and decide their fate.

review: Approve (ui)
Revision history for this message
Henning Eggers (henninge) wrote :

All good now, thanks for improving this! ;-)

review: Approve (code ui*)
Revision history for this message
Gavin Panella (allenap) wrote :

Looks like this is all reviewed, so abstaining on behalf of Launchpad code reviewers.

review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2010-10-03 15:30:06 +0000
+++ lib/canonical/launchpad/pagetitles.py 2010-10-18 01:11:10 +0000
@@ -146,8 +146,6 @@
146146
147buglinktarget_unlinkbugs = 'Remove links to bug reports'147buglinktarget_unlinkbugs = 'Remove links to bug reports'
148148
149buglisting_default = ContextTitle("Bugs in %s")
150
151def buglisting_embedded_advanced_search(context, view):149def buglisting_embedded_advanced_search(context, view):
152 """Return the view's page heading."""150 """Return the view's page heading."""
153 return view.getSearchPageHeading()151 return view.getSearchPageHeading()
154152
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2010-10-14 20:20:47 +0000
+++ lib/lp/bugs/browser/bugtask.py 2010-10-18 01:11:10 +0000
@@ -2297,7 +2297,7 @@
22972297
2298 @cachedproperty2298 @cachedproperty
2299 def bug_tracking_usage(self):2299 def bug_tracking_usage(self):
2300 """Whether the context tracks bugs in launchpad.2300 """Whether the context tracks bugs in Launchpad.
23012301
2302 :returns: ServiceUsage enum value2302 :returns: ServiceUsage enum value
2303 """2303 """
@@ -2305,6 +2305,12 @@
2305 return service_usage.bug_tracking_usage2305 return service_usage.bug_tracking_usage
23062306
2307 @property2307 @property
2308 def page_title(self):
2309 return "Bugs in %s" % self.context.title
2310
2311 label = page_title
2312
2313 @property
2308 def schema(self):2314 def schema(self):
2309 """Return the schema that defines the form."""2315 """Return the schema that defines the form."""
2310 if self._personContext():2316 if self._personContext():
@@ -2838,8 +2844,12 @@
2838 return False2844 return False
28392845
2840 @property2846 @property
2847 def should_show_bug_information(self):
2848 return self.bug_tracking_usage == ServiceUsage.LAUNCHPAD
2849
2850 @property
2841 def form_has_errors(self):2851 def form_has_errors(self):
2842 """Return True of the form has errors, otherwise False."""2852 """Return True if the form has errors, otherwise False."""
2843 return len(self.errors) > 02853 return len(self.errors) > 0
28442854
2845 def validateVocabulariesAdvancedForm(self):2855 def validateVocabulariesAdvancedForm(self):
28462856
=== modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
--- lib/lp/bugs/browser/tests/test_bugtask.py 2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/browser/tests/test_bugtask.py 2010-10-18 01:11:10 +0000
@@ -19,6 +19,7 @@
19 login,19 login,
20 login_person,20 login_person,
21 )21 )
22from canonical.launchpad.testing.pages import find_tag_by_id
22from canonical.launchpad.testing.systemdocs import (23from canonical.launchpad.testing.systemdocs import (
23 LayeredDocFileSuite,24 LayeredDocFileSuite,
24 setUp,25 setUp,
@@ -33,7 +34,10 @@
33 BugTasksAndNominationsView,34 BugTasksAndNominationsView,
34 )35 )
35from lp.bugs.interfaces.bugtask import BugTaskStatus36from lp.bugs.interfaces.bugtask import BugTaskStatus
36from lp.testing import TestCaseWithFactory37from lp.testing import (
38 person_logged_in,
39 TestCaseWithFactory,
40 )
37from lp.testing._webservice import QueryCollector41from lp.testing._webservice import QueryCollector
38from lp.testing.matchers import HasQueryCount42from lp.testing.matchers import HasQueryCount
39from lp.testing.sampledata import (43from lp.testing.sampledata import (
@@ -41,6 +45,7 @@
41 NO_PRIVILEGE_EMAIL,45 NO_PRIVILEGE_EMAIL,
42 USER_EMAIL,46 USER_EMAIL,
43 )47 )
48from lp.testing.views import create_initialized_view
4449
4550
46class TestBugTaskView(TestCaseWithFactory):51class TestBugTaskView(TestCaseWithFactory):
@@ -69,7 +74,8 @@
69 self.addCleanup(recorder.unregister)74 self.addCleanup(recorder.unregister)
70 self.invalidate_caches(task)75 self.invalidate_caches(task)
71 self.getUserBrowser(url, person_no_teams)76 self.getUserBrowser(url, person_no_teams)
72 # This may seem large: it is; there is easily another 30% fat in there.77 # This may seem large: it is; there is easily another 30% fat in
78 # there.
73 self.assertThat(recorder, HasQueryCount(LessThan(62)))79 self.assertThat(recorder, HasQueryCount(LessThan(62)))
74 count_with_no_teams = recorder.count80 count_with_no_teams = recorder.count
75 # count with many teams81 # count with many teams
@@ -418,6 +424,106 @@
418 view.form_fields['assignee'].field.vocabularyName)424 view.form_fields['assignee'].field.vocabularyName)
419425
420426
427class TestProjectGroupBugs(TestCaseWithFactory):
428 """Test the bugs overview page for Project Groups."""
429
430 layer = LaunchpadFunctionalLayer
431
432 def setUp(self):
433 super(TestProjectGroupBugs, self).setUp()
434 self.owner = self.factory.makePerson(name='bob')
435 self.projectgroup = self.factory.makeProject(name='container',
436 owner=self.owner)
437
438 def makeSubordinateProduct(self, tracks_bugs_in_lp):
439 """Create a new product and add it to the project group."""
440 product = self.factory.makeProduct(official_malone=tracks_bugs_in_lp)
441 with person_logged_in(product.owner):
442 product.project = self.projectgroup
443
444 def test_empty_project_group(self):
445 # An empty project group does not use Launchpad for bugs.
446 view = create_initialized_view(
447 self.projectgroup, name=u'+bugs', rootsite='bugs')
448 self.assertFalse(self.projectgroup.hasProducts())
449 self.assertFalse(view.should_show_bug_information)
450
451 def test_project_group_with_subordinate_not_using_launchpad(self):
452 # A project group with all subordinates not using Launchpad
453 # will itself be marked as not using Launchpad for bugs.
454 self.makeSubordinateProduct(False)
455 self.assertTrue(self.projectgroup.hasProducts())
456 view = create_initialized_view(
457 self.projectgroup, name=u'+bugs', rootsite='bugs')
458 self.assertFalse(view.should_show_bug_information)
459
460 def test_project_group_with_subordinate_using_launchpad(self):
461 # A project group with one subordinate using Launchpad
462 # will itself be marked as using Launchpad for bugs.
463 self.makeSubordinateProduct(True)
464 self.assertTrue(self.projectgroup.hasProducts())
465 view = create_initialized_view(
466 self.projectgroup, name=u'+bugs', rootsite='bugs')
467 self.assertTrue(view.should_show_bug_information)
468
469 def test_project_group_with_mixed_subordinates(self):
470 # A project group with one or more subordinates using Launchpad
471 # will itself be marked as using Launchpad for bugs.
472 self.makeSubordinateProduct(False)
473 self.makeSubordinateProduct(True)
474 self.assertTrue(self.projectgroup.hasProducts())
475 view = create_initialized_view(
476 self.projectgroup, name=u'+bugs', rootsite='bugs')
477 self.assertTrue(view.should_show_bug_information)
478
479 def test_project_group_has_no_portlets_if_not_using_LP(self):
480 # A project group that has no projects using Launchpad will not have
481 # bug portlets.
482 self.makeSubordinateProduct(False)
483 view = create_initialized_view(
484 self.projectgroup, name=u'+bugs', rootsite='bugs',
485 current_request=True)
486 self.assertFalse(view.should_show_bug_information)
487 contents = view.render()
488 report_a_bug = find_tag_by_id(contents, 'bug-portlets')
489 self.assertIs(None, report_a_bug)
490
491 def test_project_group_has_portlets_link_if_using_LP(self):
492 # A project group that has projects using Launchpad will have a
493 # portlets.
494 self.makeSubordinateProduct(True)
495 view = create_initialized_view(
496 self.projectgroup, name=u'+bugs', rootsite='bugs',
497 current_request=True)
498 self.assertTrue(view.should_show_bug_information)
499 contents = view.render()
500 report_a_bug = find_tag_by_id(contents, 'bug-portlets')
501 self.assertIsNot(None, report_a_bug)
502
503 def test_project_group_has_help_link_if_not_using_LP(self):
504 # A project group that has no projects using Launchpad will have
505 # a 'Getting started' help link.
506 self.makeSubordinateProduct(False)
507 view = create_initialized_view(
508 self.projectgroup, name=u'+bugs', rootsite='bugs',
509 current_request=True)
510 contents = view.render()
511 help_link = find_tag_by_id(contents, 'getting-started-help')
512 self.assertIsNot(None, help_link)
513
514 def test_project_group_has_no_help_link_if_using_LP(self):
515 # A project group that has no projects using Launchpad will not have
516 # a 'Getting started' help link.
517 self.makeSubordinateProduct(True)
518 view = create_initialized_view(
519 self.projectgroup, name=u'+bugs', rootsite='bugs',
520 current_request=True)
521 contents = view.render()
522 help_link = find_tag_by_id(contents, 'getting-started-help')
523 print help_link
524 self.assertIs(None, help_link)
525
526
421def test_suite():527def test_suite():
422 suite = unittest.TestLoader().loadTestsFromName(__name__)528 suite = unittest.TestLoader().loadTestsFromName(__name__)
423 suite.addTest(DocTestSuite(bugtask))529 suite.addTest(DocTestSuite(bugtask))
424530
=== modified file 'lib/lp/bugs/configure.zcml'
--- lib/lp/bugs/configure.zcml 2010-10-07 10:12:25 +0000
+++ lib/lp/bugs/configure.zcml 2010-10-18 01:11:10 +0000
@@ -1036,6 +1036,12 @@
1036 for="lp.bugs.interfaces.bugtarget.IBugTarget"1036 for="lp.bugs.interfaces.bugtarget.IBugTarget"
1037 factory="lp.bugs.browser.bugtarget.BugsVHostBreadcrumb"1037 factory="lp.bugs.browser.bugtarget.BugsVHostBreadcrumb"
1038 permission="zope.Public"/>1038 permission="zope.Public"/>
1039 <adapter
1040 name="bugs"
1041 provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
1042 for="lp.registry.interfaces.projectgroup.IProjectGroup"
1043 factory="lp.bugs.browser.bugtarget.BugsVHostBreadcrumb"
1044 permission="zope.Public"/>
10391045
1040 <!-- ProcessApportBlobJobs -->1046 <!-- ProcessApportBlobJobs -->
1041 <class class="lp.bugs.model.apportjob.ProcessApportBlobJob">1047 <class class="lp.bugs.model.apportjob.ProcessApportBlobJob">
10421048
=== modified file 'lib/lp/bugs/stories/bug-release-management/xx-review-nominated-bugs.txt'
--- lib/lp/bugs/stories/bug-release-management/xx-review-nominated-bugs.txt 2010-09-28 03:01:37 +0000
+++ lib/lp/bugs/stories/bug-release-management/xx-review-nominated-bugs.txt 2010-10-18 01:11:10 +0000
@@ -8,7 +8,7 @@
8 >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu/hoary')8 >>> anon_browser.open('http://bugs.launchpad.dev/ubuntu/hoary')
9 >>> anon_browser.getLink('Review nominations').click()9 >>> anon_browser.getLink('Review nominations').click()
10 >>> print anon_browser.title10 >>> print anon_browser.title
11 Bugs nominated for Hoary...11 Bugs in The Hoary Hedgehog Release : Bugs : Hoary (5.04) : Ubuntu
1212
13All the basic bug details are displayed.13All the basic bug details are displayed.
1414
@@ -22,7 +22,7 @@
22 >>> user_browser.open('http://bugs.launchpad.dev/ubuntu/hoary')22 >>> user_browser.open('http://bugs.launchpad.dev/ubuntu/hoary')
23 >>> user_browser.getLink('Review nominations').click()23 >>> user_browser.getLink('Review nominations').click()
24 >>> print anon_browser.title24 >>> print anon_browser.title
25 Bugs nominated for Hoary...25 Bugs in The Hoary Hedgehog Release : Bugs : Hoary (5.04) : Ubuntu
2626
27 >>> print_bugtasks(user_browser.contents)27 >>> print_bugtasks(user_browser.contents)
28 1 Firefox does not support SVG mozilla-firefox Medium New28 1 Firefox does not support SVG mozilla-firefox Medium New
@@ -63,7 +63,7 @@
63 >>> admin_browser.open('http://bugs.launchpad.dev/ubuntu/hoary')63 >>> admin_browser.open('http://bugs.launchpad.dev/ubuntu/hoary')
64 >>> admin_browser.getLink('Review nominations').click()64 >>> admin_browser.getLink('Review nominations').click()
65 >>> print anon_browser.title65 >>> print anon_browser.title
66 Bugs nominated for Hoary...66 Bugs in The Hoary Hedgehog Release : Bugs : Hoary (5.04) : Ubuntu
6767
68 >>> print_bugtasks(admin_browser.contents)68 >>> print_bugtasks(admin_browser.contents)
69 1 Firefox does not support SVG mozilla-firefox Medium New69 1 Firefox does not support SVG mozilla-firefox Medium New
@@ -114,7 +114,7 @@
114 >>> user_browser.open('http://bugs.launchpad.dev/firefox/1.0')114 >>> user_browser.open('http://bugs.launchpad.dev/firefox/1.0')
115 >>> user_browser.getLink('Review nominations').click()115 >>> user_browser.getLink('Review nominations').click()
116 >>> print user_browser.title116 >>> print user_browser.title
117 Bugs nominated for 1.0...117 Bugs in Mozilla Firefox 1.0 series : Bugs : Series 1.0 : Mozilla Firefox
118118
119 >>> print_bugtasks(user_browser.contents)119 >>> print_bugtasks(user_browser.contents)
120 1 Firefox does not support SVG Low New120 1 Firefox does not support SVG Low New
121121
=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-search.txt'
--- lib/lp/bugs/stories/bugs/xx-front-page-search.txt 2010-04-16 15:06:55 +0000
+++ lib/lp/bugs/stories/bugs/xx-front-page-search.txt 2010-10-18 01:11:10 +0000
@@ -142,8 +142,8 @@
142 >>> anon_browser.getControl(name='field.scope.target').value = 'gnome'142 >>> anon_browser.getControl(name='field.scope.target').value = 'gnome'
143 >>> anon_browser.getControl(name='field.searchtext').value = 'test bug'143 >>> anon_browser.getControl(name='field.searchtext').value = 'test bug'
144 >>> anon_browser.getControl('Search Bug Reports').click()144 >>> anon_browser.getControl('Search Bug Reports').click()
145 >>> anon_browser.title145 >>> print anon_browser.title
146 'Bugs in The GNOME Project'146 Bugs : GNOME
147 >>> anon_browser.url147 >>> anon_browser.url
148 'http://bugs.launchpad.dev/gnome/+bugs?field.searchtext=test+bug...'148 'http://bugs.launchpad.dev/gnome/+bugs?field.searchtext=test+bug...'
149 >>> print_bugtasks(anon_browser.contents)149 >>> print_bugtasks(anon_browser.contents)
150150
=== modified file 'lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt'
--- lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt 2009-09-20 22:11:49 +0000
+++ lib/lp/bugs/stories/bugs/xx-portlets-bug-milestones.txt 2010-10-18 01:11:10 +0000
@@ -4,7 +4,19 @@
4The milestone-targeted bugs portlet displays the number of bugs that have4The milestone-targeted bugs portlet displays the number of bugs that have
5been targeted to a specific milestone.5been targeted to a specific milestone.
66
7This portlet is available from a distribution's bug page.7This portlet is not available from a distribution's bug page if it
8does not use Launchpad for tracking bugs.
9
10 >>> anon_browser.open("http://bugs.launchpad.dev/debian/+bugs")
11 >>> portlet = find_portlet(
12 ... anon_browser.contents, "Milestone-targeted bugs")
13 >>> print portlet
14 None
15
16Change debian to track bugs in Launchpad and the portlet becomes visible.
17
18 >>> from lp.testing.service_usage_helpers import set_service_usage
19 >>> set_service_usage('debian', bug_tracking_usage='LAUNCHPAD')
820
9 >>> anon_browser.open("http://bugs.launchpad.dev/debian/+bugs")21 >>> anon_browser.open("http://bugs.launchpad.dev/debian/+bugs")
10 >>> portlet = find_portlet(22 >>> portlet = find_portlet(
1123
=== modified file 'lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt'
--- lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt 2010-01-18 20:06:06 +0000
+++ lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt 2010-10-18 01:11:10 +0000
@@ -1,6 +1,19 @@
1The series-targeted portlet displays the number of open bugs that have1The series-targeted portlet displays the number of open bugs that have
2been accepted as targeting a specific series of a distribution:2been accepted as targeting a specific series of a distribution:
33
4This portlet is not available from a distribution's bug page if it
5does not use Launchpad for tracking bugs.
6
7 >>> anon_browser.open("http://bugs.launchpad.dev/debian/+bugs")
8 >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs")
9 >>> print portlet
10 None
11
12Change debian to track bugs in Launchpad and the portlet becomes visible.
13
14 >>> from lp.testing.service_usage_helpers import set_service_usage
15 >>> set_service_usage('debian', bug_tracking_usage='LAUNCHPAD')
16
4 >>> anon_browser.open("http://bugs.launchpad.dev/debian/+bugs")17 >>> anon_browser.open("http://bugs.launchpad.dev/debian/+bugs")
5 >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs")18 >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs")
6 >>> print extract_text(portlet)19 >>> print extract_text(portlet)
@@ -51,4 +64,3 @@
51 >>> print extract_text(portlet)64 >>> print extract_text(portlet)
52 Series-targeted bugs65 Series-targeted bugs
53 1.0 166 1.0 1
54
5567
=== modified file 'lib/lp/bugs/stories/bugs/xx-project-bugs-page.txt'
--- lib/lp/bugs/stories/bugs/xx-project-bugs-page.txt 2010-04-16 15:06:55 +0000
+++ lib/lp/bugs/stories/bugs/xx-project-bugs-page.txt 2010-10-18 01:11:10 +0000
@@ -5,4 +5,4 @@
55
6 >>> anon_browser.open('http://bugs.launchpad.dev/gnome')6 >>> anon_browser.open('http://bugs.launchpad.dev/gnome')
7 >>> print anon_browser.title7 >>> print anon_browser.title
8 Bugs in The GNOME Project8 Bugs : GNOME
99
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt 2010-10-05 22:04:38 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt 2010-10-18 01:11:10 +0000
@@ -176,7 +176,7 @@
176 >>> anon_browser.getControl('Bug subscriber').value = subscriber176 >>> anon_browser.getControl('Bug subscriber').value = subscriber
177 >>> anon_browser.getControl('Search', index=0).click()177 >>> anon_browser.getControl('Search', index=0).click()
178 >>> print extract_text(find_main_content(anon_browser.contents))178 >>> print extract_text(find_main_content(anon_browser.contents))
179 Mozilla Firefox ...179 Bugs in Mozilla Firefox ...
180 No results for search180 No results for search
181181
182We'll continue by subscribing the same user to a couple of bugs. However,182We'll continue by subscribing the same user to a couple of bugs. However,
183183
=== modified file 'lib/lp/bugs/templates/buglisting-default.pt'
--- lib/lp/bugs/templates/buglisting-default.pt 2010-10-06 22:05:15 +0000
+++ lib/lp/bugs/templates/buglisting-default.pt 2010-10-18 01:11:10 +0000
@@ -6,17 +6,18 @@
6 metal:use-macro="view/macro:page/main_side"6 metal:use-macro="view/macro:page/main_side"
7 i18n:domain="malone"7 i18n:domain="malone"
8>8>
9 <body>9
1010<metal:block fill-slot="head_epilogue">
11 <metal:block fill-slot="head_epilogue">11 <meta condition="not: view/should_show_bug_information"
12 <meta tal:condition="not: view/bug_tracking_usage/enumvalue:LAUNCHPAD"12 name="robots" content="noindex,nofollow" />
13 name="robots" content="noindex,nofollow" />13</metal:block>
14 </metal:block>14
15<body>
1516
16 <div metal:fill-slot="main">17 <div metal:fill-slot="main">
17 <div tal:condition="not: view/bug_tracking_usage/enumvalue:UNKNOWN"18 <div tal:condition="not: view/bug_tracking_usage/enumvalue:UNKNOWN"
18 class="top-portlet">19 class="top-portlet">
19 <tal:block condition="view/_projectContext">20 <tal:is_project_group condition="view/_projectContext">
20 <tal:block condition="view/required:launchpad.Edit">21 <tal:block condition="view/required:launchpad.Edit">
21 <p tal:condition="not: context/products" class="warning message">22 <p tal:condition="not: context/products" class="warning message">
22 There are no projects registered for23 There are no projects registered for
@@ -27,66 +28,88 @@
27 associate an existing project with it.28 associate an existing project with it.
28 </p>29 </p>
29 </tal:block>30 </tal:block>
30 </tal:block>31
31 <h132 <tal:has_products condition="context/products">
32 tal:condition="view/shouldShowAdvancedForm"33 <tal:no_bug_info condition="not:view/should_show_bug_information">
33 tal:content="view/getAdvancedSearchPageHeading"34 <p tal:define="name context/displayname">
34 >Bugs in Fooix: Advanced search</h1>35 <strong>
3536 You cannot report a bug for <tal:name replace="name"/> as none
36 <tal:do_not_show_advanced_form37 of the projects within the group use Launchpad for bug
37 condition="not: view/shouldShowAdvancedForm">38 tracking. Please check the individual projects for details of
38 <div tal:define="batch_navigator view/search">39 where bugs are reported.
3940 </strong>
40 <div metal:use-macro="context/@@+bugtarget-macros-search/simple-search-form"></div>41 </p>
41 <tal:buglisting content="structure batch_navigator/@@+table-view" />42 <p id="getting-started-help">
42 </div>43 <a class="sprite maybe"
43 </tal:do_not_show_advanced_form>44 href="https://help.launchpad.net/Bugs">Getting started
4445 with bug tracking in Launchpad</a>.
45 <tal:show_advanced_form condition="view/shouldShowAdvancedForm">46 </p>
46 <metal:advanced_form47 </tal:no_bug_info>
47 use-macro="context/@@+bugtask-macros-tableview/advanced_search_form" />48 </tal:has_products>
48 </tal:show_advanced_form>49 </tal:is_project_group>
50
51 <h1
52 tal:condition="view/shouldShowAdvancedForm"
53 tal:content="view/getAdvancedSearchPageHeading"
54 >Bugs in Fooix: Advanced search</h1>
55
56 <tal:do_not_show_advanced_form
57 condition="not: view/shouldShowAdvancedForm">
58 <div tal:define="batch_navigator view/search">
59 <div metal:use-macro="context/@@+bugtarget-macros-search/simple-search-form"></div>
60 <tal:buglisting content="structure batch_navigator/@@+table-view" />
61 </div>
62 </tal:do_not_show_advanced_form>
63
64 <tal:show_advanced_form condition="view/shouldShowAdvancedForm">
65 <metal:advanced_form
66 use-macro="context/@@+bugtask-macros-tableview/advanced_search_form" />
67 </tal:show_advanced_form>
68
69
49 </div>70 </div>
50 <div tal:condition="view/bug_tracking_usage/enumvalue:UNKNOWN"71 <div tal:condition="view/bug_tracking_usage/enumvalue:UNKNOWN"
51 class="top-portlet">72 class="top-portlet">
52 <p>73 <p>
53 <tal:displayname replace="context/displayname" />74 <strong>
54 does not use Launchpad for bug tracking.75 <tal:displayname replace="context/displayname" />
76 does not use Launchpad for bug tracking.
77 </strong>
55 </p>78 </p>
56 <p>79 <p id="getting-started-help">
57 <a class="sprite maybe"80 <a class="sprite maybe"
58 href="https://help.launchpad.net/Bugs">Getting started81 href="https://help.launchpad.net/Bugs">Getting started
59 with bug tracking in Launchpad</a>.82 with bug tracking in Launchpad</a>.
60 </p>83 </p>
61 </div>84 </div>
62 </div>85 </div>
86
63 <tal:side metal:fill-slot="side">87 <tal:side metal:fill-slot="side">
64 <div id="involvement" class="portlet involvement"88 <div id="bug-portlets" tal:condition="view/should_show_bug_information">
65 tal:condition="view/bug_tracking_usage/enumvalue:LAUNCHPAD">89 <div id="involvement" class="portlet involvement">
66 <ul>90 <ul>
67 <li style="border: 0">91 <li style="border: 0">
68 <a href="+filebug" class="menu-link-filebug sprite bugs">92 <a href="+filebug" class="menu-link-filebug sprite bugs">
69 Report a bug93 Report a bug
70 </a>94 </a>
71 </li>95 </li>
72 </ul>96 </ul>
73 </div>97 </div>
74 <tal:menu replace="structure view/@@+related-pages" />98 <tal:menu replace="structure view/@@+related-pages" />
75 <tal:do_not_show_portlets_advanced_form99 <tal:do_not_show_portlets_advanced_form
76 condition="not: view/shouldShowAdvancedForm">100 condition="not: view/shouldShowAdvancedForm">
77 <tal:block content="structure context/@@+portlet-bugfilters"101 <tal:block content="structure context/@@+portlet-bugfilters" />
78 tal:condition="view/bug_tracking_usage/enumvalue:LAUNCHPAD"/>102 <tal:block
79 <tal:block103 content="structure context/@@+portlet-publishing-details | nothing"/>
80 content="structure context/@@+portlet-publishing-details | nothing"/>104 <tal:block content="structure context/@@+portlet-bugtags"/>
81 <tal:block content="structure context/@@+portlet-bugtags"105 <tal:releasecriticalbugs
82 tal:condition="view/bug_tracking_usage/enumvalue:LAUNCHPAD"/>106 tal:condition="view/shouldShowReleaseCriticalPortlet"
83 <tal:releasecriticalbugs107 tal:content="structure context/@@+portlet-bugtasklist-seriesbugs" />
108 <tal:milestonecriticalbugs
84 tal:condition="view/shouldShowReleaseCriticalPortlet"109 tal:condition="view/shouldShowReleaseCriticalPortlet"
85 tal:content="structure context/@@+portlet-bugtasklist-seriesbugs" />110 tal:content="structure context/@@+portlet-bugtasklist-milestonebugs" />
86 <tal:milestonecriticalbugs111 </tal:do_not_show_portlets_advanced_form>
87 tal:condition="view/shouldShowReleaseCriticalPortlet"112 </div>
88 tal:content="structure context/@@+portlet-bugtasklist-milestonebugs" />
89 </tal:do_not_show_portlets_advanced_form>
90 </tal:side>113 </tal:side>
91</body>114</body>
92115
93116
=== modified file 'lib/lp/soyuz/stories/packaging/package-pages-navigation.txt'
--- lib/lp/soyuz/stories/packaging/package-pages-navigation.txt 2010-05-19 05:47:50 +0000
+++ lib/lp/soyuz/stories/packaging/package-pages-navigation.txt 2010-10-18 01:11:10 +0000
@@ -39,7 +39,7 @@
39 * Blueprints - not linked39 * Blueprints - not linked
40 * Translations - not linked40 * Translations - not linked
41 * Answers - http://answers.launchpad.dev/ubuntu/+source/alsa-utils41 * Answers - http://answers.launchpad.dev/ubuntu/+source/alsa-utils
42 Main heading: (No main heading)42 Main heading: Bugs in ?alsa-utils? package in Ubuntu
4343
4444
45== Distribution source package release ==45== Distribution source package release ==
@@ -196,4 +196,3 @@
196 * Translations - http://translations.launchpad.dev/ubuntu/hoary196 * Translations - http://translations.launchpad.dev/ubuntu/hoary
197 * Answers - not linked197 * Answers - not linked
198 Main heading: pmount 0.1-1 (i386 binary) in ubuntu hoary198 Main heading: pmount 0.1-1 (i386 binary) in ubuntu hoary
199
200199
=== modified file 'lib/lp/testing/views.py'
--- lib/lp/testing/views.py 2010-09-19 03:09:49 +0000
+++ lib/lp/testing/views.py 2010-10-18 01:11:10 +0000
@@ -85,7 +85,8 @@
85def create_initialized_view(context, name, form=None, layer=None,85def create_initialized_view(context, name, form=None, layer=None,
86 server_url=None, method=None, principal=None,86 server_url=None, method=None, principal=None,
87 query_string=None, cookie=None, request=None,87 query_string=None, cookie=None, request=None,
88 path_info='/', rootsite=None):88 path_info='/', rootsite=None,
89 current_request=False):
89 """Return a view that has already been initialized."""90 """Return a view that has already been initialized."""
90 if method is None:91 if method is None:
91 if form is None:92 if form is None:
@@ -94,7 +95,8 @@
94 method = 'POST'95 method = 'POST'
95 view = create_view(96 view = create_view(
96 context, name, form, layer, server_url, method, principal,97 context, name, form, layer, server_url, method, principal,
97 query_string, cookie, request, path_info, rootsite=rootsite)98 query_string, cookie, request, path_info, rootsite=rootsite,
99 current_request=current_request)
98 view.initialize()100 view.initialize()
99 return view101 return view
100102