E7-F2: Quota CSV Bulk Import¶
Epic: E7: Quota Management
Size: S (Small)
Problem / Outcome¶
Import multiple quotas from CSV file.
Scope¶
In-Scope:
- CSV upload (max 50 lines)
- Validation (email, sectors, quantities)
- Batch creation with allocation
Out-of-Scope:
- Multi-match import (see E7-F3)
Acceptance Criteria¶
- AC1: Given valid CSV, when imported, then all quotas created with seats allocated
- AC2: Given invalid rows, then error report with line numbers
- AC3: Duplicate OIBs in file detected and skipped
Data Model Impact¶
QuotaImportBatch table:
- id (UUID, PK)
- match_id (UUID, FK)
- file_name (VARCHAR)
- total_rows (INTEGER)
- successful_rows (INTEGER)
- failed_rows (INTEGER)
- error_report_json (JSONB)
- imported_by (UUID, FK)
- imported_at (TIMESTAMP)
CSV format:
- email (required)
- name (required)
- quantity (required)
- sector_ids (comma-separated)
- discount_percent (optional)
Permissions/Roles¶
- Admin (Quota Manager)
How to Verify¶
npm test -- --grep "quota CSV import"
Expected: Valid rows imported, invalid rows reported.
Dependencies¶
Implementation Tasks¶
See E7: Quota Management Tasks
Doc References¶
Last Updated: January 2026