Closing because of missing user response.
Task sync occasionally deletes all tasks locally
- OwnCloud 8.1 with ~20 lists and calendars
- some task lists have +100 done and +50 not done tasks
- Most calendars are empty, or have a few events
- Edit or add new task on mobile using Tasks application from F-Droid (DavDroid is also from F-Droid)
- Tasks and calendars sync on change and every 4hours
- Leave device for a few minutes/hours
- Pick up device
- Only a few (2-5) list have any elements, all other lists are empty
- Go to account -> davdroiv -> tasks and “Sync now”
- All list are complete now
@akero Did you check the tasks app (when you open it) or only the widget?
Both. This annoying behavior is since 0.8.4. I have one device with latest version of davdroid and one with 0.8.4 - I don’t want to upgrade due to this bug. 0.8.4 works fine all the time with all lists, calendars and tasks.
Ok, I’ll get you the log next week. Sorry, but can’t do it sooner. Temporary fix for me is to disable global sync and refresh lists manually.
@akero Ok. I have experienced the “tasks disappear in the widget” problem myself, so you’re really sure that the lists are empty in the Tasks app, too?
Yes, I open Tasks application and see the list where only a few top lists have items.
And I don’t even use task widget on device with 0.9.x
I think I have found the problem:
AndroidTask.delete()didn’t delete a specific task (as it should) locally, but all tasks. That means if
- you delete a task in the CalDAV calendar,
- and then synchronize (automatically or manually),
- DAVdroid will see that the task is missing and try to delete it locally, but by mistake delete all tasks locally,
- continue synchronization and download the remaining tasks. If the delete operation was the last one, there are no tasks left, otherwise some tasks are left.
- At next synchroniziation, the remaining tasks (which have been deleted locally) are downloaded again.
This has been fixed with ical4android/7df1b515.
Sounds great, thanks!
I can confirm this works, so I sent you a donations. Thanks!