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

V3/auto accept #10415

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

V3/auto accept #10415

wants to merge 19 commits into from

Conversation

dunkOnIT
Copy link
Contributor

This replaces #10381 - I needed to make thewca the base repo for the first PR so that the diff on the 2nd PR wouldn't be absurdly long like the last time I branched off an in-review PR.


Lots to do here, will probably just handle basic pending -> accepted case in this PR.

Implementation Thoughts

  • I'm adding an auto_accept method on the registration model. I think this should ultimately be where our auto_accept logic lives, and that is what will get called even if we have multiple entry points for auto_accepting. For example:
    • creation of a RegistrationPayment has an after_create hook that calls registration.auto_accept
    • if we want to do a BulkAutoAccept job, it can just iterate through the pending registrations in order of payment and call auto_accept on each of them

This PR

  • Add auto-accept and auto-accept-cutoff settings to competition table
  • Make them available in the competition form
  • Add tests for auto-accept functionality
  • Add tests for auto-accept cutoff
  • Hide it behind a feature flag? Or just give organizers a way to turn it off

Next PR

  • Give organizers a way to toggle auto-accept on/off
  • Give organizers a way to run a bulk auto-accept
  • Automatically run bulk auto-accept when auto-accept is toggled on
    • Warn organizers this will happen, and give them an "Are you sure?" dialogue, where saying "No" will

Later PR's

  • Auto-accept users onto waiting list when Accepted is full
    • Should they be accepted onto the waiting list if the auto-accept-cutff has been reached?
    • If so, then we should also implement a warning when an organizer tries to approve a user from the pending list while there are users in the waiting list
  • Auto-accept users from waiting list if a spot becomes available in the accepted list (ie, if an attendee's status changes away from accepted

Questions:

  • Should we default to 0 or NULL if no auto_accept_threshold is set
  • Think carefully about naming of db fields

@FinnIckler
Copy link
Member

You could have still branched off your PR but squashed your previous commits using rebase (which you can then drop after merge)

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