Forum OpenACS Q&A: Re: Notification of Calendar Events

Collapse
Posted by Luis Mosteiro on
Hi Raad,

i had the same problem for my BT enhancements. Unfortunately the notification package only understands delivery intervals, like instant/hourly/weekly, so you cannot say, notify a person to a certain day.

I resolved the problem checking the db, whether the reminder day = sysdate, and if so, create an "instant" notification. The notification package delivers the notification instantly. The problem is that you have to create a notification request on this calendar event first and then create the notification. You transfer the functionality of checking the date from the notification package to the package calling notifications (in this case calendar).

That's how I resolved this issue, hope that helps.

Collapse
Posted by Raad Al-Rawi on
Cheers Luis

I see - what you have is something that *creates* an instant notification if the event happens today.

I guess that means the issue still stands, as I believe the way to get this working is to amend the notifications package and make it aware of calendar event notifications and have it treat them differently.

I'm pretty sure this can be made to work with the minimum of changes (none to data model, some to calendar, most to notifications but should be pretty self-contained in notification::sweep::sweep_notifications).
The only bit I'm stuck on is where to store a per-user setting for the "reminder" period, that doesn't involve creating a new field somewhere in the db. I did think of a BIG kludge using parameters (ouch!).

If anyone has any ideas, I'd love to know.

Raad