Recurrring alarms stop working after a while

Bug #1371341 reported by Renato Araujo Oliveira Filho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Clock App
Fix Released
Critical
Renato Araujo Oliveira Filho
qtorganizer5-eds
Fix Released
Critical
Renato Araujo Oliveira Filho

Bug Description

Recurring alarms is not getting correct stored.

The correct value for recurrence rule is: RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
we are storing: RRULE;X-EVOLUTION-ENDDATE=19700101T000000Z:FREQ=WEEKLY;COUNT=-1;

Related branches

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

This is my tasks.ics with invalid recurring alarm: http://paste.ubuntu.com/8375422/

Changed in ubuntu-clock-app:
importance: Undecided → Critical
Changed in qtorganizer5-eds:
importance: Undecided → Critical
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
Changed in ubuntu-clock-app:
milestone: none → rtm
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

18<charles> http://doc-snapshot.qt-project.org/qt-mobility/qorganizerrecurrencerule.html#limitCount
18<charles> int QOrganizerRecurrenceRule::limitCount () const
18<charles> Returns the "count" condition specified by the recurrence rule. The default count is -1 (ie. * unlimited)
18<charles> so we have a semantics difference between QOrganizer and libical here
18<charles> or rather, with EDS
18<charles> EDS sees 0 as unlimited, QOrganizer sees -1 as unlimited
18<charles> I don't understand how this has worked in the past though
18<charles> we've had recurring alarms work before

Revision history for this message
Charles Kerr (charlesk) wrote :

I think the COUNT=-1 might be introduced in QOrganizerEDSEngine::parseRecurrence() when it populates a struct icalrecurrencetype from a QOrganizerItem.

            if (qRule.limitDate().isValid()) {
                rule->until = icaltime_from_timet(QDateTime(qRule.limitDate()).toTime_t(), TRUE);
                rule->count = ICAL_RECURRENCE_ARRAY_MAX;
            } else {
                rule->count = qRule.limitCount();
            }

Note that last line, where rule->count gets assigned directly from qRule.limitCount().

EDS's e_cal_recur_obtain_enddate() states "If neither COUNT or UNTIL is set, the event recurs forever.", so an icalrecurrencetype.count of 0 implies an unbounded alarm.

QOrganizer's semantics differ: qRule.limitCount() returns ''the count condition specified by the recurrence rule. The default count is -1 (ie. * unlimited)''

So qtorganizer5-eds needs to translate QOrganizer's magic-unlimited-number (-1) to EDS's magic-unlimited-number (0).

NB: the reverse bug also happens in QOrganizerEDSEngine::parseRecurrence():

            if (icaltime_is_date(rule->until)) {
                QDate dt = QDate::fromString(icaltime_as_ical_string(rule->until), "yyyyMMdd");
                if (dt.isValid()) {
                    qRule.setLimit(dt);
                }
            } else {
                qRule.setLimit(rule->count);
            }

summary: - after a while recurring alarms stop to work
+ Recurrring alarms stop working after a while
Revision history for this message
Charles Kerr (charlesk) wrote :

Testing with https://jenkins.qa.ubuntu.com/job/qtorganizer5-eds-utopic-armhf-ci/16/artifact/work/output/qtorganizer5-eds_0.1.1+14.10.20140610.1bzr63pkg0utopic16-0ubuntu1_armhf.deb on mako + ubuntu-touch/devel-proposed r250.

ubuntu-clock-app's Mon-Fri repeating alarms show up like this in tasks.ics:

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
VERSION:2.0
X-EVOLUTION-DATA-REVISION:2014-09-22T16:05:38.720748Z(2)
BEGIN:VTODO
UID:20140922T160538Z-3929-32011-1443-1@ubuntu-phablet
DTSTAMP:20140922T160538Z
DTSTART:20140922T111000
DUE:19691231T235959
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
SUMMARY:Alarm
DESCRIPTION:file:///usr/share/sounds/ubuntu/ringtones/Suru arpeggio.ogg
CREATED:20140922T160538Z
LAST-MODIFIED:20140922T160538Z
BEGIN:VALARM
X-EVOLUTION-ALARM-UID:20140922T160538Z-3929-32011-1443-2@ubuntu-phablet
ACTION:AUDIO
ATTACH:file:///usr/share/sounds/ubuntu/ringtones/Suru arpeggio.ogg
END:VALARM
BEGIN:VALARM
X-EVOLUTION-ALARM-UID:20140922T160538Z-3929-32011-1443-3@ubuntu-phablet
ACTION:DISPLAY
DESCRIPTION:Alarm
END:VALARM
END:VTODO
END:VCALENDAR

Changed in ubuntu-clock-app:
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
status: New → Fix Released
Changed in qtorganizer5-eds:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.