Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCFS-1055: Allocation agreement schedule is allowing all fuel types to chose any of the 3 determining carbon intensity options #1087

Open
wants to merge 1 commit into
base: release-0.2.0
Choose a base branch
from

Conversation

areyeslo
Copy link
Collaborator

Issue

The provisionOfTheAct field (labeled as "Determining Carbon Intensity") was displaying all available options, regardless of the selected fuel type. This caused confusion since not all provisions are applicable to every fuel type.

Fix

The provisionOfTheAct field is now dynamically filtered based on the selected Fuel Type field, following the existing relationship in the database. The field will only display the provisions that are relevant to the chosen fuel type.

The provisions displayed are based on the following mappings:

fuel_type_id|fuel_type              |provision_1_name                            |provision_2_name                              |
------------+-----------------------+--------------------------------------------+----------------------------------------------+
           1|Biodiesel              |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
           2|CNG                    |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
           3|Electricity            |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
           4|Ethanol                |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
           5|HDRD                   |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
           6|Hydrogen               |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
           7|LNG                    |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
           9|Other diesel fuel      |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
          11|Alternative jet fuel   |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
          13|Propane                |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
          14|Renewable gasoline     |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
          15|Renewable naphtha      |Fuel code - section 19 (b) (i)              |Default carbon intensity - section 19 (b) (ii)|
          16|Fossil-derived diesel  |Prescribed carbon intensity - section 19 (a)|NULL                                          |
          17|Fossil-derived gasoline|Prescribed carbon intensity - section 19 (a)|NULL                                          |
          18|Fossil-derived jet fuel|Prescribed carbon intensity - section 19 (a)|NULL                                          |

Examples:

Fuel Type: Electricity
Fuel Type Electricity has two possible Determining Carbon Intensity options: Default carbon intensity - section 19 (b) (ii), Fuel code - section 19 (b) (i)
image

Fuel Type: Fossil-derived gasoline
Fuel Type Fossil-derived gasoline has one possible Determining Carbon Intensity option: Prescribed carbon intensity - section 19 (a)
image

Prompt for Provision of the Act selection
Determining Carbon Intensity field needs to be selected when changing fuel type.
image

Story

Copy link

End-to-end Test Results
36 tests   7 ✅  351s ⏱️
11 suites    0 💤
  1 files    22 ❌.

Copy link

Cypress test report is available here. Download the 'cypress-results' artifact to view the report.

Copy link

Backend Test Results

1 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0   1 🔥 ±0 

For more details on these errors, see this check.

Results for commit 2d87321. ± Comparison against base commit ced2850.

Copy link

Frontend Test Results

  1 files  ±0  110 suites  ±0   35s ⏱️ ±0s
301 tests ±0  291 ✅ ±0  0 💤 ±0  10 ❌ ±0 
303 runs  ±0  293 ✅ ±0  0 💤 ±0  10 ❌ ±0 

For more details on these failures, see this check.

Results for commit 2d87321. ± Comparison against base commit ced2850.

@kuanfandevops kuanfandevops added build and removed build labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants