Unplanned
Last Updated: 04 Jan 2021 12:13 by ADMIN
Martin Ivanov
Created on: 04 Jan 2021 12:12
Category: ScheduleView
Type: Bug Report
0
ScheduleView: GetOccurrencesWithoutExceptionsFromDateTimeRange returns also exceptions of the recurring appointment

The GetOccurrencesWithoutExceptionsFromDateTimeRange should return the occurrences of a recurring appointment, without the exceptions (modified or deleted occurrences). However, now the method returns modified occurrences and skips only the deleted ones. The method should skip also the modified occurrences.  

To work this around, exclude the exceptions using their state property:

var occurrencesWithoutExceptions = appointment.GetOccurrencesWithoutExceptionsFromDateTimeRange(appointment.Start, DateTime.Now.AddDays(130)).Where(o => o.State != RecurrenceState.Exception);

0 comments