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 Calc: All users see same information vs. local changes #1634

Closed
12 of 18 tasks
tessmgood opened this issue Jan 5, 2022 · 1 comment
Closed
12 of 18 tasks

HFI Calc: All users see same information vs. local changes #1634

tessmgood opened this issue Jan 5, 2022 · 1 comment
Assignees
Labels
Ready User Story or Task Ready to be pulled into sprint User Story User story

Comments

@tessmgood
Copy link

tessmgood commented Jan 5, 2022

As a Z/RWCO I want everyone to see the same information So That there is no uncertainty and collaboration between Z/RWCOs is supported on prep morning

Additional Context
Decision taken to go with path 1

  • path 1: changes to values such as FOP and number of prep days in cycle are visible to all users
  • path 2: changes to values such as FOP and number of prep days in cycle are local to that user - collaborators would see different information - OPERATIONS RISK
  • assumption: a final version of the prep levels is saved as spreadsheet / PDF
  • how might we prevent a user from leaving the page without saving changes?

Acceptance Criteria
SS: I'm not sure how to start on acceptance criteria, so I'm going to throw out some premises to get a conversation going:
Premise 1. : Changes are only persisted when a big fast save button is pressed - and said save button informs user that changes will affect all users.
Premise 2.: If two of us are changing things at the same time, whomsoever presses save last, is going to overwrite the other persons work.
Premise 3.: To start with, we don't need fancy stuff like seeing who made the change when and what the default value is/was.

  • Extract "load" action.
  • Extract "change fire starts" action.
  • Extract "select/deselect station" action.
  • Extract "pdf" action.
  • Extract "change prep period" action.
  • Remove save changes button.

State 1: No changes made. Save button disabled

  • Given I open the HFI Calculator, When no inputs are changed (fuel, fire starts), Then the new 'Save changes' button is disabled (nothing to save) - download function is available
    No changes - Save disabled, Download active.png

State 2: Changes made. Save button active, Download PDF disabled

  • Given I change a value in one of the select fields (fuel type, fire start), Then the 'Save changes' button becomes available - indicating action is required
  • Given I change a value in one of the select fields (fuel type, fire start), Then the 'Download PDF (current: copy to clipboard) button is disabled - I cannot download this data until saved
    Changes pending - Save button active - download disabled.png

State 3: Successful save communicated by toast message (snackbar) - Save button disabled, Download PDF available.

  • Given I change a value in one of the select fields (fuel type, fire start), When I press 'Save' and it is successful, Then a green success toast message (BC success #2E8540) displays and download function becomes available
    Successful Save - Toast.png

State 4: Unsuccessful save (e.g. someone was saving at the exact same time, or something went wrong)

  • Given I change a value in one of the select fields (fuel type, fire start), When I press 'Save' and it is unsuccessful, Then a red error toast message (BC error #D8292F) displays and download function remains unavailable. Further, the fields that did not save are outlined with the same red error colour
    Unsuccessful Save - Toast (1).png

State 5: I made changes, but I didn't save them, and now I'm leaving my browser tab / hitting back / hitting refresh, etc.

  • Given I change a value in one of the select fields (fuel type, fire start), When I try to leave the webpage without pressing 'Save', Then a javascript prompt reminds me to save before leaving, with the option to cancel if I don't want to save those changes

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
@nmathava
Copy link

Hey team! Please add your planning poker estimate with ZenHub @andrea-williams @conbrad @Sybrand

@nmathava nmathava removed the Decision PO decision ticket label Feb 16, 2022
@Sybrand Sybrand self-assigned this Mar 8, 2022
@Sybrand Sybrand closed this as completed Apr 8, 2022
@Sybrand Sybrand reopened this Apr 8, 2022
Sybrand added a commit that referenced this issue Apr 12, 2022
feat(hfi calculator): Change prep period behaviour [#1634](#1634)

- Load the most recently saved prep record that overlaps with the current date. (Previous behaviour was to load the most recently modified prep record.)
- Changing the prep period date does not result in a write to the database. Users can change thus change dates without affecting other users. (Previous behaviour was to create/update a prep record when changing the date.)
- When a fire starts are changed or weather stations are toggled, a prep period record is created in the database.
- Changing the prep period end date results in losing fire starts & weather station toggles. (Previous behaviour would retain fire starts & weather station toggles if the start start date was unchanged.)
- Changed warning message from "Any changes made to dates, fire starts or selected stations ..." to "Any changes made to fire starts or selected stations..."
Sybrand added a commit that referenced this issue Apr 12, 2022
feat(hfi calculator): HFI Calc - Success Snackbar [#1634](#1634)

- Add a success snackbar that shows when user has successfully made a change to prep.
@Sybrand Sybrand closed this as completed Apr 13, 2022
vanislekahuna pushed a commit to vanislekahuna/wps that referenced this issue Sep 19, 2024
feat(hfi calculator): Change prep period behaviour [bcgov#1634](bcgov#1634)

- Load the most recently saved prep record that overlaps with the current date. (Previous behaviour was to load the most recently modified prep record.)
- Changing the prep period date does not result in a write to the database. Users can change thus change dates without affecting other users. (Previous behaviour was to create/update a prep record when changing the date.)
- When a fire starts are changed or weather stations are toggled, a prep period record is created in the database.
- Changing the prep period end date results in losing fire starts & weather station toggles. (Previous behaviour would retain fire starts & weather station toggles if the start start date was unchanged.)
- Changed warning message from "Any changes made to dates, fire starts or selected stations ..." to "Any changes made to fire starts or selected stations..."
vanislekahuna pushed a commit to vanislekahuna/wps that referenced this issue Sep 19, 2024
feat(hfi calculator): HFI Calc - Success Snackbar [bcgov#1634](bcgov#1634)

- Add a success snackbar that shows when user has successfully made a change to prep.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready User Story or Task Ready to be pulled into sprint User Story User story
Projects
None yet
Development

No branches or pull requests

4 participants