diff --git a/ChangeLog b/ChangeLog index 19948e393..38d6e103c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-03-16 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentObject.m + ([SOGoAppointmentObject -occurence:occ]): create the occurence + with the first calendar event as master. + + * SoObjects/Appointments/SOGoTaskObject.m ([SOGoTaskObject + -occurence:occ]): create the occurence with the first calendar + task as master. + * SoObjects/Appointments/SOGoCalendarComponent.m ([SOGoCalendarComponent -lookupName:lookupNameinContext:localContextacquire:acquire]): diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index b854f87c6..740d5922e 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -129,10 +129,14 @@ - (SOGoComponentOccurence *) occurence: (iCalRepeatableEntityObject *) occ { - return [SOGoAppointmentOccurence occurenceWithComponent: occ - withMasterComponent: [self component: NO - secure: NO] - inContainer: self]; + NSArray *allEvents; + + allEvents = [[occ parent] events]; + + return [SOGoAppointmentOccurence + occurenceWithComponent: occ + withMasterComponent: [allEvents objectAtIndex: 0] + inContainer: self]; } - (iCalRepeatableEntityObject *) newOccurenceWithID: (NSString *) recID diff --git a/SoObjects/Appointments/SOGoTaskObject.m b/SoObjects/Appointments/SOGoTaskObject.m index d1e20139a..4116613b3 100644 --- a/SoObjects/Appointments/SOGoTaskObject.m +++ b/SoObjects/Appointments/SOGoTaskObject.m @@ -48,9 +48,12 @@ - (SOGoComponentOccurence *) occurence: (iCalRepeatableEntityObject *) occ { + NSArray *allTodos; + + allTodos = [[occ parent] todos]; + return [SOGoTaskOccurence occurenceWithComponent: occ - withMasterComponent: [self component: NO - secure: NO] + withMasterComponent: [allTodos objectAtIndex: 0] inContainer: self]; }