[x] The title includes the type of change [HOTFIX, FEATURE, etc]
[x] The PR title includes the ticket number in format of [NRPTI-###]
[x] Documentation is updated to reflect change
Description
This PR includes the following proposed change(s):
Moved hardcoded Acts and Regulations to DB
Added a cronjob to update Energy Resource Activities Act from API
Added migration to create a new collection to store act-regulations mapping
Added migration to update any existing records with Oil and Gas Activities act to Energy Resource Activities act
Added 2 new endpoints for - updating act title through cronjob and fetching all acts and regulations from DB
Issue NOT addressed: If the Energy Resource Activity Act were updated next month, the app would automatically reflect this change. In the front end, filters and options would show the new value. For records, all records that get added/updated through the daily cronjob and by using the IMPORT buttons will have their values automatically updated. BUT other records associated with this act that were added from other sources like through the "add record" feature will not be updated. Then, if searching for records and filtering by the new act, these records will not appear.
Future work should modify all existing records to replace their legislation with constant codes that map to the appropriate value. This value is then what gets updated. This way, records themselves will not need to be updated. The front end will translate the codes based on their mapped association. Implementing this feature in this ticket would have ballooned an already too large task.
Pull Request Standards
HOTFIX
,FEATURE
,etc
][NRPTI-###]
Description
This PR includes the following proposed change(s):
Issue NOT addressed: If the Energy Resource Activity Act were updated next month, the app would automatically reflect this change. In the front end, filters and options would show the new value. For records, all records that get added/updated through the daily cronjob and by using the IMPORT buttons will have their values automatically updated. BUT other records associated with this act that were added from other sources like through the "add record" feature will not be updated. Then, if searching for records and filtering by the new act, these records will not appear.
Future work should modify all existing records to replace their legislation with constant codes that map to the appropriate value. This value is then what gets updated. This way, records themselves will not need to be updated. The front end will translate the codes based on their mapped association. Implementing this feature in this ticket would have ballooned an already too large task.