E13-F2: Post-Match Attendance Import¶
Epic: E13: Access Control Integration
Size: S (Small)
Problem / Outcome¶
Import attendance data after match for loyalty points.
Scope¶
In-Scope:
- Excel upload (scanned barcodes)
- Barcode to ticket matching
- Ticket status update to ATTENDED
Out-of-Scope:
- Real-time attendance tracking
Acceptance Criteria¶
- AC1: Imported barcodes matched to tickets
- AC2: Matched tickets marked as ATTENDED with timestamp
- AC3: Unmatched barcodes reported for review
Data Model Impact¶
Ticket table:
- status = ATTENDED
- attended_at (TIMESTAMP)
AttendanceImport table:
- id (UUID, PK)
- match_id (UUID, FK)
- file_name (VARCHAR)
- total_scanned (INTEGER)
- matched_count (INTEGER)
- unmatched_count (INTEGER)
- imported_by (UUID, FK)
- imported_at (TIMESTAMP)
AttendanceUnmatched table:
- id (UUID, PK)
- import_id (UUID, FK)
- barcode (VARCHAR)
- scan_timestamp (TIMESTAMP, nullable)
- reason (ENUM: not_found, already_cancelled, invalid_format)
Import file format:
- barcode (required)
- scan_timestamp (optional)
- gate_id (optional)
Permissions/Roles¶
- Admin (Match Manager)
How to Verify¶
npm test -- --grep "attendance import"
Expected: Tickets updated correctly.
Dependencies¶
Implementation Tasks¶
Doc References¶
Last Updated: January 2026