Fix event edit form dropping organisers on save - #2871
Open
artfuldev wants to merge 3 commits into
Open
Conversation
artfuldev
force-pushed
the
fix/event-edit-removes-organisers
branch
from
September 12, 2026 00:01
fec72c7 to
5d1930e
Compare
This was referenced Sep 12, 2026
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.
Fix #2868
Keep an event's existing organisers when editing it, instead of silently clearing all of them on save.
Why did we do this?
The organisers multi-select on the event edit form never showed existing organisers as selected, even though they were still assigned. Anyone who saved the form without re-picking organisers submitted an empty selection, and the controller dutifully revoked every one of them.
Two more commits fix test correctness issues this change surfaced or depends on:
.search-choicewithout scoping it to the chapters widget. That class is shared by every multi-select on the page, so once organisers render correctly (this fix), the assertion started counting the organiser's chip too.today_and_upcomingscope spec froze time at the real wall-clock instant and subtracted an hour to simulate "happening now" — if the real run time was within an hour after midnight, that pushed the workshop into the previous day, dropping it from a scope that filters from start-of-day. Unrelated to the organisers fix, but pinned it to noon so it can't cross midnight.Will this break anything?
No. The organisers fix only corrects
pluck(&:id)topluck(:id), which is what theselected:option already expected. The two spec changes only make existing assertions more precise; they don't change any application behavior.How was this tested?
Organisers fix — captioned screen recordings of the actual edit → save flow against a real admin session, showing the event page (Team section) before editing, the organisers field mid-edit, and the event page again after saving:
Before fix — the organiser is genuinely assigned (Team section shows them), the edit page shows the field with 0 chips selected, and saving without touching it wipes them — the Team section now says "This event has no organisers.":
before-fix.webm
After fix — the organiser shows as a selected chip on the edit page and survives a save — the Team section still shows them afterward:
after-fix.webm
today_and_upcomingflake — deterministic reproduction against the real scope and database, travelling to a fixed post-midnight instant (00:15) — real recorded terminal session (animated):.search-choicescoping — visible in the after-fix video above: the organiser's chip renders inside#event_organisers_chosen, a sibling widget to#event_chapter_ids_chosen, which is exactly why the chapters test's unscoped selector needed narrowing.