Comment 26 for bug 506018

Revision history for this message
Karl Fogel (kfogel) wrote :

Next step: we need to make this work for Product, ProductSeries, DistroSeries, DistributionSourcePackage, Distribution, SourcePackage, and Person/Team.

It seems that IMilestone, IProjectPublic, IBugTarget inherit from IHasBugs, so we should hang our implementation off of IHasBugs in lib/lp/bugs/browser/configure.zcml, instead of IBugTarget. (IMilestone, IProjectPublic, IBugTarget all seem to inherit from IHasBugs, so it should be fine.) The comment formatter is probably going to mess this up, but the relevant block in .zcml is:

        <browser:page
            name="+patches"
            for="lp.bugs.interfaces.bugtarget.IBugTarget"
            class="lp.bugs.browser.bugtarget.BugsPatchesView"
            facet="bugs"
            permission="zope.Public"
            template="../templates/bugtarget-patches.pt"/>

The only assumption we make about our context is that it provides the method searchTasks(), and this method is defined in IHasBugsBase, so there should be no problem with the change of the base class.

We'll need tests for Milestone, Project (in the sense of "project group") and bug targets -- namely Product, ProductSeries, DistroSeries, DistributionSourcePackage, Distribution, and SourcePackage.

Regarding Person / Team:

In another branch, we should add an implementation for person pages, so that people and teams can see the patches for bugs they are "interested in". Person.searchTasks() already exists, so adding a ~somebody/+patches view should be quite simple. We can probably use the existing browser class.

(Above notes partly taken from Abel Deuring's research -- thank you, Abel!)