Closed RFK250 closed 6 months ago
Current strategy :
I love this approach not just because it solves the immediate problem and sets the stage for avoiding it in the future, but also because in the long run it opens the door to a future ticket to automatically get descriptions via the API from regulations like this one. Lots of potential value there in improved workflows, automation, and a consistent user experience. Stay on this path. :)
cc @malafry @jakemorr you should consider exploring this at the user story level.
Deployed to dev: https://nrpti-f00029-dev.apps.silver.devops.gov.bc.ca
It looks like all the all the AC are met! @jakemorr I would accept this ticket. cc @malafry
deployed to prod
Describe the task Update BCOGC importers to use "Energy Resource Activities Act" instead of "Oil and Gas Activities Act" - ideally, using the BC Laws Restful API to do it.
Purpose
Acceptance Criteria
GIVEN I am a NRCED user viewing https://nrced.gov.bc.ca/records
WHEN I view a BCOGC record (in list or detail view)
THEN I see "Energy Resource Activities Act" instead of "Oil and Gas Activities Act"
AND WHEN I click on the "Issued under which Act" filter
THEN I see "Energy Resource Activities Act" instead of "Oil and Gas Activities Act"
AND WHEN I click on "Export to CSV" and open the resulting record
THEN I see "Energy Resource Activities Act" instead of "Oil and Gas Activities Act"
GIVEN I am a NRPTI user viewing https://nrpti-f00029-prod.apps.silver.devops.gov.bc.ca/records
WHEN I click on the "Issued under which Act" filter
THEN I see "Energy Resource Activities Act" instead of "Oil and Gas Activities Act"
Additional AC for using BC Laws API
Additional context
Critical question that would need to be answered first: is there an approach that can use the values obtained through the BC Laws API to write data to BCOGC records without having to change all other importers? i.e. can we get "Energy Resource Activities Act" from the BC Laws API and put that value into the Act metadata without needing an intermediate variable like we did with Issuing Agency values? Because if we need to use an intermediate variable, this becomes a huge task. But if we can just write the value we get from the API straight into the record, it should be a small task.
The XML for the the title of the Act can be called with https://www.bclaws.gov.bc.ca/civix/content/complete/statreg/667588372/08036/
CIVIX_DOCUMENT_TITLE should return the correct title (you may also be able to get the title from the Document xml below)
The XML for the Energy Resource Activities Act can be called with https://www.bclaws.gov.bc.ca/civix/document/id/complete/statreg/08036_01/xml
The XML tag for the title is
<act:title>Energy Resource Activities Act</act:title>
The XML has unique IDs for sections, subsections and paragraphs. For example: BCOGC inspection records have Section = 57 and subsection = (4).
<bcl:section id="d2e6157">
should return<bcl:num>57</bcl:num>
and<bcl:subsection id="d2e6241">
should return<bcl:num>4</bcl:num>
Note: The Oil and Gas Activities Act used to have
CIVIX_DOCUMENT_ID = 08036_01
; when government changed the name of the act, the document was updated to reflect the new title, and a new document was created for the Oil and Gas Activities Act withCIVIX_DOCUMENT_ID = 08036a_01
. That approach means that it should be safe to continue to useCIVIX_DOCUMENT_ID = 08036_01
no matter how often government changes the name of the act. Dev work would only be needed if a new CIVIX_DOCUMENT_ID was used.