Deleted events still appear on the day view

Bug #1334883 reported by Leo Arias
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Calendar App
Fix Released
High
Jason

Bug Description

I'm testing this on an up-to-date utopic desktop, running from trunk.

To reproduce:
Go to day view
Add an event
Open the added event
Delete it

You will be back at the day view, where the event is still visible.

This seems like a cache or lack of refresh, because if I close the app and open it again, the event is no longer there.

Tags: elopio
Mihir Soni (mihirsoni)
Changed in ubuntu-calendar-app:
status: New → Triaged
importance: Undecided → High
Jason (gerlowskija)
Changed in ubuntu-calendar-app:
assignee: nobody → Jason (gerlowskija)
Revision history for this message
Jason (gerlowskija) wrote :

So just as a quick note, it looks like Events are stored in the Calendar App in an EventListModel element, which looks like it's just a wrapper around the QtOrganizer::OrganizerModel QML element. OrganizerModel uses saveItem() and removeItem() methods for changing the events in the list.

I added some logging, and was able to confirm that when the 'delete' icon is clicked from the "Event Details" page, removeItem() does get called.

This is all to say that I agree with Leo's guess that the page just isn't refreshed when an event is deleted. There doesn't seem to be any explicit refreshing done when new items are added, or existing ones are deleted. I'm going to dig into how this "refreshing" is/should-be done.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

yes, it looks like due to some recent changes, events are not getting refreshed after deleting event.

When I debugged I found two issue.
1) Event are not getting refreshed after deleting it.
   Which can be resolved by calling destroyAllChildren(); in timelinebase.qml, when event is deleted.

2) Model is not getting refreshed properly after deleting event. atlest for me when I see model count before and after deleting event I am getting the same count. This needs to be investigated further.

Revision history for this message
Leo Arias (elopio) wrote :

I added a test for this here:
https://code.launchpad.net/~elopio/ubuntu-calendar-app/fix1332173-swipe_to_create_new_event/+merge/224735

When you fix it, please remember to remove the skip.

Thanks.

Revision history for this message
Jason (gerlowskija) wrote :

I pushed up a branch that has a fix for the (visible) effects of this bug: https://code.launchpad.net/~gerlowskija/ubuntu-calendar-app/bug13348833

With the code changes on this branch, deleted events don't appear in the DayView, and Leo's test passes (on my 14.04 desktop at least). However, I didn't address Kunal Parmar's 2nd concern in Comment 2 above. I'm a little unclear on where to find the model-count he's referring to. I'm going to try and grab his attention on IRC (or here) and ask for a little clarification before I (potentially) propose my branch for merging.

Revision history for this message
Mihir Soni (mihirsoni) wrote :

Hi Jason,

you have forgot to Proposed your branch , so I have proposed it now.

Will test and provide feedback.

Thanks.

Revision history for this message
Jason (gerlowskija) wrote :

After getting much help from Kunal, I've pushed a new branch containing a fix for this behavior. I deleted the branch I'd previously proposed for merging because it took an approach that Kunal advised against.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

i believe this bug is resolved, can you confirm ?

Revision history for this message
Jason (gerlowskija) wrote :

Thanks for the reminder Kunal, forgot to update this page. Yes, the bug is fixed (for me, at least) using the latest trunk. I'm going to mark this as "Fix Committed"

Changed in ubuntu-calendar-app:
status: Triaged → Fix Committed
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.