bcgov / NRPTI

Natural Resources Public Transparency Initiative
Apache License 2.0
5 stars 15 forks source link

"AGENCY_CAS" appearing in CSV outputs #1173

Closed RFK250 closed 9 months ago

RFK250 commented 9 months ago

Describe the Bug Although the Issuing Agency displays correctly in NRCED, when a user outputs records issued by the Climate Action Secretariat to CSV, the Issuing Agency value appears as "AGENCY_CAS"

Expected Behaviour When outputting a CSV, Climate Action Secretariat records should show the Issuing Agency as "Climate Action Secretariat"

Actual Behaviour They show "AGENCY_CAS" instead. Affects all 86 records.

Implications A user may not understand what "AGENCY_CAS" means. Inconsistent with appearance of other issuing agencies.

Steps To Reproduce Steps to reproduce the behaviour:

  1. Go https://nrced.gov.bc.ca/records;ms=251;act=Greenhouse%20Gas%20Industrial%20Reporting%20and%20Control%20Act;currentPage=4;pageSize=25;sortBy=-dateIssued.
  2. Click Export to CSV button.
  3. Open the CSV and look.

Note: Not sure if this is helpful, but I noticed that AGENCY_CAS appears to be missing from the ApplicationAgencies and ApplicationAgencyList constants.

Private Zenhub Image

davidclaveau commented 9 months ago

The exportToCsv function was missed in the initial update, as it was still using the old Utils functionality for displaying an agency's name. Imported and used AgencyDataService (similar same setup we used elsewhere in the app) to change the name of an agency from AGENCY_ABC to the updated, user friendly agency name.