Friday Jul 24, 2009

Email reminders mess (progress on the horizon)

One of my desktops is a Mac Mini and recently, I started to notice that the Apple Mail program would startup by itself at what seemed like random occasions and ask me for very private information like my uid, password etc... (Thunderbird is my main client).

After exonerating my kids I figured out what was happening: I have a family calendar at an ISP who now offers CalDAV access. A few days before I started to notice the ghost Mail, I had setup the Apple iCal calendar client to show that calendar. Most of the events on that calendar have email reminders associated with them. Those reminders are generated by the ISP Server but it looks like my desktop was trying to honor those as well. Would I have configure Apple Mail properly, I would have started to receive 2 copies of each reminders.

The fact that the iCalendar specification remains silent on the subject of who (client or server) should honor VALARM with an ACTION property set to EMAIL is a pretty well known issue but I always thought it was a rather theoritical one (Lightning for example does not honor email alarms). It is the first time that I face it as an end user.

It looks like the new VALARM Extension draft is coming at about the right time for me...

Thursday Jan 29, 2009

VTODO with DUE date in Apple iCal

Following my previous post, I've started to look at how due dates are leveraged by real clients, starting with Apple iCal.

Apple iCal (on Mac OS 10.5) let you create VTODOs ("To Do Items") and store them on a CalDAV Server. By default those todos have no associated dates but one can add a due date (no time):

Here is how such a todo is stored on the CalDAV server:


The VTODO component has a correct DUE property but it also has a DTSTART property which:

  1. comes out of nowhere (not visible in the UI),
  2. has no meaningful value (value hardcoded to 01/01/2004).

Client that takes the DTSTART into consideration to do some processing (e.g. to build a view) might show inconsistent results when processing such a VTODO.

Worth, the DTSTART property has a DATETIME value when the DUE property has a DATE value, causing the VTODO to be invalid per the new calsify spec.

If one tries to add an alarm (trigger -15 minutes before), the VTODO is stored as:


The TRIGGER property is missing a RELATED=END parameter which would link the alarm time to the DUE date. As a consequence, other clients will consider the TRIGGER to be relative to the DTSTART property. Since its value is meaningless (some time in 2004), the alarm will probably disappear (or be triggered as soon as the client fetches the todo).

Sunday Sep 23, 2007

Calconnect discussion: use of VALARM in clients: dismiss versus snooze

An interesting discussion happened during the Calconnect meeting, regarding alarms. The following post does not reflect the whole discussion but simply my understanding and experience with dealing with the problems that were raised.

Most desktop calendar clients (and now some web based calendar clients) will let you set display alarms.
The alarm is usually relative to the start of the event (e.g. 15 minutes before the beginning of a meeting). It can be dismissed or "snoozed" i.e. moved to a later time ("remind me again in 5 minutes").

On the standard size, the iCalendar specification lets you:

  • associate as many VALARMs as you want with a VEVENT or VTODO,

  • specify a TRIGGER time that can be an absolute time (e.g. "20070917T160000Z") or an offset (e.g. -PT30M) from the event's start or end,

  • create repeating alarms. 

In a client/server model using iCalendar as the data representation and regardless of the protocol (CalDAV, WCAP, the protocol previously known as SyncML,...), what does it mean to fire, dismiss or snooze a display alarm ?

(In the following, the client can be either a desktop application or a phone/PDA. In the case of a desktop application, the client being "turned on" really means that the application is launched).

When to fire a display alarm: 

If the client is turned on, the response is quite obvious: it should fire the display alarm as indicated by the TRIGGER property of the VALARM component (there might be several of them and they may be repeating).

But what if the client was not turned on at the time it should have triggered the alarm ?

The consensus seems to be that the client should trigger the alarm whenever it goes back on, even if it is after the start/end of the event. That way, the end user is notified that he may have missed something important. Of course, whenever possible, a client should offer a way to "Dismiss All" alarms so as to avoid having to acknowledge dozens of alarms when coming back from an extended leave.

Dismissing an alarm - non recurring event: 

This is the most simple case: the client "should" (using quotes as this is not mandated by any protocol AFAIK) remove the corresponding VALARM component from the server's copy so that other clients (or the same client after a restart) doesn't fire the alarm again. This is a relatively lightweight operation in the case of WCAP, a little bit more heavyweight in the case of CalDAV/PPKASyncML as the whole iCalendar object (VEVENT, VTODO) needs to be transmitted back to the Server.

When multiple clients are in use (or at least running) at the same time, those clients should try to detect such a change on the server and act accordingly. For example, let's imagine a user with a desktop and a laptop, both running his favorite calendar client. Both clients are turned on and hence, both display alarm messages regarding the same set of events. Now, from his laptop, the user dismisses one alarm. This will trigger a change on the server (removal of the VALARM). If well behaved, the calendar application on the desktop should detect this change on its next sync with the server and remove the display alarm from the user's view. 

Dismissing an alarm - recurring event:

As usual, this is where it gets harder:

  • Completely removing the VALARM on dismiss would correspond to not having any alarm for all the upcoming instances of the recurring event... Definitely not what the end user wants to do
  • Adding a VEVENT exception with no VALARM each time the user dismiss once instance would be very dangerous in terms of performance, usability and interoperability.
  • Not acting on the representation of the alarm means that on the next restart, the client will have no way of knowing whether it should display the last past alarm or the next scheduled one.


The Mozilla Lightning project is using an X- property (X-MOZ-LASTACK) containing a timestamp to keep track of the last time the alarm was dismissed (acknowledged). This X- property is part of the VALARM component. Using this X- property, clients can simply determine that only the next instance of the TRIGGER coming after the timestamp should be considered for display.
There seemed to be a consensus at Calconnect that standardizing this property would probably make sense.

Lightning seems to also use this X- property for non recurring events. This has the advantage that the VALARM information can be kept within the component. If the event is "moved forward" the alarm can be triggered again. On the other hand, this means that all the other clients that are not aware of this X- prop (i.e. as of today most of them) will consider that the alarm has not been dismissed. So until this property becomes standardized, I think it is better from an interop point of view to just remove the VALARM component of non recurring events when dismissing them.




« July 2016