TimeLineBase cannot display more than one event for a given hour
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Calendar App |
Fix Released
|
High
|
Kunal Parmar |
Bug Description
The following is a (simplified) extract from TimeLineBase.qml:
function createEventMap() {
var eventMap = {};
for(var i = 0 ; i < model.count ; ++i) {
var event = model.get(i);
}
return eventMap;
}
function createEvents() {
for( var i=0; i < 24; ++i ) {
var event = intern.eventMap[i];
if( event ) {
}
}
}
When initially populating the event map, if two events have the same start hour, the second one overrides the first one, and so the first one is never displayed.
Using a map to represent the data is not suitable (or it should be a multi-map, associating lists of events to each hour).
Related branches
- Olivier Tilloy (community): Approve
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
-
Diff: 137 lines (+18/-29)4 files modifiedDayComponent.qml (+3/-2)
EventDetails.qml (+2/-2)
TimeLineBase.qml (+9/-22)
WeekComponent.qml (+4/-3)
Changed in ubuntu-calendar-app: | |
assignee: | nobody → Kunal Parmar (pkunal-parmar) |
Changed in ubuntu-calendar-app: | |
status: | New → Triaged |
Changed in ubuntu-calendar-app: | |
milestone: | none → hack-days-1309 |
Changed in ubuntu-calendar-app: | |
status: | Triaged → In Progress |
Changed in ubuntu-calendar-app: | |
status: | Fix Committed → Fix Released |
Bumping the importance to high as this makes one autopilot test flaky, because it relies on the presence of an event in the day view, which sometimes is not there due to this architectural issue:
calendar_ app.tests. test_calendar. TestMainView. test_new_ event