~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Brad Crittenden
  • Date: 2011-06-08 12:22:23 UTC
  • mfrom: (13175 devel)
  • mto: This revision was merged to the branch mainline in revision 13183.
  • Revision ID: bac@canonical.com-20110608122223-nplxvdvqcsf0c586
MergeĀ fromĀ devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
646
646
        """See `IBugTarget`."""
647
647
        return get_bug_tags("BugTask.distribution = %s" % sqlvalues(self))
648
648
 
649
 
    def getUsedBugTagsWithOpenCounts(self, user, wanted_tags=None):
650
 
        """See `IBugTarget`."""
 
649
    def getUsedBugTagsWithOpenCounts(self, user, tag_limit=0, include_tags=None):
 
650
        """See IBugTarget."""
 
651
        # Circular fail.
 
652
        from lp.bugs.model.bugsummary import BugSummary
651
653
        return get_bug_tags_open_count(
652
 
            BugTask.distribution == self, user, wanted_tags=wanted_tags)
 
654
            And(BugSummary.distribution_id == self.id,
 
655
                BugSummary.sourcepackagename_id == None),
 
656
            user, tag_limit=tag_limit, include_tags=include_tags)
653
657
 
654
658
    def getMirrorByName(self, name):
655
659
        """See `IDistribution`."""