~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/distributionsourcepackage.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:
486
486
        """See `IBugTarget`."""
487
487
        return self.distribution.getUsedBugTags()
488
488
 
489
 
    def getUsedBugTagsWithOpenCounts(self, user, wanted_tags=None):
490
 
        """See `IBugTarget`."""
 
489
    def getUsedBugTagsWithOpenCounts(self, user, tag_limit=0, include_tags=None):
 
490
        """See IBugTarget."""
 
491
        # Circular fail.
 
492
        from lp.bugs.model.bugsummary import BugSummary
491
493
        return get_bug_tags_open_count(
492
 
            And(BugTask.distribution == self.distribution,
493
 
                BugTask.sourcepackagename == self.sourcepackagename),
494
 
            user, wanted_tags=wanted_tags)
 
494
            And(BugSummary.distribution == self.distribution,
 
495
                BugSummary.sourcepackagename == self.sourcepackagename),
 
496
            user, tag_limit=tag_limit, include_tags=include_tags)
495
497
 
496
498
    def _getOfficialTagClause(self):
497
499
        return self.distribution._getOfficialTagClause()