AgendaFilters pull too many days

Bug #101579 reported by Andy Altepeter
8
Affects Status Importance Assigned to Milestone
SilvaNewsNetwork
Fix Released
Medium
Andy Altepeter

Bug Description

In SNN2.0.1, a viewer set to retrieve x days will retrieve all events on x+1 day
that start at midnight.

Here's a patch that should fix this problem:
in AgendaFilter.get_next_items:

lastnight = DateTime().earliestTime()
#we want the range from 12:00 a.m. to 11:59 p.m.
if numdays == 1: #get only one day
    enddate = lastnight.latestTime()
else:
    enddate = (lastnight + (numdays-1)).latestTime()
#XXX old way:
#enddate = lastnight + numdays

Revision history for this message
Andy Altepeter (aaltepet) wrote :

This is fixed, and merged into the Silva trunk when my aaltepet silvanews branch is approved.

Changed in silva:
status: New → Fix Committed
Revision history for this message
Andy Altepeter (aaltepet) wrote :

Need to merge this with the SNN trunk.

Changed in silva-news-network:
status: Fix Committed → In Progress
Revision history for this message
Andy Altepeter (aaltepet) wrote :

This fix is actually part of a larger refactor of the filter code, so pushing this off to 2.6 milestone.

Changed in silva-news-network:
assignee: guido-infrae → aaltepet
Revision history for this message
Andy Altepeter (aaltepet) wrote :

now merged with the SNN trunk.

Changed in silva-news-network:
status: In Progress → Fix Committed
Changed in silva-news-network:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.