#1: Recurring Events 2.0

Contents
  1. Definitions
  2. Motivation
  3. Assumptions
  4. Proposal
  5. Implementation
  6. Risks
  7. Progress log
  8. Participants
by pwd last modified Jun 20, 2006 04:42 PM

This implementation of recurring events will utilize a new content type to allow for ONE object to exist on the Plone site and update the catalog for any date range (including infinite) while supporting iCal and vCal standards by extending the current event.py.

Proposed by
Steven Haddox
Seconded by
Larry Lay
Proposal type
Architecture
State
in-progress

Definitions

Schemata for "Event Recurring" portal type:

  • BooleanField - recurEvent: Default is true, non-selectable - used as a trigger in catalog queries
  • BooleanField - recurException: Checkbox if single date is an exception to overall recurrance
  • StringField (tuple?) - recurExceptionDates: Hidden tuple/list of dates that have exceptions
  • StringField (selectionWidget) - recurFreq: Frequency of event (Weekly, Bi-Weekly, Monthly, Annually)
  • BooleanField - recurLast: Checkbox for last week of the month occurrance
  • DateTimeField - recurEndDate: DateTime box for end date (not required)
  • BooleanField - recurIndefinite: Checkbox for infinitely recurring events (default=true)

Motivation

This proposal exists as the current implementation of recurring events does not support global object creation, infinite date ranges, or installation without modification of core Plone system files. This add-on product could easily be integrated into existing Plone 2.1+ sites and could easily support new releases of Plone as well.

Assumptions

User is willing to allow changes to logical code in default Plone calendar.

Proposal

Linethrough indicates completed portions of the product thus far.
  1. Utilize the same logic as from Recurring Events 1.0
    • Subclass event.py
    • Add support for Yearly frequency
  2. Make recurring events implementation globally possible
  3. One Object within the Plone site
    • Custom method available to return array (dictionary) of dates and event objects in same form as Calendar Portlet utilizes
    • Support iCal standards
    • Allow for single event exceptions within a recurring event
  4. Calendar Support:

Implementation

This product will assume that the user wants to do as little as possible to add recurring events to their default Plone installation. It will provide an easily installable product that extends the existing event schemata and creates a new content type "event recurring".

The most difficult part of a single-object implementation will be to allow for exceptions to the recurring events and to implement the logic of recurring events being displayed into the portlet calendar (and possibly other calendars such as CalendarX).

The exceptions can be handled in a fairly simple manner by providing a boolean checkbox trigger that will add the passed "start-date" to a tuple (recurExceptionDates). This field is just a list of dates that should NOT be displayed with the recurring event logic as a traditional event object will be created for any exceptions.

The process of displaying recurring-events within the default portlet calendar and other calendars is the most difficult part. The way we are doing this is to implement the same methods used in the default Plone calendar and replicate a customized method that can be invoked for a certain date range and will retrieve a list of days as well as which recurring events occur on each specific date. From here the calendar can take an already familiar list format (since it is just appended to CalendarTool.py from CMFCalendar) and format the data however they see fit.

Risks

Modifications to default portlet calendar may be lost if user upgrades Plone and does not reinstall the product.

Progress log

06/20/2006 - Completed recurring event start and end dates logic

05/31/2006 - Completed portlet display of recurring events as well as most recurring event logic, this utilizes a custom method that is invoked in CalendarTool.py (CMFCalendar folder) and then appends the two lists together to display all recurring events and regular events on the Plone portlet calendar.

04/21/2006 - Completed basic product installation and schemata infrastructure for portal_type eventRecur

To-Do list:

  • Installation:
    1. Install script needs to backup a copy of CMFCalendar and implement new version with integration for recurring events function and appending for currently returned list.
    2. Install script needs to add EventTypes to portal_metadata -> subjects -> elements -> Recurring Events type automatically
    3. Install script needs to add metadata fields to catalog for the following: getRecurDay, ....
  • Features:
    1. Support recurring event exceptions
    2. Create a single event object with customized information when an exception is triggered
    3. Support iCal exporting with RRules and exception information (as much as possible)

Participants

Steven Haddox (Shaddo-X)
Larry Lay

OTHERS WELCOME!