View Issue Details

IDProjectCategoryView StatusLast Update
0000245Funambol SOGo Connectorpublic2010-05-13 20:37
Reporterjaywalker Assigned Toludovic  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.6 
Fixed in Version1.0.8 
Summary0000245: alarm settings lost during synchronization to Nokia 6267
Description

I am trying to sync events a Nokia 6267 (Symbian S40) mobile with SOGo server. With only a few events in the calendar, syncing works well, at least from the server to the phone. However, events with activated alarm will have the alarm disabled on the mobile. Apperently the alarm settings are lost during the conversion of the event from V2 format to V1 which seems to happen inside the funambol connector; see below for a corresponding part of the funambol server log. The incoming V2-event has a correct VALARM entry, the resulting V1-event does not have an alarm setting enabled.

Additional Information

[2009-11-15 18:16:21,226] [funambol.sogo] [INFO] [40BB1EA9F4E5E442752199D72E16EFE6] [IMEI:355539013613938] [rmarkert] [sogo-cal] About to convert vCalendar (from v2 to v1): BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Inverse inc./SOGo 1.0//EN
BEGIN:VEVENT
UID:210D-4B003700-243-B7308AE0
SUMMARY:testtermin
CREATED:20091115T171423Z
DTSTAMP:20091115T171423Z
LAST-MODIFIED:20091115T171451Z
DTSTART;TZID=/inverse.ca/20091015_1/Europe/Berlin:20091117T110000
DTEND;TZID=/inverse.ca/20091015_1/Europe/Berlin:20091117T120000
TRANSP:OPAQUE
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT30M
END:VALARM
END:VEVENT
BEGIN:VTIMEZONE
TZID:/inverse.ca/20091015_1/Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
END:VCALENDAR
[2009-11-15 18:16:21,255] [funambol.sogo] [INFO] [40BB1EA9F4E5E442752199D72E16EFE6] [IMEI:355539013613938] [rmarkert] [sogo-cal] BEGIN:VCALENDAR
PRODID:-//Inverse inc./SOGo 1.0//EN
VERSION:1.0
BEGIN:VEVENT
UID:210D-4B003700-243-B7308AE0
SUMMARY:testtermin
CLASS:PUBLIC
DTSTART:20091117T110000
DTEND:20091117T120000
TRANSP:0
LAST-MODIFIED:20091115T171451Z
X-FUNAMBOL-ALLDAY:0
END:VEVENT
END:VCALENDAR

TagsNo tags attached.

Activities

jaywalker

jaywalker

2009-11-25 10:37

reporter   ~0000297

Hello,

the same problem occurs using a Nokia E52 with recent Symbian OS. Using the funambol client on this phone does not solve the problem.

Syncing with the funambol client on thunderbird however works well, and alarms are correctly synced.

Best regards,
jay

wcronen

wcronen

2010-03-25 04:48

reporter   ~0000795

This seems to be an old bug.
see http://www.scalableogo.org/bugs/view.php?id=29

Is nobody able to fix it?

I've the same problem on an phone with Windows Mobile 6.5

Tested with funambol-sogo 1.0.7 and nightly builds of sogo.

havardw

havardw

2010-03-28 07:02

reporter   ~0000820

The root cause of this is probably a Funambol bug, see http://forge.ow2.org/tracker/index.php?func=detail&aid=314860&group_id=96&atid=100096

wcronen

wcronen

2010-04-14 20:56

reporter   ~0000948

Very interesting:

I created an event in Outlook 2007 and synced it successfully including the reminder.

If I try the same with my phone (Windows Mobile 6.5) the alarm information is lost. In the logs I can see that the alarm is stripped off converting from v2 to v1.

In v2:
X-FUNAMBOL-ALLDAY:0
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT30M
END:VALARM
END:VEVENT

And after the internal conversion to v1 the part:
BEGIN:VALARM
...
END:VALARM
gets lost.

Seems to me like a bug of the funambol client for WM or is there a way to fix this in the funambol-sogo connector?

havardw

havardw

2010-04-15 15:59

reporter   ~0000953

wcronen, vCalendar uses AALARM instead of VALARM, so you should look for that in version 1.0

