Dependency Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004351 | SOGo | ActiveSync | public | 2017-12-05 12:06 | 2018-07-22 18:12 |
Reporter | flo_m | Assigned To | ludovic | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Android 7.1.2 + Apple Calendar 9 | OS | Android + macOS 10.12 | ||
Product Version | 3.2.10 | ||||
Fixed in Version | 4.0.1 | ||||
Summary | 0004351: Calendar Alarms / Reminders gets not synced from Desktop to Mobile Activesync Clients | ||||
Description | I've set a standard Alarm for my created calendar entries to 15min before beginning on OS X. Whenever i create a new entry, it gets the alarm flag and gets synced to sogo web interface. The Alarm works finde in the WebUI, but doesnt show up in the synced activesync device, which means the entry is there but without any alarm setting. I've checked several times. Is it possible to let sogo convert the alarm to only notify so that the activesync clients get the alarm right? | ||||
Tags | No tags attached. | ||||
i've digged a little bit deeper. This doesn't work with activesync: When creating an entry without default 15min in settings, e.g. setting the manual alarm to just notify, no sound: => This works with activesync So i think you have to treat the ACTION:AUDIO as a synonym for ACTIO:DISPLAY. In this case, entrys with notification+audio will get through activesync to the clients. |
|
Are you in the position to test a patch? |
|
yes, i could test a patch, if you can tell me what to do :-) |
|
Attached patch should sync a reminder regradless of its type. |
|
sorry, but i cannot see any patch attached? Am I doing something wrong? |
|
0005-4351.patch (4,838 bytes)
From 2e9a5a1697115775b6072994ba480f385949cd25 Mon Sep 17 00:00:00 2001 From: root <tfu@aon.at> Date: Tue, 19 Dec 2017 13:14:32 +0100 Subject: [PATCH 5/5] 4351 --- ActiveSync/iCalAlarm+ActiveSync.m | 36 +++++++++++++++++------------------- ActiveSync/iCalEvent+ActiveSync.m | 19 ++++++++----------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/ActiveSync/iCalAlarm+ActiveSync.m b/ActiveSync/iCalAlarm+ActiveSync.m index 8ca05c0..a74b707 100644 --- a/ActiveSync/iCalAlarm+ActiveSync.m +++ b/ActiveSync/iCalAlarm+ActiveSync.m @@ -45,27 +45,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - (NSString *) activeSyncRepresentationInContext: (WOContext *) context { NSMutableString *s; + NSCalendarDate *nextAlarmDate; + NSInteger delta; s = [NSMutableString string]; + + nextAlarmDate = [self nextAlarmDate]; + delta = (int)(([[(iCalEvent *)parent startDate] timeIntervalSince1970] - [nextAlarmDate timeIntervalSince1970])/60); - if ([[self action] caseInsensitiveCompare: @"DISPLAY"] == NSOrderedSame) + if ([parent isKindOfClass: [iCalEvent class]]) { - NSCalendarDate *nextAlarmDate; - NSInteger delta; - - nextAlarmDate = [self nextAlarmDate]; - delta = (int)(([[(iCalEvent *)parent startDate] timeIntervalSince1970] - [nextAlarmDate timeIntervalSince1970])/60); - - if ([parent isKindOfClass: [iCalEvent class]]) - { - // don't send negative reminder - not supported - if (delta > 0) - [s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", (int)delta]; - } - else - { - [s appendFormat: @"<ReminderTime xmlns=\"Task:\">%@</ReminderTime>", [nextAlarmDate activeSyncRepresentationInContext: context]]; - } + // don't send negative reminder - not supported + if (delta > 0) + [s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", (int)delta]; + } + else + { + [s appendFormat: @"<ReminderTime xmlns=\"Task:\">%@</ReminderTime>", [nextAlarmDate activeSyncRepresentationInContext: context]]; } return s; @@ -86,7 +82,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. trigger = [iCalTrigger elementWithTag: @"TRIGGER"]; [trigger setValueType: @"DURATION"]; [self setTrigger: trigger]; - [self setAction: @"DISPLAY"]; + if (![self action]) + [self setAction: @"DISPLAY"]; // SOGo web ui only supports 1w but not 2w (custom reminder only supports min/hours/days) // 1week = -P1W @@ -123,7 +120,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } [self setTrigger: trigger]; - [self setAction: @"DISPLAY"]; + if (![self action]) + [self setAction: @"DISPLAY"]; } } diff --git a/ActiveSync/iCalEvent+ActiveSync.m b/ActiveSync/iCalEvent+ActiveSync.m index 7a66adb..b33d6fa 100644 --- a/ActiveSync/iCalEvent+ActiveSync.m +++ b/ActiveSync/iCalEvent+ActiveSync.m @@ -321,7 +321,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. { iCalAlarm *alarm; - alarm = [self firstDisplayOrAudioAlarm]; + alarm = [self firstSupportedAlarm]; [s appendString: [alarm activeSyncRepresentationInContext: context]]; } @@ -447,6 +447,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NSCalendarDate *oldstart; NSTimeZone *userTimeZone; iCalTimeZone *tz; + iCalAlarm *alarm; id o; int deltasecs; @@ -582,23 +583,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } } - // - // If an alarm is deinfed with an action != DISPLAY, we ignore the alarm - don't want to overwrite. - // - if ([self hasAlarms] && [[[[self alarms] objectAtIndex: 0] action] caseInsensitiveCompare: @"DISPLAY"] != NSOrderedSame) - { - // Ignore the alarm for now - } - else if ((o = [theValues objectForKey: @"Reminder"]) && [o length]) + if ((o = [theValues objectForKey: @"Reminder"]) && [o length]) { + if ([self hasAlarms]) + alarm = [[self firstSupportedAlarm] mutableCopy]; + else + alarm = [[iCalAlarm alloc] init]; + // NOTE: Outlook sends a 15 min reminder (18 hour for allday) if no reminder is specified // although no default reminder is defined (File -> Options -> Clendar -> Calendar Options - > Default Reminders) // // http://answers.microsoft.com/en-us/office/forum/office_2013_release-outlook/desktop-outlook-calendar-creates-entries-with/9aef72d8-81bb-4a32-a6ab-bf7d216fb811?page=5&tm=1395690285088 // - iCalAlarm *alarm; - alarm = [[iCalAlarm alloc] init]; [alarm takeActiveSyncValues: theValues inContext: context]; [self removeAllAlarms]; -- 2.1.4 |
|
4351-v3.diff (4,882 bytes)
diff --git a/ActiveSync/iCalAlarm+ActiveSync.m b/ActiveSync/iCalAlarm+ActiveSync.m index f50ec55..a74b707 100644 --- a/ActiveSync/iCalAlarm+ActiveSync.m +++ b/ActiveSync/iCalAlarm+ActiveSync.m @@ -45,27 +45,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - (NSString *) activeSyncRepresentationInContext: (WOContext *) context { NSMutableString *s; + NSCalendarDate *nextAlarmDate; + NSInteger delta; s = [NSMutableString string]; + + nextAlarmDate = [self nextAlarmDate]; + delta = (int)(([[(iCalEvent *)parent startDate] timeIntervalSince1970] - [nextAlarmDate timeIntervalSince1970])/60); - if ([[self action] caseInsensitiveCompare: @"DISPLAY"] == NSOrderedSame) + if ([parent isKindOfClass: [iCalEvent class]]) { - NSCalendarDate *nextAlarmDate; - NSInteger delta; - - nextAlarmDate = [self nextAlarmDate]; - delta = (int)(([[(iCalEvent *)parent startDate] timeIntervalSince1970] - [nextAlarmDate timeIntervalSince1970])/60); - - if ([parent isKindOfClass: [iCalEvent class]]) - { - // don't send negative reminder - not supported - if (delta > 0) - [s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", (int)delta]; - } - else - { - [s appendFormat: @"<ReminderTime xmlns=\"Task:\">%@</ReminderTime>", [nextAlarmDate activeSyncRepresentationInContext: context]]; - } + // don't send negative reminder - not supported + if (delta > 0) + [s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", (int)delta]; + } + else + { + [s appendFormat: @"<ReminderTime xmlns=\"Task:\">%@</ReminderTime>", [nextAlarmDate activeSyncRepresentationInContext: context]]; } return s; @@ -86,7 +82,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. trigger = [iCalTrigger elementWithTag: @"TRIGGER"]; [trigger setValueType: @"DURATION"]; [self setTrigger: trigger]; - [self setAction: @"DISPLAY"]; + if (![self action]) + [self setAction: @"DISPLAY"]; // SOGo web ui only supports 1w but not 2w (custom reminder only supports min/hours/days) // 1week = -P1W @@ -115,8 +112,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. trigger = [iCalTrigger elementWithTag: @"TRIGGER"]; [trigger setValueType: @"DATE-TIME"]; [trigger setSingleValue: [NSString stringWithFormat: @"%@Z", [o iCalFormattedDateTimeString]] forKey: @""]; + + if ((o = [theValues objectForKey: @"ReminderSet"])) + { + if ([o intValue] == 0) + [trigger setValue: 0 ofAttribute: @"x-webstatus" to: @"triggered"]; + } + [self setTrigger: trigger]; - [self setAction: @"DISPLAY"]; + if (![self action]) + [self setAction: @"DISPLAY"]; } } diff --git a/ActiveSync/iCalEvent+ActiveSync.m b/ActiveSync/iCalEvent+ActiveSync.m index 7a66adb..b33d6fa 100644 --- a/ActiveSync/iCalEvent+ActiveSync.m +++ b/ActiveSync/iCalEvent+ActiveSync.m @@ -321,7 +321,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. { iCalAlarm *alarm; - alarm = [self firstDisplayOrAudioAlarm]; + alarm = [self firstSupportedAlarm]; [s appendString: [alarm activeSyncRepresentationInContext: context]]; } @@ -447,6 +447,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NSCalendarDate *oldstart; NSTimeZone *userTimeZone; iCalTimeZone *tz; + iCalAlarm *alarm; id o; int deltasecs; @@ -582,23 +583,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } } - // - // If an alarm is deinfed with an action != DISPLAY, we ignore the alarm - don't want to overwrite. - // - if ([self hasAlarms] && [[[[self alarms] objectAtIndex: 0] action] caseInsensitiveCompare: @"DISPLAY"] != NSOrderedSame) - { - // Ignore the alarm for now - } - else if ((o = [theValues objectForKey: @"Reminder"]) && [o length]) + if ((o = [theValues objectForKey: @"Reminder"]) && [o length]) { + if ([self hasAlarms]) + alarm = [[self firstSupportedAlarm] mutableCopy]; + else + alarm = [[iCalAlarm alloc] init]; + // NOTE: Outlook sends a 15 min reminder (18 hour for allday) if no reminder is specified // although no default reminder is defined (File -> Options -> Clendar -> Calendar Options - > Default Reminders) // // http://answers.microsoft.com/en-us/office/forum/office_2013_release-outlook/desktop-outlook-calendar-creates-entries-with/9aef72d8-81bb-4a32-a6ab-bf7d216fb811?page=5&tm=1395690285088 // - iCalAlarm *alarm; - alarm = [[iCalAlarm alloc] init]; [alarm takeActiveSyncValues: theValues inContext: context]; [self removeAllAlarms]; |
|
I just uploaded 4351-v3.diff (ignore the other file). |
|
sorry for the noob question, but i cannot insert this patch in my live environment, right? If not, can you tell me how to appply the patch? |
|
any update on this? |
|
Quick Update: BUT if you have shared calendars from other sogo users, the alarm still gets not synced through to the AES Device. (If account b shres cal with a, then a still gets no alarms for calendars owned by b) |
|
Have you set the property 'Show Alarms' for the subscribed calendar? |
|
yeah, this worked. Thank you very much! |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2017-12-05 12:06 | flo_m | New Issue | |
2017-12-05 13:23 | flo_m | Note Added: 0012461 | |
2017-12-19 11:21 | tfu | Note Added: 0012474 | |
2017-12-19 11:49 | flo_m | Note Added: 0012476 | |
2017-12-19 12:26 | tfu | Note Added: 0012477 | |
2017-12-19 13:00 | flo_m | Note Added: 0012478 | |
2017-12-19 13:19 | tfu | File Added: 0005-4351.patch | |
2017-12-19 18:33 | tfu | File Added: 4351-v3.diff | |
2017-12-19 18:34 | tfu | Note Added: 0012480 | |
2017-12-20 08:12 | flo_m | Note Added: 0012481 | |
2017-12-27 14:44 | flo_m | Note Added: 0012490 | |
2018-03-14 17:19 | ludovic | Changeset attached | => sogo master c495e14c |
2018-03-14 17:19 | ludovic | Assigned To | => ludovic |
2018-03-14 17:19 | ludovic | Resolution | open => fixed |
2018-03-14 17:20 | ludovic | Status | new => resolved |
2018-03-14 17:20 | ludovic | Fixed in Version | => 4.0.1 |
2018-07-13 08:39 | flo_m | Note Added: 0012952 | |
2018-07-13 08:39 | flo_m | Status | resolved => feedback |
2018-07-13 08:39 | flo_m | Resolution | fixed => reopened |
2018-07-15 10:53 | tfu | Note Added: 0012964 | |
2018-07-22 18:10 | flo_m | Note Added: 0012968 | |
2018-07-22 18:10 | flo_m | Status | feedback => assigned |
2018-07-22 18:12 | ludovic | Status | assigned => closed |
2018-07-22 18:12 | ludovic | Resolution | reopened => fixed |