Skip to content

[christmas] Add backfill UI and server function for recording past draws - #389

Merged
gazure merged 1 commit into
mainfrom
ga/christmas-backfil
Jul 25, 2026
Merged

[christmas] Add backfill UI and server function for recording past draws#389
gazure merged 1 commit into
mainfrom
ga/christmas-backfil

Conversation

@gazure

@gazure gazure commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Adds a Backfill a past year section to the Manage page, letting administrators enter who gave to whom in years that predate the app.

Once recorded, a backfilled year is indistinguishable from a normally drawn one: the "no repeat receivers" constraint can see it, and its letter is excluded from future draws. Entries are stored through the same revision counter as a regular draw, so recording the same year twice produces a second revision rather than overwriting the first.

The form lays out one row per pool member in a responsive grid. Receivers are chosen from a dropdown; leaving a row blank omits that person from the record, since old paper records are often incomplete. Duplicate receivers are flagged inline before saving rather than surfaced as a server error. The year and letter fields are editable, and if a record already exists for the chosen pool and year a notice appears with a link to load it for editing.

On the server side, record_past_draw validates that the submitted pairings form a valid partial permutation — no self-gifts, no giver appearing twice, no receiver appearing twice — before inserting. config and seed are left null rather than invented, which causes the pool page to omit the "How it was drawn" line for those years instead of displaying something untrue.

gazure commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gazure
gazure merged commit 4284f35 into main Jul 25, 2026
2 checks passed

gazure commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

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.

1 participant