https://bugs.kde.org/show_bug.cgi?id=528230

            Bug ID: 528230
           Summary: EWS calendar resource ignores cancelled and moved
                    occurrences of a series
    Classification: Frameworks and Libraries
           Product: Akonadi
      Version First unspecified
       Reported In:
          Platform: NixOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: EWS Resource
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

Created attachment 197971
  --> https://bugs.kde.org/attachment.cgi?id=197971&action=edit
the master of such a series as the resource stores it

Version: GIT (master); also reproducible with kdepim-runtime 26.08.2 from KDE
PIM 26.08
Platform: Linux, KF6/Qt6

A calendar series of an Exchange account is drawn by every Akonadi client
exactly as its recurrence rule says, ignoring the occurrences that were
cancelled or moved in Outlook/OWA. OWA itself, and any client that lets the
server expand the series, shows the correct picture.

STEPS TO REPRODUCE
1. On the Exchange account, create a biweekly meeting, e.g. every second
   Monday at 11:30.
2. In OWA move one occurrence to another week and cancel another one.
3. Configure the Akonadi EWS resource for that account and let it sync.
4. Open the week the series runs in, in KOrganizer or merkuro.

ACTUAL BEHAVIOUR
- The cancelled occurrence is still drawn at its slot.
- The moved occurrence is not drawn at the date it was moved to; its original
  slot is drawn instead.

EXPECTED BEHAVIOUR
The cancelled slot is not drawn, and the moved occurrence is drawn where it
was moved to. Cancelling one occurrence must not delete the whole series, and
moving one must not leave the old slot in place.

WHAT THE RESOURCE DOES (kdepim-runtime master ad7f18cd3; the code around
occurrences is unchanged since the first commit in 2017)
- The calendar folder is read with SyncFolderItems(IdOnly) plus
  GetItem(MimeContent, calendar:ModifiedOccurrences,
calendar:DeletedOccurrences).
  CalendarView is not used anywhere, so the rule is expanded locally by
  KCalendarCore.
- ewsfetchcalendardetailjob.cpp:105 takes ModifiedOccurrences only when the
  iCalendar data of the master happens to contain more than one VEVENT.
- Exceptions are turned into items of their own; no EXDATE is put on the
  master, so the slot generated by the rule stays drawn.
- DeletedOccurrences is requested (line 72) but never read, so a cancelled
  occurrence cannot be excluded at all.
- ewsoccurrence.cpp:66 stores OriginalStart in mStart and validates Start
  twice, so originalStart() of a parsed occurrence is always empty.

SERVER SIDE, FOR REFERENCE (same account)
- FindItem without CalendarView returns 333 items: 46 RecurringMaster and 287
  Single, and not a single Exception.
- The exceptions exist only inside the master, in t:ModifiedOccurrences, which
  is what GetItem AllProperties returns.
- FindItem with CalendarView returns the expanded series; that is what OWA
  draws.

FIX
A merge request is on its way: it reads both occurrence lists unconditionally,
turns the cancelled occurrences into EXDATEs on the master, keeps moved
occurrences as items of their own (an EXDATE on their slot would delete the
only place where they can still be drawn), fixes the OriginalStart parser, and
hands the moved occurrences to the GetItem request that fetches them.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to