Network Working Group | C. Daboo |
Internet-Draft | Apple |
Updates: 5545,5546 (if approved) | M. Douglass |
Intended status: Standards Track | RPI |
Expires: September 24, 2015 | March 23, 2015 |
Calendar Availability
draft-ietf-calext-availability-00
This document specifies a new iCalendar calendar component that allows the publication of available and unavailable time periods associated with a calendar user. This component can be used in standard iCalendar free-busy lookups, including iTIP free-busy requests, to generate repeating blocks of available or busy time with exceptions as needed.
This document also defines extensions to CalDAV calendar-access and calendar-auto-schedule which specify how this new calendar component should be used when doing free-busy time evaluation in CalDAV.
Discussion of this specification is taking place on the mailing list http://lists.osafoundation.org/mailman/listinfo/ietf-caldav .
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 24, 2015.
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Often calendar users have regular periods of time when they are either available to be scheduled or always unavailable. For example, an office worker will often wish to only appear free to their work colleagues during normal 'office hours' (e.g., Monday through Friday, 9 am through 5 pm). Or, a university professor may only be available to students during a set period of time (e.g., Thursday afternoons, 2 pm through 5 pm during term time only). Ideally users should be able to specify such periods directly via their calendar user agent, and have them automatically considered as part of the normal free-busy lookup for that user. In addition it should be possible to present different periods of available time depending on which user is making the request.
iCalendar [RFC5545] defines a "VFREEBUSY" component that can be used to represent fixed busy time periods, but it does does not provide a way to specify a repeating period of available or unavailable time. Since repeating patterns are often the case, "VFREEBUSY" components are not sufficient to solve this problem.
This specification defines a new type of iCalendar calendar component that can be used to publish user availability.
CalDAV [RFC4791] provides a way for calendar users to access and manage calendar data and exchange this data via scheduling operations. As part of this, the CalDAV calendar-access [RFC4791] feature provides a CALDAV:free-busy-query REPORT that returns free-busy information for a calendar collection or hierarchy of calendar collections. Also, the CalDAV calendar-auto-schedule [RFC6638] feature allows free-busy information for a calendar user to be determined. Both of these operations involve examining user calendars for events that 'block time', with the blocked out periods being returned in a "VFREEBUSY" component.
This specification extends the CalDAV calendar-access and CalDAV calendar-auto-schedule features to allow the new iCalendar availability components to be stored and manipulated, and to allow free-busy lookups to use the information from any such components, if present.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] .
When XML element types in the namespaces "DAV:" and "urn:ietf:params:xml:ns:caldav" are referenced in this document outside of the context of an XML fragment, the string "DAV:" and "CALDAV:" will be prefixed to the element type names respectively.
This specification adds a new "VAVAILABILITY" calendar component to iCalendar. The "VAVAILABILITY" component is itself a container for new "AVAILABLE" sub-components.
The purpose of the "VAVAILABILITY" calendar component is to provide a grouping of available time information over a specific range of time. Within that there are specific time ranges that are marked as available via a set of "AVAILABLE" calendar sub-components. Together these can be used to specify available time that can repeat over set periods of time, and which can vary over time.
availabilityc = "BEGIN" ":" "VAVAILABILITY" CRLF availabilityprop *availablec "END" ":" "VAVAILABILITY" CRLF availabilityprop = *( ; ; the following are REQUIRED, ; but MUST NOT occur more than once ; dtstamp / uid ; ; the following are OPTIONAL, ; but MUST NOT occur more than once ; busytype / class / created / description / dtstart / last-mod / organizer / priority / seq / summary / url / ; ; either 'dtend' or 'duration' MAY appear ; once, but 'dtend' and 'duration' MUST ; NOT occur in the same 'availabilityprop'. ; dtend / duration / ; ; the following are OPTIONAL, ; and MAY occur more than once ; categories / comment / contact / x-prop / iana-prop ; ) availablec = "BEGIN" ":" "AVAILABLE" CRLF availableprop "END" ":" "AVAILABLE" CRLF availableprop = *( ; ; the following are REQUIRED, ; but MUST NOT occur more than once ; dtstamp / dtstart / uid / ; ; either 'dtend' or 'duration' MAY appear ; once, but 'dtend' and 'duration' MUST NOT ; occur in the same 'availableprop'. ; 'duration' MUST NOT be present if 'dtstart' ; is not present ; dtend / duration / ; ; the following are OPTIONAL, ; but MUST NOT occur more than once ; created / description / last-mod / recurid / rrule / summary / ; ; the following are OPTIONAL, ; and MAY occur more than once ; categories / comment / contact / exdate / rdate / x-prop / iana-prop )
BEGIN:VAVAILABILITY ORGANIZER:mailto:bernard@example.com UID:vavail-1@example.com DTSTAMP:20111005T133225Z BEGIN:AVAILABLE UID:avail-1-A@example.com SUMMARY:Monday to Friday from 9:00 to 17:00 DTSTART;TZID=America/Montreal:20111002T090000 DTEND;TZID=America/Montreal:20111002T170000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR END:AVAILABLE END:VAVAILABILITY
BEGIN:VAVAILABILITY ORGANIZER:mailto:bernard@example.com UID:vavail-1@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Montreal:20111002T000000 DTEND;TZID=America/Montreal:20111202T000000 BEGIN:AVAILABLE UID:avail-1-A@example.com SUMMARY:Monday to Thursday from 9:00 to 17:00 DTSTART;TZID=America/Montreal:20111002T090000 DTEND;TZID=America/Montreal:20111002T170000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH LOCATION:Main Office END:AVAILABLE BEGIN:AVAILABLE UID:avail-1-B@example.com SUMMARY:Friday from 9:00 to 12:00 DTSTART;TZID=America/Montreal:20111006T090000 DTEND;TZID=America/Montreal:20111006T120000 RRULE:FREQ=WEEKLY LOCATION:Branch Office END:AVAILABLE END:VAVAILABILITY
BEGIN:VAVAILABILITY ORGANIZER:mailto:bernard@example.com UID:vavail-1@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Montreal:20111002T000000 DTEND;TZID=America/Montreal:20111023T030000 BEGIN:AVAILABLE UID:avail-1-A@example.com SUMMARY:Monday to Friday from 9:00 to 17:00 DTSTART;TZID=America/Montreal:20111002T090000 DTEND;TZID=America/Montreal:20111002T170000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR LOCATION:Montreal END:AVAILABLE END:VAVAILABILITY BEGIN:VAVAILABILITY ORGANIZER:mailto:bernard@example.com UID:vavail-2@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Los_Angeles:20111023T000000 DTEND;TZID=America/Los_Angeles:20111030T000000 BEGIN:AVAILABLE UID:avail-2-A@example.com SUMMARY:Monday to Friday from 9:00 to 17:00 DTSTART;TZID=America/Los_Angeles:20111023T090000 DTEND;TZID=America/Los_Angeles:20111023T170000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR LOCATION:Los Angeles END:AVAILABLE END:VAVAILABILITY BEGIN:VAVAILABILITY ORGANIZER:mailto:bernard@example.com UID:vavail-3@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Montreal:20111030T030000 BEGIN:AVAILABLE UID:avail-3-A@example.com SUMMARY:Monday to Friday from 9:00 to 17:00 DTSTART;TZID=America/Montreal:20111030T090000 DTEND;TZID=America/Montreal:20111030T170000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR LOCATION:Montreal END:AVAILABLE END:VAVAILABILITY
busytype = "BUSYTYPE" busytypeparam ":" busytypevalue CRLF busytypeparam = *(";" other-param) busytypevalue = "BUSY" / "BUSY-UNAVAILABLE" / "BUSY-TENTATIVE" / iana-token / x-name ; Default is "BUSY-UNAVAILABLE".
BUSYTYPE:BUSY
The Vavailability component allows a calendar user to describe their availability over extended periods of time through the use of recurrence patterns. This availability may be relatively constant from year to year.
However, there is usually some degree of irregularity, as people take vacations or perhaps spend a few weeks at a different office. For that period of time there can be a need to redefine their availability.
Rather than modify their existing vavailability, the "PRIORITY" property allows new vavailability components to be provided which override others of lower ordinal priority. Note that iCalendar [RFC5545] defines the "PRIORITY" property such that a value of 0 is undefined, 1 is the highest priority and 9 is the lowest.
When combining vavailability components, an absence of a "PRIORITY" property or a value of 0 implies the lowest level of priority. If two or more vavailability components have the same PRIORITY value, then their AVAILABILITY components which fall within the date range of interest are combined. It is up to the creator of such components to ensure that combining them produces a consistent and expected result.
To calculate the available time, order the intersecting "VAVAILABILITY" components by priority, those with no "PRIORITY" or a priority value of 0 first, then in decreasing order of priority that is, an increasing "PRIORITY" value.
Step through the resulting list of "VAVAILABILITY" components. For each, the time range covered by the "VAVAILABILITY" component is set to busy and then portions of it defined by the "AVAILABLE" components in the "VAVAILABILITY" component are set to free.
Note that, if any VAVAILABILITY component completely covers the date range of interest, then any lower priority VAVAILABILITY components may be ignored.
This section describes how free-busy time information for a calendar user is calculated in the presence of "VAVAILABILITY" calendar components.
An iCalendar "VFREEBUSY" component is used to convey "rolled-up" free-busy time information for a calendar user. This can be generated as the result of an iTIP free-busy [RFC5546] request or through some other mechanism (e.g., a CalDAV calendar-access CALDAV:free-busy-query REPORT).
When one or more "VAVAILABILITY" components are present and intersect the time-range for the free-busy request, first available time is calculated, as outlined in Section 4. Once that is done, regular "VEVENT" and "VFREEBUSY" components can be "overlaid" in the usual way to block out additional time.
An example procedure for this is as follows:
In the examples below a table is used to represent time slots for the period of a free-busy request. Each time slot is two hours long. The column header represents the hours from midnight local time. Each row below the column headers represents a step in the free-busy result set determination, following the procedure outlined above.
Each cell in the rows below the column header contains a single character that represents the free-busy type for the corresponding time period at the end of the process step represented by the row. The characters in the row are:
Character | Meaning |
---|---|
F | Represents "FREE" time in that slot. |
B | Represents "BUSY" time in that slot. |
U | Represents "BUSY-UNAVAILABLE" time in that slot. |
T | Represents "BUSY-TENTATIVE" time in that slot. |
A free-busy request for Monday, 6th November 2011, midnight to midnight in the America/Montreal timezone.
The user's calendar is as shown in Appendix A . This includes one "VAVAILABILITY" component giving available time within the requested time-range of 8:00 AM to 6:00 PM, together with one "VEVENT" component representing a two hour meeting starting at 12:00 PM.
Step | 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1. | F | F | F | F | F | F | F | F | F | F | F | F |
2. | U | U | U | U | U | U | U | U | U | U | U | U |
3. | U | U | U | U | F | F | F | F | F | U | U | U |
4. | U | U | U | U | F | F | B | F | F | U | U | U |
BEGIN:VAVAILABILITY ORGANIZER:mailto:bernard@example.com UID:vavail-1@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Montreal:20111002T000000 BEGIN:AVAILABLE UID:avail-1-A@example.com SUMMARY:Monday to Friday from 9:00 to 17:00 DTSTART;TZID=America/Montreal:20111002T090000 DTEND;TZID=America/Montreal:20111002T170000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR LOCATION:Montreal END:AVAILABLE END:VAVAILABILITY BEGIN:VAVAILABILITY ORGANIZER:mailto:bernard@example.com UID:vavail-2@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Los_Angeles:20111023T000000 DTEND;TZID=America/Los_Angeles:20111030T000000 BEGIN:AVAILABLE UID:avail-2-A@example.com SUMMARY:Monday to Friday from 9:00 to 17:00 DTSTART;TZID=America/Los_Angeles:20111023T090000 DTEND;TZID=America/Los_Angeles:20111023T170000 PRIORITY:1 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR LOCATION:Los Angeles END:AVAILABLE END:VAVAILABILITY
The following is another way to represent the availability of the traveling worker shown above. Here we represent their base availability of Monday through Friday, 9:00 AM to 5:00 PM each day with a "VAVAILABILITY" with defaulted PRIORITY. For the three weeks the calendar user is working in Montreal we represent it with an overriding "VAVAILABILITY" component with priority 1.
This section lists what functionality is required of a CalDAV server which supports this extension. A server:
A server supporting the features described in this document MUST include "calendar-availability" as a field in the DAV response header from an OPTIONS request on any resource that supports any calendar properties, reports, method, or privilege. A value of "calendar-availability" in the DAV response header MUST indicate that the server supports all MUST level requirements specified in this document.
>> Request <<
OPTIONS /home/bernard/calendars/ HTTP/1.1 Host: cal.example.com
>> Response <<
HTTP/1.1 200 OK Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE Allow: PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL DAV: 1, 2, 3, access-control, calendar-access, calendar-availability Date: Fri, 11 Nov 2005 09:32:12 GMT Content-Length: 0
In this example, the OPTIONS method returns the value "calendar-availability" in the DAV response header to indicate that the collection "/home/bernard/calendars/" supports the new features defined in this specification.
A CALDAV:free-busy-query REPORT can be executed on a calendar collection that contains iCalendar "VAVAILABILITY" components. When that is done, the server MUST aggregate the information in any "VAVAILABILITY" components when generating the free-busy response, as described in Section 5 .
<!ELEMENT calendar-availability (#PCDATA) > ; Data value MUST be iCalendar object containing ; "VAVAILABILITY" or "VTIMEZONE" components.
<C:calendar-availability xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" >BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//example.com//iCalendar 2.0//EN VERSION:2.0 BEGIN:VTIMEZONE LAST-MODIFIED:20040110T032845Z TZID:America/Montreal BEGIN:DAYLIGHT DTSTART:20000404T020000 RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 TZNAME:EDT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 END:DAYLIGHT BEGIN:STANDARD DTSTART:20001026T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 TZNAME:EST TZOFFSETFROM:-0400 TZOFFSETTO:-0500 END:STANDARD END:VTIMEZONE BEGIN:VAVAILABILITY UID:vavail-1@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Montreal:20111002T000000 BEGIN:AVAILABLE UID:avail-1-A@example.com SUMMARY:Monday to Friday from 9:00 to 18:00 DTSTART;TZID=America/Montreal:20111002T090000 DTEND;TZID=America/Montreal:20111002T180000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR END:AVAILABLE END:VAVAILABILITY END:VCALENDAR </C:calendar-availability>
The [RFC6638] processing of an iTIP free-busy request targeted at the owner of the CALDAV:schedule-inbox will include free-busy information derived from "VAVAILABILITY" components in any calendar collection targeted during the request, as described in Section 5. In addition, any "VAVAILABILITY" components specified in the CALDAV:calendar-availability property on the owner's Inbox, MUST be included in the free-busy calculation.
Free-busy information generated from "VAVAILABILITY" components MUST NOT include information other than busy or free time periods. In particular, user specified property values such as "SUMMARY" and "DESCRIPTION" MUST NOT be copied into the free-busy result data.
Beyond this, this specification does not add any additional security issues that are not already present in [RFC5545] and [RFC5546] .
This documents defines the following new iCalendar components to be added to the registry defined in Section 8.2.2 of [RFC5545] :
Component | Status | Reference |
---|---|---|
VAVAILABILITY | Current | RFCXXXX, Section 3.1 |
AVAILABLE | Current | RFCXXXX, Section 3.1 |
This documents defines the following new iCalendar properties to be added to the registry defined in Section 8.2.3 of [RFC5545] :
Property | Status | Reference |
---|---|---|
BUSYTYPE | Current | RFCXXXX, Section 3.2 |
Thanks to the following for providing feedback: Toby Considine and Dave Thewlis. Particular thanks go to Bernard Desruisseaux. This specification came about via discussions at the Calendaring and Scheduling Consortium.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC4791] | Daboo, C., Desruisseaux, B. and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, March 2007. |
[RFC5545] | Desruisseaux, B., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, September 2009. |
[RFC5546] | Daboo, C., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, December 2009. |
[RFC6638] | Daboo, C. and B. Desruisseaux, "Scheduling Extensions to CalDAV", RFC 6638, June 2012. |
iCalendar object
BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//example.com//iCalendar 2.0//EN VERSION:2.0 BEGIN:VTIMEZONE LAST-MODIFIED:20040110T032845Z TZID:America/Montreal BEGIN:DAYLIGHT DTSTART:20000404T020000 RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 TZNAME:EDT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 END:DAYLIGHT BEGIN:STANDARD DTSTART:20001026T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 TZNAME:EST TZOFFSETFROM:-0400 TZOFFSETTO:-0500 END:STANDARD END:VTIMEZONE BEGIN:VEVENT DTSTAMP:20111113T044111Z DTSTART;TZID=America/Montreal:20111106T120000 DURATION:PT1H SUMMARY:Meeting UID:60A48841ECB90F3F215FE3D2@example.com END:VEVENT BEGIN:VAVAILABILITY UID:vavail-1@example.com DTSTAMP:20111005T133225Z DTSTART;TZID=America/Montreal:20111002T000000 BEGIN:AVAILABLE UID:avail-1-A@example.com SUMMARY:Monday to Friday from 9:00 to 18:00 DTSTART;TZID=America/Montreal:20111002T090000 DTEND;TZID=America/Montreal:20111002T180000 RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR END:AVAILABLE END:VAVAILABILITY END:VCALENDAR
Changes in -05:
Changes in -04:
Changes in -03:
Changes in -02:
Changes in -01: