E7-F3: Multi-Match Quota Import¶
Epic: E7: Quota Management
Size: S (Small)
Problem / Outcome¶
Create same quota allocation across multiple matches.
Scope¶
In-Scope:
- Select multiple matches
- Upload CSV with recipients
- Create identical allocation per match
Out-of-Scope:
- Different quantities per match
Acceptance Criteria¶
- AC1: Given 3 matches selected and CSV uploaded, then each recipient gets allocation for all 3 matches
- AC2: Requires the same ticket quantity for all selected matches. Every row names its sector codes, which are stadium-specific: they must exist on every selected match or that row is rejected up front (not silently skipped for the matches that don't match). A row with a blank sector is rejected, never allocated over the whole match (HNSTIK-314); a tournament across stadiums that do not share sector codes is imported once per stadium.
- AC3: Each match gets separate quota record linked by batch_id
Data Model Impact¶
Quota table:
- batch_id (UUID, nullable) - links quotas across matches
MultiMatchQuotaBatch table:
- id (UUID, PK)
- match_ids (UUID[])
- total_recipients (INTEGER)
- quantity_per_match (INTEGER)
- sector_ids (UUID[])
- created_by (UUID, FK)
- created_at (TIMESTAMP)
Permissions/Roles¶
- Admin (Quota Manager)
How to Verify¶
npm test -- --grep "multi-match quota"
Expected: Quotas created for all selected matches.
Dependencies¶
Implementation Tasks¶
See E7: Quota Management Tasks
Doc References¶
Last Updated: January 2026