LCFS - Allocation agreement validation
- Dominant language
- Python
- Stars
- 6
- Forks
- 6
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 87
Description
**If this bulk validation is problematic to implement we will need to consider removing the download/upload option altogether on this schedule.**
**Description:**
After a BCeID user uploads an allocation agreement Excel file, the system should automatically validate each row of the uploaded data. Any row that fails validation must be clearly highlighted, and these invalid rows should not be saved to the system until they pass validation.
**Wireframe:**
N/A – backend validation process and front-end row highlighting behavior assumed to be consistent with existing grid/table standards.
**Purpose and benefit to user:**
This ensures data integrity and provides immediate feedback to users, allowing them to identify and correct invalid entries before final submission. It prevents accidental saving of incorrect or non-compliant data, aligning with the compliance and reporting goals of the LCFS system.
**Acceptance Criteria:**
- [ ] Upon file upload, all rows are automatically run through validation logic.
- [ ] Any row that fails validation is visually highlighted in the UI.
- [ ] Invalid rows are prevented from being saved to the database.
- [ ] Users receive a clear, actionable message indicating why a row failed validation.
- [ ] Users can correct highlighted rows and re-validate them individually or in bulk.
**Development Checklist:**
- [ ] Implement server-side validation for each row upon file upload.
- [ ] Integrate validation status into frontend grid component for real-time feedback.
- [ ] Ensure only valid rows are committed to the database.
- [ ] Add client-side UI logic to highlight invalid rows.
- [ ] Write tests for validation logic and UI feedback.
- [ ] Confirm correct error messaging and feedback flow for users.
**Notes:**
- Confirm if the validation rules for allocation agreements are consistent with those used elsewhere (e.g., compliance reporting).
- Coordination with the design team may be needed for the row-highlighting UI.
Contributor guide
Research direction
The issue names the allocation agreement Excel upload flow, server-side validation, the frontend grid, and database saving, but no files or tests. Start by tracing the upload process and comparing its allocation-agreement rules with compliance reporting validation. Done means invalid rows are highlighted with actionable messages, excluded from saving, and can be corrected and re-validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, database, full-stack, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100