~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/sourcepackage.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-02 05:35:39 UTC
  • mfrom: (13543.8.3 iseriesbugtarget)
  • Revision ID: launchpad@pqm.canonical.com-20110802053539-mtuhwpy3robzo470
[r=lifeless][bug=817336] Add ISeriesBugTarget,
 allowing easy detection of bug tasks on series targets.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    QuestionTargetSearch,
39
39
    )
40
40
from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
41
 
from lp.bugs.interfaces.bugtarget import IHasBugHeat
 
41
from lp.bugs.interfaces.bugtarget import (
 
42
    IHasBugHeat,
 
43
    ISeriesBugTarget,
 
44
    )
42
45
from lp.bugs.interfaces.bugtaskfilter import OrderedBugTask
43
46
from lp.bugs.model.bug import get_bug_tags_open_count
44
47
from lp.bugs.model.bugtarget import (
197
200
    """
198
201
 
199
202
    implements(
200
 
        IBugSummaryDimension, ISourcePackage, IHasBugHeat, IHasBuildRecords)
 
203
        IBugSummaryDimension, ISourcePackage, IHasBugHeat, IHasBuildRecords,
 
204
        ISeriesBugTarget)
201
205
 
202
206
    classProvides(ISourcePackageFactory)
203
207
 
326
330
        return "%s (%s)" % (self.name, self.distroseries.fullseriesname)
327
331
 
328
332
    @property
 
333
    def bugtarget_parent(self):
 
334
        """See `ISeriesBugTarget`."""
 
335
        return self.distribution_sourcepackage
 
336
 
 
337
    @property
329
338
    def title(self):
330
339
        """See `ISourcePackage`."""
331
340
        return smartquote('"%s" source package in %s') % (