From a1e8a5c4afc57c6d2c2e1f9e18f001ee9a54a7a4 Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Mon, 17 Feb 2025 16:49:42 +0100 Subject: [PATCH] Revert "fix(calendar): Flatten cycle change: the day at 00:00 is now used to retrieve all occurrences. This change should resolve the issue where resource availability is not detected if the event is shorter than the occurrence duration in the resource." This reverts commit 9941e2a04b9807dbc0a7f3dc0b4e07210a8e55f4. --- SoObjects/Appointments/SOGoAppointmentFolder.m | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 48da557d0..e8b7997b9 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1381,7 +1381,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir // Calculate the occurrences for the given range records = [NSMutableArray array]; - ranges = [NSMutableArray arrayWithArray: [iCalRecurrenceCalculator recurrenceRangesWithinCalendarDateRange: recurrenceRange firstInstanceCalendarDateRange: firstRange @@ -1447,16 +1446,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir max = [_records count]; ma = [NSMutableArray arrayWithCapacity: max]; - NSCalendarDate *originalDate = [_r startDate]; - - // Adjust the start date to the beginning of the day to ensure it intersects with events where the new event starts after an existing event’s start time. - _r = [NGCalendarDateRange calendarDateRangeWithStartDate:[NSCalendarDate dateWithYear:originalDate.yearOfCommonEra - month:originalDate.monthOfYear - day:originalDate.dayOfMonth - hour:0 - minute:0 - second:0 - timeZone:originalDate.timeZone] + _r = [NGCalendarDateRange calendarDateRangeWithStartDate: [_r startDate] endDate: [_r endDate]]; for (count = 0; count < max; count++)