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

HFI Calculator: Convert fuel type cells to a select field / dropdown #1555

Closed
8 of 13 tasks
Tracked by #1541
tessmgood opened this issue Nov 18, 2021 · 7 comments
Closed
8 of 13 tasks
Tracked by #1541
Assignees
Labels
Architecture Ready User Story or Task Ready to be pulled into sprint User Requested User Story User story

Comments

@tessmgood
Copy link

tessmgood commented Nov 18, 2021

As a Z/RWCO I want to be able to change the representative fuel type for a weather station So That I can consider all relevant fuel types throughout the fire season for a given weather station

Additional Context

  • RISK everyone should see the same prep level... what happens when a ZWCO changes a fuel, while an RWCO also has the tool open?
    • for feedback once dropdown is introduced? different FCs have slightly different workflows on prep day.
    • Ops CoP should input

Acceptance Criteria

  • Refactor: station selection
  • Remove fuel type info from fire centre response - should only need fuel type id.
  • get_fire_centre_stations being called multiple times
  • Refactor: split build and calculation functions in hfi_calc.py
  • *_t with *_time_of_ignition ?
  • remove broad exception
  • Given I am using the HFI Calculator, When I am viewing the weekly table / Prep Period, Then all FBP Fuel Type cells are select fields, with a dropdown of all fuel types
  • Given I am using the HFI Calculator, When I am viewing a single day, Then all FBP Fuel Type cells are select fields, with a dropdown of all fuel types
  • Given I am using the HFI Calculator, When I change a fuel type for a weather station, Then that change is reflected across all days and views (daily/weekly) for that prep period - I can only change it in the prep period view, not daily views
  • Given I change a fuel type for a weather station, that change persists for the user that made the change within browser sessions, pending HFI Calc: All users see same information vs. local changes  #1634 decision
  • Given I change a fuel type for a weather station, that change and all resulting calculations are captured in the copy-to-clipboard PDF generation workflow
  • Given I change a fuel type for a weather station, a shimmer effect indicates a row is recalculating (per Fire Behaviour Calculator) - the planning area row (note: mean fire intensity and prep level may recalculate)
  • The fuel type always defaults to the representative fuel type

Definition of Done

  • Ready to Demo in Sprint Review
  • Does what I have made have appropriate test coverage?
  • Documentation and/or scientific documentation exists and can be found
  • Peer Reviewed by 2 people on the team
  • Manual testing of all PRs in Dev and Prod
  • Merged
@tessmgood tessmgood added User Requested User Story User story 4Refinement this ticket is ready for refinement with the team labels Nov 18, 2021
@conbrad
Copy link
Collaborator

conbrad commented Nov 23, 2021

Permission for this as well?

@Sybrand
Copy link
Contributor

Sybrand commented Nov 24, 2021

@conbrad re. permissions - are you seeing fine grained permissions? Right now I'm seeing "view" and "edit" roles. I'd assume anyone with an idir can view - so maybe that's not even a hard permission, but edit is then required to see it on the front end, and to post/put to the back-end.

@conbrad
Copy link
Collaborator

conbrad commented Nov 24, 2021

@Sybrand yeah I think all we're concerned about are those 2 permissions at the moment, which makes things easier to get started.

@tessmgood tessmgood added Ready User Story or Task Ready to be pulled into sprint and removed 4Refinement this ticket is ready for refinement with the team labels Jan 5, 2022
@nmathava nmathava added the Pair Programming Two dev team members to work label Jan 19, 2022
@nmathava nmathava added 4Refinement this ticket is ready for refinement with the team and removed Ready User Story or Task Ready to be pulled into sprint labels Feb 10, 2022
@conbrad
Copy link
Collaborator

conbrad commented Feb 11, 2022

We should have requests persisted to database by the time we tackle this ticket, I think this AC can be updated to be persisted across all users instead of per user browser session.

@conbrad
Copy link
Collaborator

conbrad commented Feb 11, 2022

A lot of this work has been made more manageable with the current work we're doing migrating the logic from frontend to backend. It may be a good opportunity to refactor the request/response models for HFI in this ticket to be more explicit, since this is post MVP and we'll have the clearest picture of field structure when tackling this ticket.

Thoughts, @Sybrand ?

@andrea-williams
Copy link
Collaborator

re: RISK in Additional Context. I'm thinking we'll need to implement a lockfile mechanism for writing changes to the DB so that we don't encounter race conditions when 2 people try to save changes simultaneously. Not sure how to handle situation where the page is stale for a viewer because someone else has recently submitted changes...
Or maybe I'm over-complicating this.

@Sybrand
Copy link
Contributor

Sybrand commented Feb 14, 2022

@andrea-williams re. overwriting. It's more complicated than that (meaning - let's leave it for now) ; You'd need to push changes to all other open browsers to avoid overwrites. So we'd need a push mechanism - something we haven't thought about at all.

@nmathava nmathava added Ready User Story or Task Ready to be pulled into sprint and removed 4Refinement this ticket is ready for refinement with the team Pair Programming Two dev team members to work labels Feb 16, 2022
Sybrand added a commit that referenced this issue Apr 13, 2022
HFI Calc - Refactor Request & Response Structure [#1555](#1555)

refactor(hfi calculator): Changed HFI request and result structure, remove selected_station_code_ids and made request/response structure more strict.
@Sybrand Sybrand closed this as completed Apr 27, 2022
vanislekahuna pushed a commit to vanislekahuna/wps that referenced this issue Sep 19, 2024
HFI Calc - Refactor Request & Response Structure [bcgov#1555](bcgov#1555)

refactor(hfi calculator): Changed HFI request and result structure, remove selected_station_code_ids and made request/response structure more strict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Ready User Story or Task Ready to be pulled into sprint User Requested User Story User story
Projects
None yet
Development

No branches or pull requests

5 participants