Page MenuHome GnuPG

KOrganizer: unable to display events with the same UID in multiple calendars
Closed, ResolvedPublic

Event Timeline

werner triaged this task as Normal priority.Apr 20 2023, 9:02 AM
dvratil moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

Just as a background. This issue and others basically ended a project where dan and me worked on with a customer (you know who) to make Kontact from KDE 4 usable for them back in the day. The calendar was just too unreliable and this was one of the causes we identified. This does not mean that it will fix the unreliableness that we see with our calendars at work, but it is an issue that should be fixed.

PRs:
https://invent.kde.org/pim/akonadi-calendar/-/merge_requests/67
https://invent.kde.org/pim/eventviews/-/merge_requests/88
https://invent.kde.org/pim/korganizer/-/merge_requests/103

The problem boils down to how port to Akonadi happened: all Items from all calendar-like Akonadi Collections are merged into a single ETMCalendar instance (which is a a KCalendarCore::Calendar), basically merging all calendars into a single giant one. This caused the issue that when multiple Collections contained incidences with the same UID, they would get randomly dropped by the ETMCalendar, since as per the iCal standard - all UIDs in a single calendar must be unique.

The fact that we merge all incidences into a single huge calendar has been a long-standing pet peeve of mine, so I took this opportunity to fix the problem properly by re-working the EventViews library to support displaying incidences from multiple calendar instances and modified KOrganizer to create a dedicated Calendar instance for each enabled Akonadi Collection. This not only fixes the issue with incidences with duplicated UIDs not being shown, but also opens the path to more optimizations and improvements inside the EventViews library to be faster and nicer-looking.

As usual, 95% of the work was pretty straightforward and completed very quickly, but the hardest part to get working was of course one of the more obscure features - custom columns in multi-agenda view, which took me quite some time to understand and polish.

This is still a fairly aggressive change, so once it gets merged, we will have fair amount of time before the next 23.12 release to get testing from wider community.

Thank you. I think it is good that we have now the time to attack some of these more difficult problems :) I don't understand the code there so don't expect a review from me.

dvratil moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

The changes have been merged and will be part of KDE Gear 23.12.