Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Replacing task content with whitespace does not delete the task #9860

Closed
Dschoordsch opened this issue Jun 24, 2024 · 2 comments · Fixed by #9968
Closed

Bug: Replacing task content with whitespace does not delete the task #9860

Dschoordsch opened this issue Jun 24, 2024 · 2 comments · Fixed by #9968
Labels
bug p3 Should be addressed when able

Comments

@Dschoordsch
Copy link
Contributor

When removing the content of a task, it is deleted. When replacing the task content with whitespace, the task enters a broken state where it says " is editing a Task".

Expected behaviour

We trim the task content on server side. Removing all task content equals a delete call. Since we can't have whitespace only tasks, this should equal a delete call as well and the task be removed.

Actual behaviour

The task enters the editing state and can therefore only be removed by the current assignee of the task.

Screen.Recording.2024-06-24.at.13.28.20.mov
@Dschoordsch Dschoordsch added bug p3 Should be addressed when able labels Jun 24, 2024
@Dschoordsch
Copy link
Contributor Author

To make sure we don't run into these discrepancies between handling on the server and client side in the future, we should delete a task in the updateTask mutation if the new content is empty.

@Dschoordsch
Copy link
Contributor Author

I think a good solution would be to get rid of the deleteTask mutation and do the deleting in updateTask anytime the content is empty. This would ensure consistent behaviour between client and server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p3 Should be addressed when able
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant