~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-06-08 00:14:25 UTC
  • mfrom: (13165.2.2 bug-793809)
  • Revision ID: launchpad@pqm.canonical.com-20110608001425-i7noud89pt3iy93y
[r=wgrant][bug=793809] Use BugSummary to do tag portlet calculations

Show diffs side-by-side

added added

removed removed

Lines of Context:
494
494
        """See `IBugTarget`."""
495
495
        return self.distroseries.getUsedBugTags()
496
496
 
497
 
    def getUsedBugTagsWithOpenCounts(self, user, wanted_tags=None):
498
 
        """See `IBugTarget`."""
 
497
    def getUsedBugTagsWithOpenCounts(self, user, tag_limit=0, include_tags=None):
 
498
        """See IBugTarget."""
 
499
        # Circular fail.
 
500
        from lp.bugs.model.bugsummary import BugSummary
499
501
        return get_bug_tags_open_count(
500
 
            And(BugTask.distroseries == self.distroseries,
501
 
                BugTask.sourcepackagename == self.sourcepackagename),
502
 
            user, wanted_tags=wanted_tags)
 
502
            And(BugSummary.distroseries == self.distroseries,
 
503
                BugSummary.sourcepackagename == self.sourcepackagename),
 
504
            user, tag_limit=tag_limit, include_tags=include_tags)
503
505
 
504
506
    @property
505
507
    def max_bug_heat(self):