TimeLineBase cannot display more than one event for a given hour

Bug #1219930 reported by Olivier Tilloy
6
This bug affects 1 person
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);
            eventMap[event.startTime.getHours()] = event
        }
        return eventMap;
    }

    function createEvents() {
        intern.eventMap = createEventMap();
        bubbleOverLay.destroyAllChildren();
        for( var i=0; i < 24; ++i ) {
            var event = intern.eventMap[i];
            if( event ) {
                bubbleOverLay.createEvent(event,i);
            }
        }
    }

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

Revision history for this message
Olivier Tilloy (osomon) wrote :

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

Changed in ubuntu-calendar-app:
importance: Undecided → High
Changed in ubuntu-calendar-app:
assignee: nobody → Kunal Parmar (pkunal-parmar)
David Planella (dpm)
Changed in ubuntu-calendar-app:
status: New → Triaged
David Planella (dpm)
Changed in ubuntu-calendar-app:
milestone: none → hack-days-1309
Olivier Tilloy (osomon)
Changed in ubuntu-calendar-app:
status: Triaged → In Progress
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calendar-app at revision 100, scheduled for release in ubuntu-calendar-app, milestone alpha-1

Changed in ubuntu-calendar-app:
status: In Progress → Fix Committed
David Planella (dpm)
Changed in ubuntu-calendar-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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