Okay, after a bit of digging I think what we need to do is remove the "event.setDueDateTime(alarm.date);" line from ubuntu-ui-toolkit's AlarmsAdapter::organizerEventFromAlarmData().
Here's an abbreviated example of a vtodo written to tasks.ics by ubuntu-clock-app --> ubuntu-ui-toolkit --> qtorganizer5-eds:
indicator-datetime tries to find calendar events within a certain time window by using e_cal_client_generate_instances(), which doesn't find the above VTODO when searching in the date range [2014-02-24 22:52:33...2014-03-24 22:52:33]
e_cal_util_get_component_occur_times() (in evolution-data-server-3.10.1/calendar/libecale-cal-util.c) has a special rule for VTODO items, looking for the ending range by taking the higher value of "completed" or "due":
Since "completed" isn't set, EDS returns "due" as the end.
"due" comes from qtorganizer5-eds's qorganizer/qorganizer-eds-engine.cpp's QOrganizerEDSEngine::parseDueDate()'s call to e_cal_component_free_datetime().
That call appears to come from ubuntu-ui-toolkit's modules/Components/plugin/adapters/alarmsadapter_organizer.cpp's AlarmsAdapter::organizerEventFromAlarmData() function calling "event.setDueDateTime(alarm.date);"
If you remove the single line "DUE" from the above VTODO, e_cal_client_generate_instances() is able to find it using the same date range mentioned above.
Okay, after a bit of digging I think what we need to do is remove the "event. setDueDateTime( alarm.date) ;" line from ubuntu-ui-toolkit's AlarmsAdapter: :organizerEvent FromAlarmData( ).
Here's an abbreviated example of a vtodo written to tasks.ics by ubuntu-clock-app --> ubuntu-ui-toolkit --> qtorganizer5-eds:
BEGIN: VCALENDAR^ M GREGORIAN^ M -//Ximian/ /NONSGML Evolution Calendar//EN^M -DATA-REVISION: 2014-02- 25T04:39: 19.361663Z( 2)^M 20140225T043915 Z-3142- 32011-1543- 9@ubuntu- phablet^ M 20140225T043915 Z^M 20140224T060000 ^M 20140224T060000 ^M X-EVOLUTION- ENDDATE= 19700101T000000 Z:FREQ= DAILY;COUNT= -1^M 20140225T043915 Z^M
CALSCALE:
PRODID:
VERSION:2.0^M
X-EVOLUTION
BEGIN:VTODO^M
UID:
DTSTAMP:
DTSTART:
DUE:
RRULE;
SUMMARY:Alarm^M
CREATED:
END:VTODO^M
END:VCALENDAR^M
indicator-datetime tries to find calendar events within a certain time window by using e_cal_client_ generate_ instances( ), which doesn't find the above VTODO when searching in the date range [2014-02-24 22:52:33. ..2014- 03-24 22:52:33]
e_cal_util_ get_component_ occur_times( ) (in evolution- data-server- 3.10.1/ calendar/ libecale- cal-util. c) has a special rule for VTODO items, looking for the ending range by taking the higher value of "completed" or "due":
> if (kind == ICAL_VTODO_ COMPONENT) { _get_completed (comp, &tt); _get_due (comp, &dt_due);
> ....
> e_cal_component
> ....
> e_cal_component
> ....
> max_time = MAX (completed_time, due_time);
Since "completed" isn't set, EDS returns "due" as the end.
"due" comes from qtorganizer5-eds's qorganizer/ qorganizer- eds-engine. cpp's QOrganizerEDSEn gine::parseDueD ate()'s call to e_cal_component _free_datetime( ).
That call appears to come from ubuntu-ui-toolkit's modules/ Components/ plugin/ adapters/ alarmsadapter_ organizer. cpp's AlarmsAdapter: :organizerEvent FromAlarmData( ) function calling "event. setDueDateTime( alarm.date) ;"
If you remove the single line "DUE" from the above VTODO, e_cal_client_ generate_ instances( ) is able to find it using the same date range mentioned above.