~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/distroseries.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:
81
81
    Specification,
82
82
    )
83
83
from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
84
 
from lp.bugs.interfaces.bugtarget import IHasBugHeat
 
84
from lp.bugs.interfaces.bugtarget import (
 
85
    IHasBugHeat,
 
86
    ISeriesBugTarget,
 
87
    )
85
88
from lp.bugs.interfaces.bugtaskfilter import OrderedBugTask
86
89
from lp.bugs.model.bug import (
87
90
    get_bug_tags,
212
215
    """A particular series of a distribution."""
213
216
    implements(
214
217
        ICanPublishPackages, IBugSummaryDimension, IDistroSeries, IHasBugHeat,
215
 
        IHasBuildRecords, IHasQueueItems, IServiceUsage)
 
218
        IHasBuildRecords, IHasQueueItems, IServiceUsage, ISeriesBugTarget)
216
219
 
217
220
    _table = 'DistroSeries'
218
221
    _defaultOrder = ['distribution', 'version']
804
807
        return self.fullseriesname
805
808
 
806
809
    @property
 
810
    def bugtarget_parent(self):
 
811
        """See `ISeriesBugTarget`."""
 
812
        return self.parent
 
813
 
 
814
    @property
807
815
    def max_bug_heat(self):
808
816
        """See `IHasBugs`."""
809
817
        return self.distribution.max_bug_heat