From a2ca7e48d766bd5d70e673f4993c295282997ec1 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 29 Mar 2011 23:34:37 +0000 Subject: [PATCH] See ChangeLog. Monotone-Parent: 553f303f1f7a6910069af8e49e3926e86bece4b7 Monotone-Revision: bca01c4b6bca68557777af637fd2dfc8b775df37 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-03-29T23:34:37 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 9 ++++++++- UI/Scheduler/UIxAppointmentActions.m | 7 ++++++- UI/Scheduler/UIxAppointmentEditor.m | 7 ++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0db75c02..db026f369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2011-03-29 francis +2011-03-29 Francis Lachapelle * SoObjects/Appointments/iCalEvent+SOGo.m (-updateRecurrenceRulesUntilDate:): shifts the "until dates" of @@ -16,6 +16,13 @@ (-_flattenCycleRecord:forRange:intoArray:): when the event has a timezone, the "until dates" of recurrence rules must be adjusted. + * UI/Scheduler/UIxAppointmentActions.m (-adjustAction): when + modifying an event, also modify the "until dates" of recurrence rules. + + * UI/Scheduler/UIxAppointmentEditor.m (-_adjustRecurrentRules): + the "until date" of finite recurrence rules must be based on the + event end date, not the start date. + 2011-03-28 Wolfgang Sourdeau * Tools/SOGoToolRemoveDoubles.m diff --git a/UI/Scheduler/UIxAppointmentActions.m b/UI/Scheduler/UIxAppointmentActions.m index 0a5604244..90d4a7fd2 100644 --- a/UI/Scheduler/UIxAppointmentActions.m +++ b/UI/Scheduler/UIxAppointmentActions.m @@ -1,6 +1,6 @@ /* UIxAppointmentActions.m - this file is part of SOGo * - * Copyright (C) 2010 Inverse inc. + * Copyright (C) 2011 Inverse inc. * * Author: Wolfgang Sourdeau * @@ -35,6 +35,7 @@ #import #import #import +#import #import #import @@ -98,6 +99,10 @@ [event setStartDate: newStart]; [event setEndDate: newEnd]; } + + if ([event hasRecurrenceRules]) + [event updateRecurrenceRulesUntilDate: end]; + [co saveComponent: event]; response = [self responseWith204]; diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 39704cfda..b7a72bc60 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -1,8 +1,9 @@ /* UIxAppointmentEditor.m - this file is part of SOGo * - * Copyright (C) 2007-2010 Inverse inc. + * Copyright (C) 2007-2011 Inverse inc. * * Author: Wolfgang Sourdeau + * Francis Lachapelle * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -356,10 +357,10 @@ untilDate = [rule untilDate]; if (untilDate) { - // The until date must match the time of the start date + // The until date must match the time of the end date NSCalendarDate *date; - date = [[event startDate] copy]; + date = [[event endDate] copy]; [date setTimeZone: timeZone]; untilDate = [untilDate dateByAddingYears:0 months:0