diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 0b4a5f9dd..daf53f680 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -962,7 +962,7 @@ static Class sogoAppointmentFolderKlass = Nil; } /* fetch recurrent apts now. we do NOT consider events with no cycle end. */ - if (_endDate) + if (_endDate || filters) { sql = [NSString stringWithFormat: @"(c_iscycle = 1) %@ %@ %@ %@", titleSqlString, componentSqlString, privacySqlString, filterSqlString]; diff --git a/SoObjects/Appointments/iCalEvent+SOGo.m b/SoObjects/Appointments/iCalEvent+SOGo.m index bd542a20e..68bcf1fce 100644 --- a/SoObjects/Appointments/iCalEvent+SOGo.m +++ b/SoObjects/Appointments/iCalEvent+SOGo.m @@ -41,10 +41,16 @@ - (BOOL) isStillRelevant { NSCalendarDate *now; - + BOOL isStillRelevent; + now = [NSCalendarDate calendarDate]; - return ([[self endDate] earlierDate: now] == now); + if ([self isRecurrent]) + isStillRelevent = ([[self lastPossibleRecurrenceStartDate] earlierDate: now] == now); + else + isStillRelevent = ([[self endDate] earlierDate: now] == now); + + return isStillRelevent; } - (NSMutableDictionary *) quickRecord