Deleted Tasks Reappear After Syncing
Description:
Currently, when a user deletes their tasks from the database using the Delete Tasks button in the Navbar, the tasks are removed from Firebase. However, when the user clicks on Sync, the deleted tasks reappear in the database.
Cause:
- The current implementation syncs tasks from Taskwarrior to Firebase.
- When the user deletes tasks from Firebase, they are not removed from Taskwarrior.
- Upon syncing, Taskwarrior still contains the tasks, causing them to be re-added to Firebase.
Expected Behavior:
- When a user deletes their tasks, they should be removed from both Firebase and Taskwarrior.
- Syncing should not re-add deleted tasks from Taskwarrior to Firebase.
Proposed Solution:
- Modify the Delete Tasks feature to also remove tasks from Taskwarrior before deleting them from Firebase.
- Ensure that during sync, only existing tasks in Taskwarrior are added to the database.
Steps to Reproduce:
- Delete all tasks using the Delete Tasks button.
- Click Sync to fetch tasks from Taskwarrior.
- Previously deleted tasks reappear in Firebase.
That is the expected behavior. The Delete tasks button in the navbar is supposed to delete the tasks only on the firestore in case the user does not want their tasks to be stored on out DB. To delete all tasks from our Taskchampion instance, one can use the Delete all + prune commands from their CLI and it would work just fine. Did not implement this in the API as it is too costly and time consuming process for a user to delete all their tasks on the Taskchampion sync server instance. Reference from my GSoC Report
Can You provide the link of your gsoc report again as the above link is not working!!
https://github.com/its-me-abhishek/gsoc-report