Forum OpenACS Development: Re: News package notification bug

Collapse
Posted by Ryan Gallimore on
Right, that's the problem, so the publish_date is 2012-05-02 00:00:00 which is *less* than the request creation date of, say, 2012-05-02 18:38:00.

The sweeper query requires that the request creation_date <= notif_date which in this case is the publish date down to the day. See notification/tcl/sweep-procs-postgresql.xql

The same issue appears when the subset feature is used since the request is created ms after the item.

Collapse
Posted by Dave Bauer on
Aha.

Ok so if someone requests notification for News at 10am on May 2 2012 then a new news item is created at 12pm on May 2 2012 the notification time is set to 12AM (00:00) on May 2, 2012 or time traveling back 12 hours to before the users subscribed.

OK, so the notification date for immediate publishing needs to be the creation timestamp correct?

This is the time that news should send to notifications pacakge.

Collapse
Posted by Ryan Gallimore on
Correct. My snippet above should fix it. It's a corner case since it only applies when you subscribe and an item is created on the same day. If the item is created in the future, you don't have to worry.
Collapse
Posted by Don Baccus on
So publish_date should be a timestamp, how hard is it to fix that?

I wouldn't worry about Oracle ...

Collapse
Posted by Don Baccus on
Can't use the creation_date as the notification shouldn't go out until the news item is actually published.
Collapse
Posted by Ryan Gallimore on
It's the creation date of the notification request acs_object, not the news item creation date.