bcgov / bcgov/lcfs

LCFS - Load 2018 compliance reports with updated report structure

Open
#4,337 2 comments 0 reactions 1 assignee Claimed by @AlexZorkin View on GitHub
Compliance Reporting Credit Transfers & Transactions Medium Task
Dominant language
Python
Stars
6
Forks
6
Avg merge
2d 4h
Merged PRs (30d)
87

Description

**Describe the task**
Load historical (“prehistoric”) data for 2018 compliance reports and transactions into LCFS from the provided Excel file, ensuring the generated reports conform to the defined compliance report structure and presentation requirements.

This includes:
- Generating reports where the title format matches current standards (e.g., “Compliance Report – Supplement 1”), with the title aligned to the current iteration of the report.
- Populating organization details using portal data for organizations that exist in the system, and ensuring organizations not present in the portal (from 2019 onward) are added manually as part of the process.
- Configuring the report history section to include:
- Original submission details (submitted by and date, approved by and date) for all reports.
- Latest supplemental submission and approval details where applicable.
- Alignment with the Fuel Supply view, which displays only the latest iteration.
- Ensuring Fuel Supply table inputs from the Excel file map correctly to the existing Fuel Supply report section in the system.
- Replicating the 2019 report summary format, including greyed out lines for non-required fields.

**Wireframe:**
[2015–2018 compliance reports with updated report structure](https://preview.uxpin.com/7264e34749e7af420559b8cfc0ca8001c76db3ec#/pages/225942196/simulate/no-panels)

2018 Data:
Found in Teams Card Attachment folder

**Purpose**
To ensure legacy data is available in the system for continuity, reference, and reporting across all compliance years, while maintaining consistency with current report formats and system behaviour.

**Acceptance Criteria**
- [ ] Data from the Excel file for 2018 is successfully imported into LCFS
- [ ] Reports are generated with titles matching the format “Compliance Report – Supplement 1” and reflect the current iteration
- [ ] Organization details are correctly populated from portal data where available, and missing organizations are created or added as required
- [ ] Report history includes original submission and approval details for all reports, regardless of current display state
- [ ] Report history includes only the latest supplemental submission and approval details when a supplement exists
- [ ] Fuel Supply view displays only the latest iteration of reports, consistent with system behaviour
- [ ] Fuel Supply table inputs from the Excel file correctly map to the existing Fuel Supply report section
- [ ] Summary section replicates the 2019 report format, including greyed out lines for non-required fields
- [ ] Reports and transactions are correctly mapped to the appropriate data model fields
- [ ] Data integrity is maintained (no missing or incorrectly transformed records)
- [ ] Relationships between reports, transactions, and organizations are preserved
- [ ] Validation checks confirm accuracy of imported data
- [ ] Import process is repeatable and documented

**Additional context**
- Source data is provided via Excel file
- Transformation and mapping may be required to align legacy data with the current schema
- Consider edge cases such as missing organization records, incomplete historical metadata, or differences between legacy and current report structures
- Ensure consistency between historical reports and current UI display rules (e.g., Fuel Supply view behaviour)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.