Repository navigation
feat(events): close registrations by default on a new event - #514
Merged
Merged
Conversation
A new event is published as soon as it is created, so it could take bookings before the organiser had set up tickets and details. Stamp the registration cutoff at insert unless one was given, and stop Desk's Duplicate from carrying the source event's cutoff over. Test and e2e fixtures that book reopen registrations after creating their event. Closes #506
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #506
What changed
New events start with registrations closed. A new event goes live as soon as it's created, so until now it could take bookings before the organiser had set up tickets.
BuzzEvent.before_insertsetsregistrations_close_atto now (in the event's timezone) unless a cutoff was passed in. This covers dashboard, Desk, template and proposal creation. Organisers reopen with the existing toggle.registrations_close_atis nowno_copy. Without it, Desk's Duplicate copied a future cutoff and the copy started open.test-routeevent ininstall.py, and five e2e setups through a newopenRegistrationshelper.Gotcha: server-side
frappe.copy_docignoresno_copyby default. The duplicate test passesignore_no_copy=Falseto match what Desk does.Demo
Backend only, no dashboard UI change.
Testing
Three new tests in
test_events.py: a new event is closed, a cutoff given at creation is kept, and a duplicate is closed. The first and last fail without the fix.Checks: passing:
test_events,test_event_booking,test_guest_booking,test_booking,test_event_eligibility,test_event_booking_refund,test_checkin,test_telemetry. Lint clean.test_buzz_event,test_buzz_coupon_code,test_detailed_event_registrationsandwww/event/test_eventfail locally with the same errors ondevelop. E2E not run locally; left to CI.