ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #09087
[Merge] lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_set_date_new_event into lp:ubuntu-calendar-app
Arthur Mello has proposed merging lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_set_date_new_event into lp:ubuntu-calendar-app.
Commit message:
Make sure that startDate/endDate is defined before setting date time
Requested reviews:
Ubuntu Calendar Developers (ubuntu-calendar-dev)
For more details, see:
https://code.launchpad.net/~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_set_date_new_event/+merge/289960
Currently we can see this when creating a new event from "New Event" bottom edge: file:///opt/click.ubuntu.com/com.ubuntu.calendar/0.5.800/NewEvent.qml:329: Error: Cannot assign [undefined] to QDateTime
This MR checks if property is undefined before setting it.
Tests necessary:
----------------
1. Make sure that events with same start/end time imported from google will be displayed with correct colors if they are past or future ones;
2. Make sure that events with different start/end time imported from google will be displayed with correct colors if they are past or future ones;
3. Make sure that when editing an existing event the correct start/end time are displayed
4. Make sure that when creating a new event it has the correct start/end time
5. Guarantee that no error is displayed while executing the above
--
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~artmello/ubuntu-calendar-app/ubuntu-calendar-app-fix_set_date_new_event into lp:ubuntu-calendar-app.
=== modified file 'NewEvent.qml'
--- NewEvent.qml 2016-03-23 13:02:47 +0000
+++ NewEvent.qml 2016-03-23 19:02:41 +0000
@@ -326,9 +326,13 @@
onEndDateChanged: {
if (!root.endDate || isNaN(root.endDate.getTime())) {
- endDateTimeInput.dateTime = startDate;
+ if (root.startDate) {
+ endDateTimeInput.dateTime = root.startDate;
+ }
} else {
- endDateTimeInput.dateTime = endDate;
+ if (root.endDate) {
+ endDateTimeInput.dateTime = root.endDate;
+ }
}
}
Follow ups