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:

    BEGIN:VCALENDAR^M
    CALSCALE:GREGORIAN^M
    PRODID:-//Ximian//NONSGML Evolution Calendar//EN^M
    VERSION:2.0^M
    X-EVOLUTION-DATA-REVISION:2014-02-25T04:39:19.361663Z(2)^M
    BEGIN:VTODO^M
    UID:20140225T043915Z-3142-32011-1543-9@ubuntu-phablet^M
    DTSTAMP:20140225T043915Z^M
    DTSTART:20140224T060000^M
    DUE:20140224T060000^M
    RRULE;X-EVOLUTION-ENDDATE=19700101T000000Z:FREQ=DAILY;COUNT=-1^M
    SUMMARY:Alarm^M
    CREATED:20140225T043915Z^M
    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) {
    >                ....
    >                e_cal_component_get_completed (comp, &tt);
    >                ....
    >                e_cal_component_get_due (comp, &dt_due);
    >                ....
    >                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 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.

** Also affects: ubuntu-ui-toolkit
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1283859

Title:
  Updated recurring alarm values are not reflected in the indicator
  until phone reboot

To manage notifications about this bug go to:
https://bugs.launchpad.net/indicator-datetime/+bug/1283859/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to