Page MenuHomePhorge

Invitation handling
Closed, ResolvedPublic

Description

The handling of invitations in mail is done in more parts:

display the invitation

kdepim/plugins/messageviewer/body_formater/text_calendar.cpp
ldepimlibs/kcalutils/incidenceformater.cpp

most interessting function: formatICalInvitationHelper

existingInc = calendar()->incidence(incBase->uid())

^^ this is correct, but needs also recurenceID, to detect exceptions:

existingInc = calendar()->incidence(incBase->uid(), incBase->recurenceID())

handling the click

kdepim/plugins/messageviewer/body_formater/text_calendar.cpp
entry point: handleClick
handleInvitation

  • iCal is the mail
  • invitation is the the invitation parsed out of the mail (not checked if existing) and updated!

saveFile (with iCal - the mail to send)

kdepimlibs/akonadi/calendar/itiphandler.cpp
-> ITIPHandler::processiTIPMessage(const QString &receiver, const QString &iCal, const QString &action)
set d->m_incidence but it is the parsed invitation out of iCal
for "cancel" it detects existing incidence by schedulingID, but only uses this for displaying the warning about not finding an event to delete in the debug log

call d->m_scheduler->acceptTransaction in anycase

kdepimlibs/akonadi/calendar/schedular_p.cpp
-> acceptTransaction
->acceptRequest, acceptAdd,...

acceptRequest / acceptCancel

  • detects existingIncidence byScheduilingID only
  • test if the existingIncidence has not the the status NeedsAction for our status
  • if above is true than tries to find exception

    existingInstance = calendar->incidence(incidence->instanceIdentifier());

^^ this is wrong in my understanding and should be rewritten to, because the incidence method test if the recurrenceID is null if it is not set:

existingInstance = calendar->incidence(incidence->uid(), incBase->recurenceID());

acceptReply

  • detects existingIncidence by calendar()->incidence(uid)

^^ also problem with exceptions

Details

Ticket Type
Epic

Event Timeline

knauss claimed this task.
knauss raised the priority of this task from to 60.
knauss updated the task description. (Show Details)
knauss added projects: KDE PIM, Restricted Project.
knauss changed Ticket Type from Task to Epic.
knauss moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
knauss added subscribers: knauss, mollekopf.

I think we also wanna get rid of this - This destroys the event for wallace/rcm handling:

`kdepimlibs/akonadi/calendar/schedular_p.cpp`

line 315f:

// Move the uid to be the schedulingID and make a unique UID
incidence->setSchedulingID(schedulingUid, CalFormat::createUniqueId());

problems seen from the code:

  • detection of existing event in calendar vs. if wallace adds the events

-> create D14 to fix this

  • exception handling ( if we have a exception to a event series)

-> there is a test already itiphandlertest testProcessITIPMessages:"accept recid cancel", and the test passes.
-> needs manual testing

  • strange code, that tries to detect, what events to update

-> delete most of this code, just update every incidecne, we can write.

john:

  • create event with 7 occurences and jane as attendee (needs-action)
  • mail is send to jane
  • event seris is shown correctly

jane:

  • sees the event series in her open invitation calendar
  • accepts the event series by mail button
  • mail is sent

john:

  • sees the mail from jane and record her reply via mail
  • see the updated status in his calendar
  • creates exception by drag-drop mail is sent but recipient status is not resetted to needs-action
  • updates the exceptions again (chaging start time), mail is sent

jane:

  • got two mails
  • record first to her calendar
  • decline second
  • calendar is not updated correctly (a new exception is created)
  • mail is sent

john:

  • got mail
  • record response
  • see error dialog "Error: Could not find incidence to update, it probably was deleted recently."
  • but calendar is updated correctly

fixed:

  • "Error: Could not find incidence to update, it probably was deleted recently."
  • calendar is not updated correctly (a new exception is created)

open:

  • creates exception by drag-drop mail is sent but recipient status is not resetted to needs-action

events with status=cancelled are not shown in korganizer.

mollekopf moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 17 2015, 3:56 PM
mollekopf moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 23 2015, 6:06 PM