Commit c02f8cc5 authored by David Faure's avatar David Faure
Browse files

DAV resource: support exception incidences

My calendar has a few events like
[...]
BEGIN:VEVENT   # the only one
DTSTAMP:20210510T164410Z
CREATED:20210510T164409Z
LAST-MODIFIED:20210510T164410Z
DTSTART;TZID=Europe/Paris:20210511T143000
DTEND;TZID=Europe/Paris:20210511T153000
RECURRENCE-ID;TZID=Europe/Paris:20210513T143000
[...]

They show up in roundcube but were missing in korganizer.
I'm no ICAL expert but I think those are exceptions
to a recurring event, detached from that recurring event.

And indeed after this fix, they show up as "Recurrence: Exception"
in korganizer.

Found by debugging "Failed to parse item data" warnings from
the DAV resource.
parent b1c67bdb
Pipeline #78284 failed with stage
in 10 minutes and 20 seconds
......@@ -160,7 +160,10 @@ bool Utils::parseDavData(const KDAV::DavItem &source, Akonadi::Item &target, Ako
}
if (!mainIncidence) {
return false;
// Some broken events have only one incidence, with a recurrence ID - like a detached exception.
// Rather than skipping those, make them appear: pick first incidence as the main one
mainIncidence = incidences.at(0);
exceptions.removeFirst();
}
for (const IncidencePtr &exception : std::as_const(exceptions)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment