Support for multiple calendars.
Needs ReviewPublic

Authored by knauss on Nov 24 2015, 5:33 PM.

Details

Reviewers
mlaurent
smartins
vkrause
Group Reviewers
KDE PIM
Maniphest Tasks
T1102: merge kolab kcalcore changes
Summary

This is an elaborate hack to get multi-calendar support.
All uid's in memory calendar are namespaced by calendar, so the same event
can appear multiple times in various Akonadi::Collection's.
This was so far not handled at all.

A cleaner solution would either move all this functionality into KCalCore::Calendar,
since this patch breaks most operations that work with uid's directly,
or make the the MultiCalendar a wrapper for several KCalCore::Calendars.

Diff Detail

Lint
No Linters Available
Unit
No Unit Test Coverage
knauss updated this revision to Diff 1373.Nov 24 2015, 5:33 PM
knauss retitled this revision from to Support for multiple calendars..
knauss updated this object.
knauss edited the test plan for this revision. (Show Details)
knauss added reviewers: vkrause, mlaurent, smartins.
knauss added a project: KDE PIM.
smartins edited edge metadata.Nov 24 2015, 10:16 PM

please give a use case

For kolab, in kde4 and kde3 there's Incidence::schedulingId() and X-KDE-LIBKCAL-ID, which should be good enough for most use cases, or maybe it isn't.. lets discuss it first :)

src/calendar.h
613

s/isValid/contains

knauss added a comment.EditedNov 25 2015, 12:10 PM

please give a use case

For kolab, in kde4 and kde3 there's Incidence::schedulingId() and X-KDE-LIBKCAL-ID, which should be good enough for most use cases, or maybe it isn't.. lets discuss it first :)

The use case is you have one event with multiple attendees and this is reflected that this event takes part inside multiple akonadi collections. If you display these akonadi collections together inside korganizer, the current behaviour is, that memorycalendar randomly selects one item ( the first that populates) and all other are not inserted into the calendar.

This is quite buggy, becuase the events in the differnet collection can have different status, becuase maybe someone has already accepted an invitation and one other has declined the event... Thats why the underlying structure must give the GUIs (korganizer) the possibility to work with the different akonadi items through the calendar interface.

the SchadulingId isn't used by our current design anymore because:

  • it is a kontact only solution no other client understands this. Especially in our case wallace (a autotication bot for kolab [autoaccept,decline] ) and roundcubemail isn't using schedulingId.
  • is only solves the problem to find the concrete event you already has accepted/modified etc. But with more metadata to the collections (what is your own collection), that can be solved in a more safe way. (safe in the meaning, not rely on a non standard scedulingid).
  • Thre are also patches for akonadi/calendar to strip out the need of schedulingId completly.

The main reason is that akonadi/calendar has one ETM for all collections, so the uid of one event must be valid for all collection. This holds for one collection, But doens't hold if you have any shared calendar, and you copy events to it.

Hopyfully this explains the need of a additional layer of changing the uid.