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

fix "deletion already in-progress" bug #1156

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CollinBeczak
Copy link
Contributor

Issue originally discussed in slack #maproulette-dev channel: https://osmus.slack.com/archives/C04M1NHPEQY/p1730405450254649

Issue: Challenges are unable to be edited in many ways whenever a task is in the process of deleting tasks. There is an edge case scenario, that this pr fix's, were the "deleting tasks" status on a challenge persists indefinitely.

Steps to reproduce bug bug:

  1. Create a challenge with no tasks ( results in a challenge with no status ).
  2. Delete tasks in the challenge via the deleteTasks endpoint using the api.
  3. Try again and see error.

This is fixed by preventing the challenge status resetting after all tasks are deleted if there was no original status.

Copy link

sonarqubecloud bot commented Nov 5, 2024

@ljdelight
Copy link
Contributor

Steps to reproduce bug bug:

1. Create a challenge with no tasks ( results in a challenge with no status ).
2. Delete tasks in the challenge via the deleteTasks endpoint using the api.

In step 2, what does it mean to delete tasks from the challenge (which was created with no tasks)? The challenge doesn't have any tasks, and I'm not sure what step 2 is meant to accomplish.

@CollinBeczak
Copy link
Contributor Author

Step 2 just gets the challenge to break, a user is able to attempt to delete tasks in a challenge if it has no tasks. In the discussion were this bug was brought to attention, the user that found the bug did this on accident when they were managing their challenges. Im open to other solutions... we could add a "created" status default to the status column in the challenge table, or somethng else.

@CollinBeczak
Copy link
Contributor Author

CollinBeczak commented Nov 8, 2024

It's this one, i should've probably pointed to the exact one originally:
Screenshot 2024-11-08 at 2 27 33 PM

@CollinBeczak CollinBeczak marked this pull request as ready for review December 6, 2024 21:56
@CollinBeczak CollinBeczak marked this pull request as draft December 27, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants