Delete task only updates status to "D" instead of removing task
Describe the bug When attempting to delete a task, the task is not actually removed. Instead, its status is changed to “D” (Deleted), but the task continues to appear in the tasks list UI.
To Reproduce Steps to reproduce the behavior:
- Go to /home#tasks
- Create a new task
- Click on the task
- Click on the Delete
- Click on sync
- Observe the task list
- Expected behavior: the task should either be completely removed from the list (hard delete), or be hidden from the UI if the delete action is intended as a soft delete (status = 'D')
- Actual behavior: The task status is updated to “D” and still displayed in the UI
Screenshots
Desktop:
- OS: Windows 10
- Browser Brave (Chromium-based)
- Version Latest
Smartphone (please complete the following information):
- Not tested
Additional context This appears to be an incomplete soft-delete implementation. If soft delete is intended, the API or UI should filter out tasks with status = 'D'. I can work on fixing this if needed.
I have reviewed the issue and confirmed the behavior. It appears the system is correctly performing a "soft delete" by updating the task status to 'D', but the API endpoint responsible for fetching tasks is not filtering these records out.
Proposal: I recommend resolving this on the backend rather than the frontend. I plan to modify the task retrieval query to explicitly exclude any records where status == 'D'.
Why this approach?
Performance: It prevents unnecessary data (deleted tasks) from being sent over the network.
Security: It ensures that data marked as "deleted" is not accessible via the API response or browser developer tools.
@its-me-abhishek , @HarshRaj29004 Could you please assign this issue to me?
This behavior is intentional. In TW 3.0, tasks are first marked as deleted and are automatically removed after a certain period of time. This allows the list to work as a complete history, in case someone wants to restore or modify deleted tasks. If users prefer not to see deleted tasks, they can simply apply filters as we support a variety of those. Additionally, hard deletion is not available via the CLI running purge will remove all tasks that are marked as deleted.
Closing the issue for now