Repository navigation
Description
From Mew's 2026-11-26 roadmap (item 3):
since we are no longer tied to shiftboard, invert the no-show to be checked-in so it matches the rest of our pardgm. Lots of places to verify this is correct.
Today
op_volunteer_shifts.noshow is a string with three states, and the UI has no "mark no-show" control, only a check-in toggle:
| stored | meaning today |
|---|---|
'' |
checked in |
'Yes' |
toggled off ("checked out"), or set by the auto-finalize job; the score and reports treat it as a no-show |
'X' or NULL |
added, nothing recorded yet |
Proposal (for Mew to confirm)
Add checked_in TINYINT NULL: 1 = checked in, 0 = marked not checked in, NULL = nothing recorded. Backfill ''->1, 'Yes'->0, 'X'/NULL->NULL. The penalty fires on an explicit 0 only (#771). Expand/contract: add and backfill, switch every writer and reader, drop noshow later. Do it in the same migration as #620's flags-to-timestamps work for this table, outside an event.
Places to change and verify (grep of main; each needs a test)
- Writers:
components/api/shiftVolunteers.ts(check-in toggle),pages/api/shifts/[timeId]/volunteers/index.ts(add flow,ON DUPLICATE KEY),components/api/shiftAddRules.ts("X"/""),lib/shiftLeadNudge.ts(auto-finalize), client toggles inShiftVolunteers.tsxandVolunteerShifts.tsx. - Readers: the same volunteers API (
isCheckedInis a raw string),pages/api/volunteers/[shiftboardId]/shifts,pages/api/volunteers/index.ts(Attended/Absent/Remaining),Volunteers.tsx,lib/shiftLeadNudge.logic.ts, types undercomponents/types/. - Tests:
tests/unit/actingAs.test.ts,e2e/helpers/db.ts,e2e/tests/04-check-in.spec.ts. - Schema/docs:
database/scheduler_schema.sql,database/README.md(its description ofYesis already wrong),OnPlayaData/yearly_update_sql.txt(resetsnoshow='X'yearly), on-playa schema files. Archived yearly dumps stay as they are. - Downstream:
tools/census_reports_gsheet.py,scripts/onplaya_watchdog.py(runs during the event),etl/shift_history.py(PR Permanent shift record: op_shift_history + op_shift_time_stats (#759) #808). - Legacy PHP:
onplayalib2.phpprocessNoShows()joinsop_volunteer_shifts.noshowtoshiftboard2. Other PHP andcensus-pythonread legacyshiftboard2.noshowonly. - Out of scope:
sb_shifts.noshow/ Shiftboard's No Show column (other system's data). - Other consumers I cannot see (ops bot, ad-hoc SQL): please list.
Related: #798 (parked API says "checked_in: true/false", deliberately no no-show field), #764, #775, #771, #620/#783, #634/#834, #573, #446, #772, PR #808.
Conflicts to resolve
- A plain boolean loses
'Yes'vs'X', which Volunteer experience scoring is PHP-only and no Shiftboard history is imported — blocks lane suggestions, roster ordering, and ticket/camp decisions in the app #771, Auto-finalize no-show is intentional, but 'Yes' conflates "didn't show" with "lead never recorded" — needs provenance before it feeds a scored penalty #764 and Cannot distinguish 'never came to the event' from 'no-showed a shift' #775 depend on. It must stay nullable or an enum. - Rescue kept an "Absent" count next to "Remaining" (Volunteers list: reconcile shift-count metric vs CSP-everywhere #634, shipped in Volunteers list: add CSP column next to Attended #834); that needs the explicit 0 state.
- Roadmap: replace boolean add/remove/update/delete flags with timestamps + an SCD change log #620 re-models the same table: one migration, not two.
- The history record (Archive a denormalized table of shifts each person completed this year (end-of-year snapshot) #759) copies this column: decide states first.
- Timing: tablets, the on-playa box and prod share a database; a rename mid-event would break clients.
Depends on / blocks: decide first, then ship with #620's op_volunteer_shifts step. Blocks the final schema of #759 / PR #808, #771 score rebuild, #839, #843 (merge rules), #798.
Questions for Mew
- Three states (checked in / marked not checked in / nothing recorded) or two? Rescue and the score need the difference.
- After an event, should auto-finalize write 0 (as
'Yes'today) or leave NULL? That decides whether anyone is penalized automatically (Auto-finalize no-show is intentional, but 'Yes' conflates "didn't show" with "lead never recorded" — needs provenance before it feeds a scored penalty #764). - Who may set an explicit "absent", given the UI only has the toggle (Cannot distinguish 'never came to the event' from 'no-showed a shift' #775 asks for "never came" and "excused")?
- One migration with Roadmap: replace boolean add/remove/update/delete flags with timestamps + an SCD change log #620's work on this table, or earlier and separately?
- Ship outside the event (before the 2027 season), keeping both columns for a season?
- History: copy new values only for app rows and leave older rows as "not marked absent" with a provenance flag?
- Rename API fields (
isCheckedIn,noShow) now, or keep the old names for tablets until after the season? - Retire the PHP
processNoShows()and PHP score (no write-back, Volunteer experience scoring is PHP-only and no Shiftboard history is imported — blocks lane suggestions, roster ordering, and ticket/camp decisions in the app #771 rebuilds the score)? Who else queries this column?
Activity
Replace noshow with checked_in; check-in-by-default shift types (#840) (