As far as I can tell the information is lost when vCalendar og iCalendar is converted to the Funambol Calendar type, which is used for converting between versions.
This should be fixed in the Funambol libraries that the connector uses, but it will also be possible to work around this in the connector code.

ludovic

ludovic

2010-04-21 19:23

administrator   ~0000975

Havard - would you like to send a temporary work around?

havardw

havardw

2010-04-21 20:22

reporter   ~0000976

I'll probably try when I get some time, but from what I've seen I think this will require some work if the time format from VALARM can't be used directly by AALARM.

2010-04-22 19:39

 

naive_aalarm.patch (1,638 bytes)   
Index: src/java/ca/inverse/sogo/engine/source/SOGoUtilities.java
===================================================================
--- src/java/ca/inverse/sogo/engine/source/SOGoUtilities.java	(revision 31)
+++ src/java/ca/inverse/sogo/engine/source/SOGoUtilities.java	Thu Apr 22 21:16:25 CEST 2010
@@ -899,6 +899,24 @@
 			// The boolean parameter triggers v1 vs. v2 conversion (v1 == true)
 			calendar = converter.calendar2vcalendar(cal, true);
             copyCustomProperties(v2.getVCalendarContent(), calendar.getVCalendarContent());
+
+            // Funambol loses alarm settings when converting to a Calendar object, see
+            // http://forge.ow2.org/tracker/index.php?func=detail&aid=314860&group_id=96&atid=100096
+            // Try to convert any valarm from v2 to aalarm.
+            // This is implementation will probably fix 95% of the cases, but doesn't cover
+            // multiple alarms or alarm times set relative to the end of the event
+            // Also note that at least Symbian devices does not seem to support relative alarms
+            VAlarm valarm = (VAlarm)v2.getVCalendarContent().getComponent("VALARM");
+            log.info("VALARM is: " + valarm);
+            if (valarm != null)
+            {
+                com.funambol.common.pim.model.Property trigger;
+
+                trigger = valarm.getProperty("TRIGGER");
+                calendar.getVCalendarContent().addProperty("AALARM", trigger.getValue());
+            }
+
+            // Write result
             writer = new VComponentWriter(VComponentWriter.NO_FOLDING);
 			s = writer.toString(calendar);
 			log.info(s);
naive_aalarm.patch (1,638 bytes)   
havardw

havardw

2010-04-22 19:49

reporter   ~0000977

I've created a first draft for a patch that uses the time from trigger in VALARM directly in AALARM.

If I enter a fixed alarm time in Lightning, then the alarm is sync'ed to my phone. In this case the alarm doesn't show up in the web interface, I've filed bug 586 about this.

If I create an event in Lightning or SOGo with a relative alarm time (like "15 minutes before"), then the alarm doesn't show on my Symbian phone, I'm guessing that it doesn't support relative alarms.

So to get a good fix for this (from my perspective), someone has to parse the relative date format and convert it to a fixed time for AALARM. I'll probably have a shot at this later, when I get some more time.

As far as I can see, committing the current patch will be a slight improvement over the current situation, and shouldn't cause any problems for anything else.

ludovic

ludovic

2010-05-13 20:37

administrator   ~0001008

Temporary fix pushed - an other bug could eventually be opened for improving the situation.

Issue History

Date Modified Username Field Change
2009-11-16 18:42 jaywalker New Issue
2009-11-25 10:37 jaywalker Note Added: 0000297
2010-03-25 04:48 wcronen Note Added: 0000795
2010-03-28 07:02 havardw Note Added: 0000820
2010-04-14 20:56 wcronen Note Added: 0000948
2010-04-15 15:59 havardw Note Added: 0000953
2010-04-21 19:23 ludovic Note Added: 0000975
2010-04-21 20:22 havardw Note Added: 0000976
2010-04-22 19:39 havardw File Added: naive_aalarm.patch
2010-04-22 19:49 havardw Note Added: 0000977
2010-05-13 20:37 ludovic Note Added: 0001008
2010-05-13 20:37 ludovic Status new => resolved
2010-05-13 20:37 ludovic Fixed in Version => 1.0.8
2010-05-13 20:37 ludovic Resolution open => fixed
2010-05-13 20:37 ludovic Assigned To => ludovic