bcgov / bcgov/cas-reporting

Filter list of activities appropriately for SFO/LFO operations on Reporting pages

Open
#554 8 comments 0 reactions 1 assignee Claimed by @acatchpole View on GitHub
Blocked ICEBOX Needs DC Tech Debt
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

#### Description of the Tech Debt
Now that we've built some LFO activities, we should update the list of activities to only show the relevant activities and source types to the SFO/LFO as options. The `activity` model already has an `applicable_to` column that we can use to filter on when populating the list of activities shown to the user.

UPDATES:
Due to the way GGERR is written, LFOs and SFOs report on _some_ different activities from Table 1 and Table 2. Because of this, BCIERS should only show operations the relevant activities based on their Operation type (LFO/SFO).
Currently the system shows all activities to all operations, which has lead to some SFOs reporting incorrectly because they have selected an LFO-specific activity in error. The goal of this ticket is to fix this issue.

#### Acceptance Criteria
Given that my Operation type is LFO
Then the list of activities I see matches the LFO-specific list from ([Registration Pt 2. Fields](https://bcgov.sharepoint.com/:x:/r/teams/00608-CPRInternal/Shared%20Documents/Carbon%20Pricing%20Transition%20SMEs/Registration%20App/Registration%20Pt.%202%20Fields.xlsx?d=w8cf871009f8d43c19d1d79c69fa259e8&csf=1&web=1&e=ctoTMH) excel)

Given that my Operation Type is SFO
Then the list of activities I see matches the SFO-specific list from ([Registration Pt 2. Fields](https://bcgov.sharepoint.com/:x:/r/teams/00608-CPRInternal/Shared%20Documents/Carbon%20Pricing%20Transition%20SMEs/Registration%20App/Registration%20Pt.%202%20Fields.xlsx?d=w8cf871009f8d43c19d1d79c69fa259e8&csf=1&web=1&e=ctoTMH) excel)

#### Update
This ticket is now blocked by #3333 which is filtering on the admin/reg side. The migration to update the applicable_to values to match the spreadsheet in the AC has already been merged in.

Work has already been started on this ticket before it was deprioritized. That work is included in [this draft PR](https://github.com/bcgov/cas-registration/pull/4092).

#### Development Checklist:

- [ ] The list of activities to select from is filtered based on operation type.
- [ ] for review-operation-information page, the list of activities is included in the API call. Update report_operation_service to return applicable_activities instead of all_activities
- [ ] for review-facility-information page, the list of activities is a separate API call. Either refactor to include applicable_activities in page data, or create new endpoint to retrieve applicable_activities instead of all activities

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.