Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support recurring events #8

Open
jelmer opened this issue Feb 8, 2017 · 9 comments · May be fixed by #224
Open

support recurring events #8

jelmer opened this issue Feb 8, 2017 · 9 comments · May be fixed by #224
Assignees
Milestone

Comments

@jelmer
Copy link
Owner

jelmer commented Feb 8, 2017

rrule et al

@jelmer jelmer added this to the 0.2 milestone May 1, 2017
@jelmer jelmer self-assigned this Nov 1, 2017
@jansohn
Copy link

jansohn commented Dec 30, 2018

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?

@jelmer
Copy link
Owner Author

jelmer commented Dec 31, 2018

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.

@tobixen
Copy link
Contributor

tobixen commented Oct 21, 2022

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

@jelmer
Copy link
Owner Author

jelmer commented Oct 21, 2022

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 jelmer linked a pull request Oct 22, 2022 that will close this issue
@jelmer
Copy link
Owner Author

jelmer commented Oct 23, 2022

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.

@tobixen
Copy link
Contributor

tobixen commented Oct 25, 2022

I will test it

@tobixen
Copy link
Contributor

tobixen commented Oct 25, 2022

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
Copy link
Contributor

tobixen commented Oct 25, 2022

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:19970901T130000Z-123403@example.com
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.

@faan11
Copy link

faan11 commented Jan 14, 2024

any news about this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants