xandikos icon indicating copy to clipboard operation
xandikos copied to clipboard

support recurring events

Open jelmer opened this issue 7 years ago • 9 comments

rrule et al

jelmer avatar Feb 08 '17 03:02 jelmer

Just found out that this is not supported... Would be great to have this feature!

EDIT: Somehow it seems to have worked the second time I tried. Is this already supported?

jansohn avatar Dec 30 '18 23:12 jansohn

You can create recurring events and retrieve them, but specific query commands (e.g. date range searches) will only return the recurring event if the first instance is covered by the date range.

jelmer avatar Dec 31 '18 07:12 jelmer

Any ideas on how to solve this? (I'm considering to migrate my personal calendar to Xandikos, this is probably the only blocker issue)

tobixen avatar Oct 21 '22 09:10 tobixen

We need to expand rrules:

  • [ ] During regular filtering
  • [ ] When expanding for indexes, i.e. generate and store the full list of relevant timestamps

You could probably use the code for CalDAV:expand in Xandikos/CalDAV.py as inspiration (potentially with some refactoring to share more oy the logic).

jelmer avatar Oct 21 '22 11:10 jelmer

I've done some work on this, and my draft branch does work but I'm not happy with it in its current form.

It currently expands ics files when generating indexes, which can be really expensive for events that don't have an end date.

The correct solution is to store RRULE, EXDATE, EXRULE, etc in indexes as well and then evaluate those against the specified timerange when filtering.

jelmer avatar Oct 23 '22 19:10 jelmer

I will test it

tobixen avatar Oct 25 '22 03:10 tobixen

My test code still fails on the expand part, but except for that even my pesky testTodoDatesearch passed.

I will try to come up with a trivial example of expected vs observed result on a query.

tobixen avatar Oct 25 '22 04:10 tobixen

Search query:

<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <D:prop>
    <C:calendar-data>
      <C:expand start="20081101T160000Z" end="20081103T160000Z"/>
    </C:calendar-data>
  </D:prop>
  <C:filter>
    <C:comp-filter name="VCALENDAR">
      <C:comp-filter name="VEVENT">
        <C:time-range start="20081101T160000Z" end="20081103T160000Z"/>
      </C:comp-filter>
    </C:comp-filter>
  </C:filter>
</C:calendar-query>

event returned:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VEVENT
UID:[email protected]
DTSTART;VALUE=DATE:19971102
CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION
CLASS:CONFIDENTIAL
DTSTAMP:19970901T130000Z
RRULE:FREQ=YEARLY
SUMMARY:Our Blissful Anniversary
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR

The icalendar data returned is not expanded.

tobixen avatar Oct 25 '22 05:10 tobixen

any news about this issue?

faan11 avatar Jan 14 '24 12:01 faan11