~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/bugtarget.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-10-03 15:22:48 UTC
  • mfrom: (8758.4.18 garbo-lockfile)
  • Revision ID: launchpad@pqm.canonical.com-20111003152248-cv30fo2i8p0mu5mb
[r=lifeless][bug=553254] Regularly prune LoginToken rows

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
from lp.bugs.interfaces.bugtaskfilter import simple_weight_calculator
55
55
from lp.bugs.model.bugtask import (
56
56
    BugTaskSet,
 
57
    get_bug_privacy_filter,
57
58
    )
58
59
from lp.registry.interfaces.distribution import IDistribution
59
60
from lp.registry.interfaces.distributionsourcepackage import (
122
123
 
123
124
    def getBugSummaryContextWhereClause(self):
124
125
        """Return a storm clause to filter bugsummaries on this context.
125
 
 
 
126
        
126
127
        :return: Either a storm clause to filter bugsummaries, or False if
127
128
            there cannot be any matching bug summaries.
128
129
        """
222
223
    # IDistribution, IDistroSeries, IProjectGroup.
223
224
    enable_bugfiling_duplicate_search = True
224
225
 
225
 
    def getUsedBugTagsWithOpenCounts(self, user, tag_limit=0,
226
 
                                     include_tags=None):
 
226
    def getUsedBugTagsWithOpenCounts(self, user, tag_limit=0, include_tags=None):
227
227
        """See IBugTarget."""
228
228
        from lp.bugs.model.bug import get_bug_tags_open_count
229
229
        return get_bug_tags_open_count(
367
367
        store = getUtility(IStoreSelector).get(MAIN_STORE, DEFAULT_FLAVOR)
368
368
        target_clause = self._getOfficialTagClause()
369
369
        return store.find(
370
 
            OfficialBugTag, OfficialBugTag.tag == tag, target_clause).one()
 
370
            OfficialBugTag, OfficialBugTag.tag==tag, target_clause).one()
371
371
 
372
372
    def addOfficialBugTag(self, tag):
373
373
        """See `IOfficialBugTagTarget`."""