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 - Add is_legacy Field and Update Fuel Type Lookup Services #1550

Open
7 tasks
AlexZorkin opened this issue Dec 20, 2024 · 0 comments
Open
7 tasks

LCFS - Add is_legacy Field and Update Fuel Type Lookup Services #1550

AlexZorkin opened this issue Dec 20, 2024 · 0 comments
Assignees
Labels
Added Banana 4 Scale Label for tickets added mid-sprint Medium Medium priority Task Work that does not directly impact the user

Comments

@AlexZorkin
Copy link
Collaborator

Description:
Introduce an is_legacy boolean column to the fuel_type table to distinguish legacy fuel types from current ones. Modify existing fuel type retrieval services to filter by is_legacy, ensuring that only current fuels appear in default lookups, while still allowing legacy entries to be fetched when needed.

Purpose and benefit to user:
Allows clear separation of legacy and current fuels at the database level and in service responses. Users benefit from simplified dropdowns containing only current fuels, while analysts and historical reporting can still access legacy data on demand.

Acceptance Criteria:

  • Given I am a developer, When I run the migration, then fuel_type includes an is_legacy field defaulting to false without data loss.
  • Given I am a user fetching a dropdown list of available fuels, When I request the data, then only is_legacy = false fuels return by default.
  • Given I am an analyst looking at a historical report, When I request a legacy list, then only the legacy fuel_types are returned.

Development Checklist:

  • Add is_legacy boolean column to fuel_type with default false.
  • Update ORM model and run migration to include is_legacy.
  • Adjust fuel type retrieval queries to exclude is_legacy = true entries unless a parameter or condition includes them.
  • Test queries and endpoints to confirm that legacy filtering behaves as expected.

Notes:
This combined change ensures the database schema and application services properly support and distinguish legacy fuel types from current ones.

@AlexZorkin AlexZorkin added Medium Medium priority Task Work that does not directly impact the user labels Dec 20, 2024
@RebekahRFord RebekahRFord added the Added Banana 4 Scale Label for tickets added mid-sprint label Jan 3, 2025
@dhaselhan dhaselhan self-assigned this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added Banana 4 Scale Label for tickets added mid-sprint Medium Medium priority Task Work that does not directly impact the user
Projects
None yet
Development

No branches or pull requests

3 participants