[Kde-pim] Recurring entries in Calendars, with exceptions

Christian Mollekopf chrigi_1 at fastmail.fm
Mon Mar 19 23:15:02 GMT 2012


On Monday 19 March 2012 20.22:32 Shaheed Haque wrote:
> Hi,
> 
> On 19 March 2012 08:50, Christian Mollekopf <chrigi_1 at fastmail.fm> wrote:
> > On Sunday 18 March 2012 10.21:10 Shaheed Haque wrote:
> >> David, thanks for confirming; I expect this is based on the notion of
> >> recurrence that is in RFCs. In principle, I assume that we could
> >> extend the EXDATE property with an X-param. Could the programming
> >> model for the RecurrenceRule be extended to support this? I guess
> >> korganizer would also have to understand the additional semantics, but
> >> being able to save and restore the data would be a first step.
> >> 
> >> Kevin, as I hinted, I suspect this is how Exchange represents things
> >> internally. Certainly representing the innards in this way would give
> >> complete flexibility.
> > 
> > The standard way to do this in iCal is not to exclude & add a new Event,
> > but to make use of RecurrenceID. This allows to add an event, matching a
> > specific date of the recurrence-set using RecurreneceID, to change
> > properties of either only that occurrence, or also all future events if
> > THISANDFUTURE is set.
> > 
> > https://tools.ietf.org/html/rfc5545#section-3.8.4.4
> > 
> > Excluding and adding a new event is a bit of a hack because you loose the
> > information that the event belongs to the recurrence.
> 
> So, the idea is to "hook" the overriding entry to an instance of the
> recurring entry - sounds interesting. Now, I'm probably not
> understanding, but if we don't have an exclusion, then does the
> Calendar program not show both the original instance and also the new
> overriding entry? Or is it expected to have logic to do the right
> thing here?

The exception replaces the original event (respectively that specific 
occurrence, or also all future occurrences).

The logic to expand recurrences is according to the rfc as follows.

* Derive recurrence set from the recurrence-rule and start-date 
* Add further recurrence dates contained in the recurrence-date property
* Remove exceptions from the exception-date property.
* Apply changes from Recurrence exceptions matching a Recurrence ID (where a 
recurrence exception really just is a normal event which has a recurrence id).

So KCalCore should notice if there are several events with the same UID, look 
for the Recurrence-ID in one of the conflicting events (which marks the 
exception), and then apply the exception at the specific occurrence specified by 
the recurrence-id.

I don't think that's possible right now, but if we need that feature we should 
implement it according to the RFC.

You can read that information more in detail in the chapters:
* https://tools.ietf.org/html/rfc5545#section-3.8.4.4
* https://tools.ietf.org/html/rfc5545#section-3.8.5

Or my simplified take at it:
http://wiki.kolab.org/User:Mollekopf/Drafts/KEP:17#Recurrences

Cheers,
Christian

> 
> > Cheers,
> > Christian
> > 
> >> 2012/3/18 Kevin Krammer <krammer at kde.org>:
> >> > On Sunday, 2012-03-18, Shaheed Haque wrote:
> >> >> Hi,
> >> >> 
> >> >> I've been looking into how Exchange handles exceptions to recurring
> >> >> Calendar entries, and trying to map them to KCalCore. The basic notion
> >> >> of having an Event with recurrences works fine, but the only support I
> >> >> see for defining exceptions is to addExRule(RecurrenceRule). This is a
> >> >> relatively poor fit for Exchange which support changes to the subject,
> >> >> location and all sorts of other properties. OTOH, an exception in
> >> >> Exchange has no ability to recur itself, which a RecurrenceRule can
> >> >> clearly handle.
> >> >> 
> >> >> Roughly speaking, an exception in Exchange is a cut-down one-off
> >> >> Event, rather than a RecurrenceRule.
> >> >> 
> >> >> Have I misunderstood how to use what is there, or are there any plans
> >> >> to change the way exceptions work to allow them to have richer
> >> >> semantics along the lines that Exchange supports?
> >> > 
> >> > Would it be possible to add a recurrence exception so that the usual
> >> > event
> >> > does not appear of the specific date and additionally add a new child
> >> > event for just that date?
> >> > 
> >> > Cheers,
> >> > Kevin
> >> > 
> >> > --
> >> > Kevin Krammer, KDE developer, xdg-utils developer
> >> > KDE user support, developer mentoring
> >> > 
> >> > _______________________________________________
> >> > KDE PIM mailing list kde-pim at kde.org
> >> > https://mail.kde.org/mailman/listinfo/kde-pim
> >> > KDE PIM home page at http://pim.kde.org/
> >> 
> >> _______________________________________________
> >> KDE PIM mailing list kde-pim at kde.org
> >> https://mail.kde.org/mailman/listinfo/kde-pim
> >> KDE PIM home page at http://pim.kde.org/
> > 
> > _______________________________________________
> > KDE PIM mailing list kde-pim at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-pim
> > KDE PIM home page at http://pim.kde.org/
> 
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list