Repository navigation
Permanent shift record: op_shift_history + op_shift_time_stats (#759) - #808
Conversation
Read-only, denormalized table plus an idempotent loader for legacy shiftboard2 (with review_notes ratings), later sb_shifts pulls, and a season of the op_ tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Clarifying open question 1, the January copy of the old shift table: the history isn't stale either way. The |
… adds no-shows and ratings Shiftboard's coverage report still serves every signup since 2013 (8,956), more than the legacy shiftboard2 copy frozen in Jan 2026. Make it the main source and drop the prod sb_shifts gap-fill. shiftboard2 shares Shiftboard's signup ids (8,631 overlap, 0 mismatched people), so both loads write one source, 'shiftboard', and the legacy load only adds what Shiftboard doesn't keep: no-show marks, ratings/notes, role and department, plus the 140 pre-2013 and placeholder rows. Loads are order-independent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Idea for discussion, not a decision (from a coordinator, 2026-10-20). Parked until Mew's focused session. Close out 2026 the way past years were closed. Finish the final import into Shiftboard, then do one final export from Shiftboard, and only after that start the new process. The goal is to never end up with one structure for every year before 2026, a second for 2026, and a third once we're independent of Shiftboard. This touches the no-write-back decision (2026-10-03), so the import may have to be done by hand in Shiftboard, or that decision revisited. No work has started on it. |
|
From Mew's 2026-11-26 roadmap (item 2): Mew's field list for the permanent shift record has gaps against this PR (volunteer and playa name at the time, canceled flag, checked-in instead of raw Tracking: #849 |
|
Mew (2026-11-27): hold. When we start roadmap item 2, we do the Q&A and update this PR to Mew's field list. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
op_shift_history + op_shift_time_stats (migration 030, replaces 022): burn_year in the key, checked_in, CSP (full day = 8, none recorded = on-playa hours), 2-4 score from both scales, names at the time, placeholders, shift grouping (event_code / shift_instance), app details incl. meal. Loader merges legacy shiftboard2 with post-playa app dumps (legacy wins; app adds checked-in rows sb2 never saw; disagreeing check-ins get the credit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aya signups (#759) Per Mew 2026-11-29: for <= 2025 sb2 is right except on-playa signups Shiftboard never had; those are kept with their own check-in state. Made-up on-playa ids link to the real person by new_shiftboard_id or a unique email (Rain-Hoper excluded), recorded in linked_from_id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…759) --sb-shifts reads prod's Shiftboard mirror for signups newer than the legacy dump; app copies accept checked_in (post-029) and skip rows from the next burn year. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mew 2026-11-29: ticket people are chosen from VIS respondents by score; "lets do scores next". Score from op_shift_history (#808) per the formula decided on #771 (10/02, 11/11, 11/27), with the old postplaya.php no-show penalty, Core Crew bonus and decay (Mew 11/27), as of the form's burn year. Admin-only: shown on the FormEditor answers page (sortable) and its CSV. Footer 2027.G.00899.C. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Roadmap item 2 (#849, #759), rebuilt to Mew's 2026-11-29 spec. Replaces the 2026-10 version (migration 022 → 030).
Tables (migration 030)
op_shift_history: one row per volunteer per signup, denormalized. Key =(source, burn_year, source_id, shiftboard_id), because row ids are reused every year. Fields: names at the time, date and day name, start, end, hours, department, category, shift name, alias (Shiftboard subject / position alias), position, instance (event_code / shift_instance) and shift_key, lead/critical/core/off-playa flags, CSP, canceled, checked_in, raw_score + scale + 2–4 score, review notes, details (for app rows: shift type details, position, meal, notes), placeholder and category-guessed flags, and signed_up_at.op_shift_time_stats: one row per shift time per burn year: slots, filled, unfilled, checked in, not checked in, reviewed.Loader (
etl/shift_history.py build)shiftboard2wins for 2025 and earlier. Fields are mapped through subject_category, and subjects, times and names are cleaned: double-encoded names fixed, exact duplicate signups dropped.selftestcovers them.Dry run (scratch copy, burn years 2006–2026)
9,707 signups, 1,220 people, 1,689 shift times. 4 duplicate signups dropped; unknown subjects get a guessed category, flagged. On-playa signups Shiftboard never had: 68 (2024), 19 (2025). Made-up on-playa ids are linked to the real person (
linked_from_id).2026 (Mew 2026-11-29) comes from prod's op_ tables (600 on-playa) plus
sb_shifts(347 off-playa). The two sources don't overlap, and signups after 9/14 count toward burn 2027.Not yet
Prod plan (on Mew's OK)
sb_pinfo(current names, flagged).🤖 Generated with Claude Code