← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1283859] Re: Updated recurring alarm values are not reflected in the indicator until phone reboot

 

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
SDK bug tracking, which is subscribed to qtorganizer5-eds in Ubuntu.
https://bugs.launchpad.net/bugs/1283859

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

Status in The Date and Time Indicator:
  New
Status in Clock application for Ubuntu devices:
  Confirmed
Status in Ubuntu UI Toolkit:
  New
Status in “qtorganizer5-eds” package in Ubuntu:
  New

Bug description:
  Mako 205

  Steps to reproduce:
  1. Create a recurring alarm and save it
  2. Select the saved alarm to go to edit mode
  3. Change the time or day of the alarm
  4. Hit save

  What happens:
  The alarm is correctly updated in the clock app. The indicator however still shows the old alarm time

  What should happen:
  The alarm is correctly updated *both* in the clock app and the indicator.

  If you however reboot the phone, the indicator then shows the updated
  recurring alarm time.

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