bcgov / zeva

Zero Emission Vehicles Act
Apache License 2.0
5 stars 13 forks source link

ZEVA - 2024 Validated Models Not Appearing in Credit Application Template #2163

Closed shayjeff closed 6 months ago

shayjeff commented 7 months ago

Describe the Bug When suppliers attempt to download validated 2024 models in their CA template, the vehicles are not populating in the spreadsheet.

Expected Behaviour Upon generating the Credit Application (CA) with the validated 2024 models, the spreadsheet should populate with the respective vehicles.

Actual Behaviour After generating the CA, the vehicles are not populating in the spreadsheet as expected.

Implications This bug affects the ability to submit credit application because the models are not populating.

Steps To Reproduce Steps to reproduce the behaviour: User/Role:

  1. Log in with BCEID.
  2. Navigate to the credit application page.
  3. Click on the "New Credit Application" tab.
  4. Download the sales template with validated 2024 models.
  5. Notice that the vehicles do not populate in the spreadsheet.

Note: This is affecting supplier ID 5 and 17 in production. Please reach out to the PO for the names if needed.

kcabhar commented 7 months ago

Hey team! Please add your planning poker estimate with Zenhub @emi-hi @JulianForeman @tim738745

emi-hi commented 7 months ago

the issue was from the 'effective_date' field in the model year table. When the sales spreadsheet is created the script looks for model years with an effective date of greater than 2019-01-01. The records in prod had been inserted through the icbc_upload service but that service was missing the effective (and expiry) dates, so they had been inserted without any effective date. I updated the icbc_upload service so it now adds an effective_date and expiration_date for any future model years and manually updated prod data so it has those dates. It should work as expected for 2024 and 2025 model years.

shayjeff commented 6 months ago

Tested - 2024 models now appear.