~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Graham Binns
  • Date: 2011-09-15 16:31:49 UTC
  • mto: This revision was merged to the branch mainline in revision 14019.
  • Revision ID: graham@canonical.com-20110915163149-vac8fyzc697ok6w8
Batched activity now no longer pulls in results that have already been shown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
from lp.bugs.interfaces.bugwatch import IBugWatchSet
159
159
from lp.bugs.interfaces.cve import ICveSet
160
160
from lp.bugs.mail.bugnotificationrecipients import BugNotificationRecipients
 
161
from lp.bugs.model.bugactivity import BugActivity
161
162
from lp.bugs.model.bugattachment import BugAttachment
162
163
from lp.bugs.model.bugbranch import BugBranch
163
164
from lp.bugs.model.bugcve import BugCve
2191
2192
            self._attachments_query(),
2192
2193
            operator.itemgetter(0))
2193
2194
 
 
2195
    def getActivityForDateRange(self, start_date, end_date):
 
2196
        """See `IBug`."""
 
2197
        store = Store.of(self)
 
2198
        activity_in_range = store.find(
 
2199
            BugActivity,
 
2200
            BugActivity.bug == self,
 
2201
            BugActivity.datechanged >= start_date,
 
2202
            BugActivity.datechanged <= end_date)
 
2203
        return activity_in_range
2194
2204
 
2195
2205
@ProxyFactory
2196
2206
def get_also_notified_subscribers(