Merge lp:~gary-wzl77/ubuntu-calendar-app/fix_1437305_and_1455377 into lp:ubuntu-calendar-app

Proposed by Gary.Wang
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 670
Merged at revision: 671
Proposed branch: lp:~gary-wzl77/ubuntu-calendar-app/fix_1437305_and_1455377
Merge into: lp:ubuntu-calendar-app
Diff against target: 188 lines (+29/-25)
3 files modified
AllDayEventComponent.qml (+2/-1)
NewEvent.qml (+6/-3)
po/com.ubuntu.calendar.pot (+21/-21)
To merge this branch: bzr merge lp:~gary-wzl77/ubuntu-calendar-app/fix_1437305_and_1455377
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Review via email: mp+262059@code.launchpad.net

Commit message

Fix end date for all day event and duplicated all day event displayed in weekly view.

Description of the change

Confirmed by Renato
https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1437305/comments/6

We save wrong end date for all day event(end date should be one day later than start date). This issue results in
1. Duplicated event display for all day event in weekly/daily view
2. Wrong date day in monthly view

This patch fix these two issue.

To post a comment you must log in.
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Confirmed this fixed bug 1455377 and bug 1437305 for me.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AllDayEventComponent.qml'
2--- AllDayEventComponent.qml 2014-11-29 03:36:18 +0000
3+++ AllDayEventComponent.qml 2015-06-16 09:28:53 +0000
4@@ -18,6 +18,7 @@
5 import QtQuick 2.3
6 import Ubuntu.Components 1.1
7 import Ubuntu.Components.Popups 1.0
8+import QtOrganizer 5.0
9
10 import "dateExt.js" as DateExt
11 import "ViewType.js" as ViewType
12@@ -39,7 +40,7 @@
13 for(var i = 0 ; i < items.length ; ++i) {
14 var event = items[(i)];
15 if( event && event.allDay ) {
16- for(var d = event.startDateTime; d <= event.endDateTime; d = d.addDays(1)) {
17+ for(var d = event.startDateTime; d < event.endDateTime; d = d.addDays(1)) {
18 var key = Qt.formatDateTime(d, "dd-MMM-yyyy");
19 if( !(key in map)) {
20 map[key] = [];
21
22=== modified file 'NewEvent.qml'
23--- NewEvent.qml 2015-05-22 12:25:24 +0000
24+++ NewEvent.qml 2015-06-16 09:28:53 +0000
25@@ -179,14 +179,17 @@
26 event = Qt.createQmlObject("import QtOrganizer 5.0; Event {}", Qt.application,"NewEvent.qml");
27 }
28
29+ event.allDay = allDayEventCheckbox.checked;
30+
31 event.startDateTime = startDate;
32- event.endDateTime = endDate;
33+ if (event.allDay)
34+ event.endDateTime = startDate.addDays(1);
35+ else
36+ event.endDateTime = endDate;
37 event.displayLabel = titleEdit.text;
38 event.description = messageEdit.text;
39 event.location = locationEdit.text
40
41- event.allDay = allDayEventCheckbox.checked;
42-
43 if( event.itemType === Type.Event ) {
44 event.attendees = []; // if Edit remove all attendes & add them again if any
45 var contacts = [];
46
47=== modified file 'po/com.ubuntu.calendar.pot'
48--- po/com.ubuntu.calendar.pot 2015-06-09 10:45:01 +0000
49+++ po/com.ubuntu.calendar.pot 2015-06-16 09:28:53 +0000
50@@ -8,7 +8,7 @@
51 msgstr ""
52 "Project-Id-Version: \n"
53 "Report-Msgid-Bugs-To: \n"
54-"POT-Creation-Date: 2015-06-09 18:44+0800\n"
55+"POT-Creation-Date: 2015-06-16 17:18+0800\n"
56 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
57 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
58 "Language-Team: LANGUAGE <LL@li.org>\n"
59@@ -46,13 +46,13 @@
60 #. on a given day. "Ev." is short form for "Events".
61 #. Please keep the translation of "Ev." to 3 characters only, as the week view
62 #. where it's shown has limited space
63-#: ../AllDayEventComponent.qml:122
64+#: ../AllDayEventComponent.qml:123
65 #, qt-format
66 msgid "%1 ev."
67 msgstr ""
68
69 #. TRANSLATORS: the argument refers to the number of all day events
70-#: ../AllDayEventComponent.qml:126
71+#: ../AllDayEventComponent.qml:127
72 #, qt-format
73 msgid "%1 all day event"
74 msgid_plural "%1 all day events"
75@@ -77,8 +77,8 @@
76 msgid "Syncing"
77 msgstr ""
78
79-#: ../CalendarChoicePopup.qml:71
80-msgid "Add new Calendar"
81+#: ../CalendarChoicePopup.qml:70
82+msgid "Add online Calendar"
83 msgstr ""
84
85 #: ../ColorPickerDialog.qml:25
86@@ -136,7 +136,7 @@
87 msgid "Delete"
88 msgstr ""
89
90-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:296
91+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:299
92 msgid "Edit Event"
93 msgstr ""
94
95@@ -154,7 +154,7 @@
96 msgid "Edit this"
97 msgstr ""
98
99-#: ../EventActions.qml:50 ../NewEvent.qml:296
100+#: ../EventActions.qml:50 ../NewEvent.qml:299
101 msgid "New Event"
102 msgstr ""
103
104@@ -165,7 +165,7 @@
105 msgid "%1 <b>%2</b>"
106 msgstr ""
107
108-#: ../EventDetails.qml:42 ../NewEvent.qml:407
109+#: ../EventDetails.qml:42 ../NewEvent.qml:410
110 msgid "Event Details"
111 msgstr ""
112
113@@ -189,11 +189,11 @@
114 msgid "Edit"
115 msgstr ""
116
117-#: ../EventDetails.qml:347 ../NewEvent.qml:509
118+#: ../EventDetails.qml:347 ../NewEvent.qml:512
119 msgid "Guests"
120 msgstr ""
121
122-#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:606
123+#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:609
124 msgid "Reminder"
125 msgstr ""
126
127@@ -216,7 +216,7 @@
128 #. TRANSLATORS: this refers to how often a recurrent event repeats
129 #. and it is shown as the header of the option selector to choose
130 #. its repetition
131-#: ../EventRepetition.qml:237 ../NewEvent.qml:590
132+#: ../EventRepetition.qml:237 ../NewEvent.qml:593
133 msgid "Repeats"
134 msgstr ""
135
136@@ -267,43 +267,43 @@
137 msgid "End time can't be before start time"
138 msgstr ""
139
140-#: ../NewEvent.qml:306
141+#: ../NewEvent.qml:309
142 msgid "Error"
143 msgstr ""
144
145-#: ../NewEvent.qml:308
146+#: ../NewEvent.qml:311
147 msgid "OK"
148 msgstr ""
149
150-#: ../NewEvent.qml:361
151+#: ../NewEvent.qml:364
152 msgid "From"
153 msgstr ""
154
155-#: ../NewEvent.qml:374
156+#: ../NewEvent.qml:377
157 msgid "To"
158 msgstr ""
159
160-#: ../NewEvent.qml:391
161+#: ../NewEvent.qml:394
162 msgid "All day event"
163 msgstr ""
164
165-#: ../NewEvent.qml:420
166+#: ../NewEvent.qml:423
167 msgid "Event Name"
168 msgstr ""
169
170-#: ../NewEvent.qml:438
171+#: ../NewEvent.qml:441
172 msgid "Description"
173 msgstr ""
174
175-#: ../NewEvent.qml:456
176+#: ../NewEvent.qml:459
177 msgid "Location"
178 msgstr ""
179
180-#: ../NewEvent.qml:471 com.ubuntu.calendar_calendar.desktop.in.in.h:1
181+#: ../NewEvent.qml:474 com.ubuntu.calendar_calendar.desktop.in.in.h:1
182 msgid "Calendar"
183 msgstr ""
184
185-#: ../NewEvent.qml:513
186+#: ../NewEvent.qml:516
187 msgid "Add Guest"
188 msgstr ""
189

Subscribers

People subscribed via source and target branches

to status/vote changes: