-
Notifications
You must be signed in to change notification settings - Fork 0
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
Limit registration status changes in admin? #69
Comments
This equally applies to changing registration options, since those might also influence the availability of slots or the waitinglist status of the registration. |
Well, "setting a status" is always a bit tricky since none of the application logic applies. I could imagine some kind of state machine logic that could determine "possible states to transfer to" and adding buttons to the form for those states - such as "Register" instead of "Set status to registered", with a possible |
WIP comment, out of time for now, will edit to become complete later. It might be interesting to explore the possible state changes and see which make (no) sense and also what additional work needs to happen. We have the following states:
... Unfinished |
Before finishing the previous comment, maybe a more interesting angle is thinking about:
As for those preconditions, I'm thinking of:
|
One other related issue is that of when to remove medical and address details. In particular, setting the status of a registration to cancelled could mean that these need to be removed. I'm thinking it would be good to make this explicit in the admin (e.g. similar to when you delete an object in the admin, it asks for confirmation showing all the cascaded deletes that will happen), but doing such confirmation is probably easier when status changes are done using admin "actions", rather than just changing the status dropdown directly (though an added complication is that deleting a registration can also cause userdata to be removed, but this is quite hard to model in Django's cascading delete system, especially when deleting multiple objects, since userdata must be delete when the last active registration that needs it is removed. Maybe something with bulk_related_objects could be done, or a fake one_to_one or one_to_many (that's all that django.db.models.deletion.Collector considers) with a custom on_delete handler. |
Currently, registration status can simply be edited through the admin. However, when you manually set a registration to
REGISTERED
, you bypass the waitinglist logic, which might cause thefull
fields of options to remain unset. You could also accidentally make someoneREGISTERED
, even when there is no room (though that might be intentional or temporary, so perhaps that should be allowed).Also, not all state transitions make sense, so maybe some of these should be limited?
This relates to #67.
The text was updated successfully, but these errors were encountered: