Index: akonadi/calendar/scheduler_p.cpp =================================================================== --- akonadi/calendar/scheduler_p.cpp +++ akonadi/calendar/scheduler_p.cpp @@ -472,14 +472,15 @@ Result result = ResultGenericError; QString errorString = i18n("Generic Error"); - Incidence::Ptr incidence = calendar->incidence(incidenceBase->uid()); + Incidence::Ptr incidence = calendar->incidence(incidenceBase->uid(), incidenceBase->recurrenceId()); // try harder to find the correct incidence if (!incidence) { const Incidence::List list = calendar->incidences(); for (Incidence::List::ConstIterator it=list.constBegin(), end=list.constEnd(); it != end; ++it) { - if ((*it)->schedulingID() == incidenceBase->uid()) { + if ((*it)->schedulingID() == incidenceBase->uid() && + (*it)->recurrenceId() == incidenceBase->recurrenceId()) { incidence = (*it).dynamicCast(); break; } @@ -593,7 +594,6 @@ if (result == ResultSuccess) { // We set at least one of the attendees, so the incidence changed // Note: This should not result in a sequence number bump - incidence->updated(); const bool success = calendar->modifyIncidence(incidence); if (!success) { Index: akonadi/calendar/tests/itip_data/expected_data/replyexception =================================================================== --- /dev/null +++ akonadi/calendar/tests/itip_data/expected_data/replyexception @@ -0,0 +1,40 @@ +BEGIN:VCALENDAR +PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN +VERSION:2.0 +BEGIN:VEVENT +ORGANIZER:MAILTO:their-email@dev.nul +DTSTAMP:20131025T103442Z +ATTENDEE;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT; + X-UID=their-email@dev.nul:mailto:their-email@dev.nul +ATTENDEE;CN="unittests@dev.nul";RSVP=TRUE;PARTSTAT=ACCEPTED; + ROLE=REQ-PARTICIPANT;X-UID=unittests@dev.nul:mailto:unittests@dev.nul +CREATED:20131022T230432Z +UID:uosj936i6arrtl9c2i5r2mfuvg +LAST-MODIFIED:20131025T103442Z +DESCRIPTION:Foo +SUMMARY:Daily stuff +STATUS:CONFIRMED +RRULE:FREQ=DAILY +DTSTART:20131022T090000Z +DTEND:20131022T100000Z +TRANSP:OPAQUE +END:VEVENT +BEGIN:VEVENT +ORGANIZER:MAILTO:their-email@dev.nul +ATTENDEE;RSVP=TRUE;PARTSTAT=TENTATIVE;ROLE=REQ-PARTICIPANT; + X-UID=their-email@dev.nul:mailto:their-email@dev.nul +ATTENDEE;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT; + X-UID=unittests@dev.nul:mailto:unittests@dev.nul +CREATED:20131023T175039Z +UID:uosj936i6arrtl9c2i5r2mfuvg +LAST-MODIFIED:20131025T103442Z +SUMMARY:exception +DESCRIPTION:some explanation +RECURRENCE-ID:20131023T090000Z +DTSTAMP:20131026T004419Z +DTSTART:20131024T000000Z +DTEND:20131024T010000Z +STATUS:CONFIRMED +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR Index: akonadi/calendar/tests/itip_data/expected_data/replymain =================================================================== --- /dev/null +++ akonadi/calendar/tests/itip_data/expected_data/replymain @@ -0,0 +1,40 @@ +BEGIN:VCALENDAR +PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN +VERSION:2.0 +BEGIN:VEVENT +ORGANIZER:MAILTO:their-email@dev.nul +DTSTAMP:20131025T103442Z +ATTENDEE;RSVP=TRUE;PARTSTAT=DECLINED;ROLE=REQ-PARTICIPANT; + X-UID=their-email@dev.nul:mailto:their-email@dev.nul +ATTENDEE;CN="unittests@dev.nul";RSVP=TRUE;PARTSTAT=ACCEPTED; + ROLE=REQ-PARTICIPANT;X-UID=unittests@dev.nul:mailto:unittests@dev.nul +CREATED:20131022T230432Z +UID:uosj936i6arrtl9c2i5r2mfuvg +LAST-MODIFIED:20131025T103442Z +DESCRIPTION:Foo +SUMMARY:Daily stuff +STATUS:CONFIRMED +RRULE:FREQ=DAILY +DTSTART:20131022T090000Z +DTEND:20131022T100000Z +TRANSP:OPAQUE +END:VEVENT +BEGIN:VEVENT +ORGANIZER:MAILTO:their-email@dev.nul +ATTENDEE;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT; + X-UID=their-email@dev.nul:mailto:their-email@dev.nul +ATTENDEE;RSVP=TRUE;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT; + X-UID=unittests@dev.nul:mailto:unittests@dev.nul +CREATED:20131023T175039Z +UID:uosj936i6arrtl9c2i5r2mfuvg +LAST-MODIFIED:20131025T103442Z +SUMMARY:exception +DESCRIPTION:some explanation +RECURRENCE-ID:20131023T090000Z +DTSTAMP:20131026T004419Z +DTSTART:20131024T000000Z +DTEND:20131024T010000Z +STATUS:CONFIRMED +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR Index: akonadi/calendar/tests/itip_data/invited_us_daily_reply =================================================================== --- /dev/null +++ akonadi/calendar/tests/itip_data/invited_us_daily_reply @@ -0,0 +1,19 @@ +BEGIN:VCALENDAR +PRODID:-// +VERSION:2.0 +CALSCALE:GREGORIAN +METHOD:REPLY + +BEGIN:VEVENT +DTSTAMP:20131022T230444Z +UID:uosj936i6arrtl9c2i5r2mfuvg +ORGANIZER:mailto:their-email@dev.nul +ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=DECLINED;RSVP= + TRUE;X-NUM-GUESTS=0:mailto:their-email@dev.nul +CREATED:20131022T230444Z +LAST-MODIFIED:20131022T230444Z +SEQUENCE:0 +STATUS:CONFIRMED +TRANSP:OPAQUE +END:VEVENT +END:VCALENDAR Index: akonadi/calendar/tests/itip_data/invited_us_daily_reply_recid01 =================================================================== --- /dev/null +++ akonadi/calendar/tests/itip_data/invited_us_daily_reply_recid01 @@ -0,0 +1,13 @@ +BEGIN:VCALENDAR +PRODID:Zimbra-Calendar-Provider +VERSION:2.0 +METHOD:REPLY +BEGIN:VEVENT +UID:uosj936i6arrtl9c2i5r2mfuvg +ATTENDEE;RSVP=TRUE;PARTSTAT=TENTATIVE;ROLE=REQ-PARTICIPANT; + X-UID=140218344167648:mailto:their-email@dev.nul +STATUS:CONFIRMED +RECURRENCE-ID:20131023T090000Z +DTSTAMP:20131026T004440Z +END:VEVENT +END:VCALENDAR \ No newline at end of file Index: akonadi/calendar/tests/itiphandlertest.cpp =================================================================== --- akonadi/calendar/tests/itiphandlertest.cpp +++ akonadi/calendar/tests/itiphandlertest.cpp @@ -483,6 +483,24 @@ actions.clear(); actions << QLatin1String("accepted") << QLatin1String("accepted") << QLatin1String("accepted"); QTest::newRow("accept recid update cancel") << invitation_filenames << expected_filename << actions; + + //---------------------------------------------------------------------------------------------- + // We accept a recurrening event, get an exception and get a reply for mainevent + expected_filename = QLatin1String("expected_data/replymain"); + invitation_filenames.clear(); + invitation_filenames << QLatin1String("invited_us_daily") << QLatin1String("invited_us_daily_recid01") << QLatin1String("invited_us_daily_reply"); + actions.clear(); + actions << QLatin1String("accepted") << QLatin1String("accepted") << QLatin1String("accepted"); + QTest::newRow("accept reply") << invitation_filenames << expected_filename << actions; + + //---------------------------------------------------------------------------------------------- + // We accept a recurrening event, get an exception and get a reply for exception + expected_filename = QLatin1String("expected_data/replyexception"); + invitation_filenames.clear(); + invitation_filenames << QLatin1String("invited_us_daily") << QLatin1String("invited_us_daily_recid01") << QLatin1String("invited_us_daily_reply_recid01"); + actions.clear(); + actions << QLatin1String("accepted") << QLatin1String("accepted") << QLatin1String("accepted"); + QTest::newRow("accept recid reply") << invitation_filenames << expected_filename << actions; } void ITIPHandlerTest::testProcessITIPMessagesUpdate_data()