Feature: Add organizer setting to hide the checkout "Copy my details to attendees" control#1218
Open
giuliosmall wants to merge 1 commit into
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
228a0a6 to
f404eba
Compare
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.
What changes I've made
This adds a new per event boolean setting
allow_copy_details_to_all_attendees(default true). At checkout, when there are several attendees, buyers see a "Copy my details to:" control with None, First attendee and All attendees. When an organizer turns this setting off, only the "All attendees" option is removed: buyers can still copy their details to the first attendee, but cannot bulk copy them onto everyone, so the remaining attendees have to be filled in individually. The None and First attendee options, and the single attendee "Copy details to first attendee" checkbox, are unaffected.The change follows the existing
show_marketing_opt_inandallow_attendee_self_editsettings end to end: a migration onevent_settings, the generated domain object, the request validation rule, theUpdateEventSettingsDTO(constructor default andcreateWithDefaults), the full and partial update handlers, the admin and publicEventSettingsResource, the frontendEventSettingstype, aSwitchin the Checkout Settings section, and the checkoutCollectInformationcomponent. The public resource exposes the flag so the checkout can read it, with a?? truefallback so an absent value keeps the current behaviour.One small follow up: the two new translation strings still need
npm run messages:extract && npm run messages:compileto land in the locale catalogs, which I left out since it rewrites all locale files.Why I've made these changes
Some organizers find that buyers click "All attendees" out of convenience and end up with duplicated or placeholder attendee data that then needs manual cleanup, and some events need every attendee to enter their own real name and email. Copying to just the first attendee is usually fine, since the buyer is normally the first attendee, so this keeps that convenience while letting an organizer switch off the bulk copy. It defaults to true and existing rows are backfilled to true, so every existing event keeps the current behaviour until an organizer opts out. Resolves #1217.
How I've tested these changes
I added backend unit tests covering the validation rule, that the full handler persists the value, that the partial handler keeps the existing value when a PATCH omits the key, and that the public resource exposes the field. I ran the full
tests/Unitsuite locally on PHP 8.4 and it passes (397 tests, 1079 assertions, 0 failures). The migration mirrors the existingallow_attendee_self_editone, so the column is added with a true default and existing rows are backfilled on the add column step.Checklist