~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Stuart Bishop
  • Date: 2011-11-14 07:51:26 UTC
  • mfrom: (14291 devel)
  • mto: This revision was merged to the branch mainline in revision 14299.
  • Revision ID: stuart.bishop@canonical.com-20111114075126-8jhoq57i2qphmch1
Merged rocketfuel into trivial.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
    )
139
139
from lp.code.model.sourcepackagerecipe import SourcePackageRecipe
140
140
from lp.code.model.sourcepackagerecipedata import SourcePackageRecipeData
 
141
from lp.registry.interfaces.oopsreferences import IHasOOPSReferences
141
142
from lp.registry.interfaces.person import (
142
143
    IPersonSet,
143
144
    validate_person,
160
161
    HasMilestonesMixin,
161
162
    Milestone,
162
163
    )
 
164
from lp.registry.model.oopsreferences import referenced_oops
163
165
from lp.registry.model.packaging import Packaging
164
166
from lp.registry.model.person import Person
165
167
from lp.registry.model.pillar import HasAliasMixin
309
311
    implements(
310
312
        IBugSummaryDimension, IFAQTarget, IHasBugHeat, IHasBugSupervisor,
311
313
        IHasCustomLanguageCodes, IHasIcon, IHasLogo, IHasMugshot,
312
 
        ILaunchpadUsage, IProduct, IServiceUsage)
 
314
        IHasOOPSReferences, ILaunchpadUsage, IProduct, IServiceUsage)
313
315
 
314
316
    _table = 'Product'
315
317
 
975
977
            owner=owner, title=title, content=content, keywords=keywords,
976
978
            date_created=date_created, product=self)
977
979
 
 
980
    def findReferencedOOPS(self, start_date, end_date):
 
981
        """See `IHasOOPSReferences`."""
 
982
        return list(referenced_oops(
 
983
            start_date, end_date, "product=%(product)s", {'product': self.id}
 
984
            ))
 
985
 
978
986
    def findSimilarFAQs(self, summary):
979
987
        """See `IFAQTarget`."""
980
988
        return FAQ.findSimilar(summary, product=self)