Merge lp:~charlesk/indicator-datetime/lp-1411171-strengthen-recurrence-rule-test into lp:indicator-datetime/15.04

Proposed by Charles Kerr
Status: Merged
Approved by: Antti Kaijanmäki
Approved revision: 395
Merged at revision: 394
Proposed branch: lp:~charlesk/indicator-datetime/lp-1411171-strengthen-recurrence-rule-test
Merge into: lp:indicator-datetime/15.04
Diff against target: 46 lines (+12/-2)
3 files modified
src/engine-eds.cpp (+5/-2)
src/main.cpp (+1/-0)
tests/manual (+6/-0)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/lp-1411171-strengthen-recurrence-rule-test
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Approve
PS Jenkins bot (community) continuous-integration Approve
dobey (community) Approve
Review via email: mp+246629@code.launchpad.net

Commit message

Fix bug that misidentified repeating alarms as one-time alarms, causing them to be disabled after triggering.

Description of the change

=== Change Description

Fix bug that misidentified repeating alarms as one-time alarms, causing them to be disabled after triggering.

RTM MP @ https://code.launchpad.net/~charlesk/indicator-datetime/lp-1411171-strengthen-recurrence-rule-test/+merge/246633

=== MP Checklist

> Are there any related MPs required for this MP to build/function as expected? Please list.

No prerequisites

> Is your branch in sync with latest trunk? (e.g. bzr pull lp:trunk -> no changes)

Yes

> Did the code build without warnings?

Yes

> Did the tests run successfully?

Yes

> Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

> If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

> What device (or emulator) has your component test plan been executed successfully on?

Krillin 198

> What manual tests are relevant for this MP?

indicator-datetime/disable-one-time-alarms-after-notification

> Did you include a link to the MR Review Checklist Template to make your reviewer's life easier?

https://wiki.ubuntu.com/Process/Merges/Checklists/indicator-datetime

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
395. By Charles Kerr

bump to re-run CI. clumsy, but jenkins' rebuild button isn't working

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/engine-eds.cpp'
2--- src/engine-eds.cpp 2014-12-08 02:52:50 +0000
3+++ src/engine-eds.cpp 2015-01-22 05:53:44 +0000
4@@ -534,8 +534,11 @@
5 icalcomponent * icc = nullptr;
6 if (e_cal_client_get_object_finish (E_CAL_CLIENT(client), result, &icc, nullptr))
7 {
8- struct icaltimetype itt = icalcomponent_get_recurrenceid(icc);
9- if (icaltime_is_null_time(itt))
10+ auto rrule_property = icalcomponent_get_first_property (icc, ICAL_RRULE_PROPERTY); // transfer none
11+ auto rdate_property = icalcomponent_get_first_property (icc, ICAL_RDATE_PROPERTY); // transfer none
12+ const bool is_nonrepeating = (rrule_property == nullptr) && (rdate_property == nullptr);
13+
14+ if (is_nonrepeating)
15 {
16 g_debug("'%s' appears to be a one-time alarm... adding 'disabled' tag.",
17 icalcomponent_as_ical_string(icc));
18
19=== modified file 'src/main.cpp'
20--- src/main.cpp 2014-12-08 02:52:50 +0000
21+++ src/main.cpp 2015-01-22 05:53:44 +0000
22@@ -46,6 +46,7 @@
23
24 using namespace unity::indicator::datetime;
25
26+
27 namespace
28 {
29 std::shared_ptr<Engine> create_engine()
30
31=== modified file 'tests/manual'
32--- tests/manual 2014-12-08 02:52:50 +0000
33+++ tests/manual 2015-01-22 05:53:44 +0000
34@@ -56,6 +56,12 @@
35 <dd>Confirm that the alarm notification is shown</dd>
36 <dd>Confirm that the alarm's sound is played while the alarm notification is present</dd>
37 <dd>Confirm that the one-time alarm is disabled after the notification is shown. NOTE: due to a refresh bug in clock-app you may need to refresh its alarms page (by swapping back to the main page, then the alarm page again, this is tracked in #1362341) in order to see the alarm change from enabled to disabled.</dd>
38+ <dt>Create and save an upcoming repeating alarm in ubuntu-clock-app</dt>
39+ <dd>Confirm that the alarm icon appears next to the current time in unity's indicator display</dd>
40+ <dt>Wait until the alarm time is reached</dt>
41+ <dd>Confirm that the alarm notification is shown</dd>
42+ <dd>Confirm that the alarm's sound is played while the alarm notification is present</dd>
43+ <dd>Confirm that the repeating alarm is not disabled after the notification is shown. NOTE: due to a refresh bug in clock-app you may need to refresh its alarms page (by swapping back to the main page, then the alarm page again, this is tracked in #1362341) in order to see the alarm change from enabled to disabled.</dd>
44 </dl>
45
46 Test-case indicator-datetime/calendar-event-notification

Subscribers

People subscribed via source and target branches