~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-10-06 01:24:37 UTC
  • mfrom: (14039.1.12 bug-759467)
  • Revision ID: launchpad@pqm.canonical.com-20111006012437-x4xn9cohnyp5ztlx
[r=gmb][bug=759467] [r=gmb][bug=759467] Store
 INCOMPLETE_WITH_RESPONSE and INCOMPLETE_WITHOUT_RESPONSE for BugTask status
 to make queries more efficient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
from canonical.launchpad.interfaces.lpstorm import IStore
39
39
from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
40
40
from lp.bugs.interfaces.bugtarget import IHasBugHeat
41
 
from lp.bugs.interfaces.bugtask import UNRESOLVED_BUGTASK_STATUSES
 
41
from lp.bugs.interfaces.bugtask import DB_UNRESOLVED_BUGTASK_STATUSES
42
42
from lp.bugs.model.bug import (
43
43
    Bug,
44
44
    BugSet,
234
234
            BugTask.distributionID == self.distribution.id,
235
235
            BugTask.sourcepackagenameID == self.sourcepackagename.id,
236
236
            Bug.duplicateof == None,
237
 
            BugTask.status.is_in(UNRESOLVED_BUGTASK_STATUSES)).one()
 
237
            BugTask._status.is_in(DB_UNRESOLVED_BUGTASK_STATUSES)).one()
238
238
 
239
239
        # Aggregate functions return NULL if zero rows match.
240
240
        row = list(row)