~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/product.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:
799
799
        """See `IBugTarget`."""
800
800
        return get_bug_tags("BugTask.product = %s" % sqlvalues(self))
801
801
 
802
 
    def getUsedBugTagsWithOpenCounts(self, user, wanted_tags=None):
803
 
        """See `IBugTarget`."""
 
802
    def getUsedBugTagsWithOpenCounts(self, user, tag_limit=0, include_tags=None):
 
803
        """See IBugTarget."""
 
804
        # Circular fail.
 
805
        from lp.bugs.model.bugsummary import BugSummary
804
806
        return get_bug_tags_open_count(
805
 
            BugTask.product == self, user, wanted_tags=wanted_tags)
 
807
            BugSummary.product_id == self.id,
 
808
            user, tag_limit=tag_limit, include_tags=include_tags)
806
809
 
807
810
    series = SQLMultipleJoin('ProductSeries', joinColumn='product',
808
811
        orderBy='name')