-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only allow one active staffbot request per task (#605)
* Update the choices * mark staffbot replace as complete based on the responses * Add a model test * Close open requests when sending another staff request * Fix lint errors * Save wip * Change the save order * Add tests for staff and restaff * Fix lint errors * Fix a lint error * Fix tests * Fix tests * Count number of workers instead of inquiries * Remove some debugging convenience * Rename the request status enums * Set the request status to complete when there is a winner * Exclude COMPLETE request when we are marking a winner * Add a test showing that you can not win when the request is completed * Simply check_responses_complete function * Simplify a request complete logic * No need to mark other workers as non-winner * Change the label complete to closed * Update the migration * Move the request status update logic outside of mixin * Remove test for the removed mixin functions * Remove print statements * Remove unneeded won_responses check * Apply suggestions from code review Update comments Co-Authored-By: Adam Marcus <marcua@marcua.net> * When there is a winner for a task. Make sure all the requests are closed * Leave a comment instead of save * Remove response creation for winner with no existing response Co-authored-by: Adam Marcus <marcua@marcua.net>
- Loading branch information
Showing
7 changed files
with
210 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.