feat: add recurrence rule support for importing calendar event from .ics file [v1-r]
Description
This MR enables support for recurring events while importing them from an .ics file.
Screenshots
Before | After |
---|---|
Technical details
The VEVENT component of the iCalendar format, is a key element used in calendar applications to represent scheduled events.
The RRULE property in the iCalendar format (VEVENT component) specifies how an event repeats over time. It stands for "recurrence rule" and defines the pattern for recurring events.
Suppose you have a weekly team meeting scheduled every Monday at 10 AM, starting from July 10, 2024, and you want this pattern to continue for 10 occurrences.
Here’s how you would represent this recurring event in an iCalendar format using the RRULE property:
BEGIN:VEVENT
UID:20240710T100000-1234@example.com
DTSTART:20240710T100000
DTEND:20240710T110000
SUMMARY:Weekly Team Meeting
RRULE:FREQ=WEEKLY;COUNT=10;BYDAY=MO
DTSTAMP:20240701T123000Z
END:VEVENT
Breakdown of the RRULE:
- FREQ=WEEKLY: This sets the frequency of the recurrence to weekly. The event will repeat every week.
- COUNT=10: This limits the number of occurrences of the event to 10. After 10 Mondays, the event will no longer
- BYDAY=MO: This specifies that the recurrence happens on Mondays. This works together with the FREQ to define the specific day of the week the event recurs.
In the Calendar app, while importing from an .ics file, the required RRULE data was not set for the event. Hence, the Edit screen didn't have the correct recurrence information.
This MR adds the RRULE data to the passing intent, so that the Edit screen can have the data required to set the recurrence rule and reflect it on the UI.
Tests
Manual tests have been performed to check if:
- There are multiple occurrence of the event while importing from an .ics file
- Deleting a single event's occurrence doesn't impact other occurrences
- Deleting all occurrences of an event deletes the event completely from the calendar
Issues
https://gitlab.e.foundation/e/backlog/-/issues/7948
10 commandments of code reviews
Summary by CodeRabbit
-
New Features
- Added support for importing recurrence rules (RRULE) in calendar events. Users can now import events with recurring schedules more accurately.