Skip to content

Officers - Compare changes to initial officer state instead of previous edits when in 'edit' mode. #29727

Closed

Description

@deetz99

The original 'undo' functionality allowed undoing of edits step-by-step in the order the edits were made. This was updated so that 'undo' reverts the changes to the initial state.

The issue is that the comparison for the edit badges is still comparing the previous edit state (which worked well with step-by-step undos) with the new state, instead of the initial officer state.

The edit step needs to be updated to compare the newly edited officer with the original officer state that was fetched from the API.

Activity

  1. added
    connect
    on Jul 22, 2025
  2. added
    bug
    UI
    on Jul 22, 2025
  3. self-assigned this
    on Jul 22, 2025
  4. jacqueline-williams-549 commented on Aug 7, 2025

    @jacqueline-williams-549

    This looks great, tested with name change and roles changes

  5. moraesfm commented on Aug 8, 2025

    @moraesfm

    @deetz99 @jacqueline-williams-549 could you please clarify what is "original officer state" that the button will revert into when pressed?

  6. deetz99 commented on Aug 8, 2025

    @deetz99
    CollaboratorAuthor

    @moraesfm

    Previously I had it so you could undo any edit you made step-by-step.

    This changed to hitting undo undoes all changes.

    So basically when you hit undo, it reverts back to the initial state, no matter how many edits youve made.

  7. moraesfm commented on Aug 8, 2025

    @moraesfm

    Thank you for clarifying @deetz99 .
    I think something has changed along with the new push. I no longer can make it as Draft, nor see the 'Undo' button

  8. deetz99 commented on Aug 8, 2025

    @deetz99
    CollaboratorAuthor

    @moraesfm

    I no longer can make it as Draft,

    Not sure what you mean by this.

    nor see the 'Undo' button

    Brand new officers won't have an undo button because there is no 'initial state' to go back to.

  9. moraesfm commented on Aug 11, 2025

    @moraesfm

    Scenario 1: OK

    Preconditions:
    Have a form previously submitted with officers

    Test steps:
    0. Observe all filed in the officer before editing.

    1. Edit all officers field adding '1' at the end
    2. Save it
    3. Back to edit mode and now update the '1' to '2'
    4. Now back to the business page and click "undo"
    5. Verify Officers info

    Expected result:
    0. Notes are taken

    1. All fields are now added '1' at the end
    2. Draft is now saved and "Undo" is displayed
    3. All fields are now added '2' at the end
    4. Changes are undone and "Draft" is no longer available.
    5. All information are back to it was on step 0.

    Scenario 2: OK
    Ensure undo button reverts back to the initial state when first created, even though it's been updated previously

    Precondition:
    Have the previous TC run successfully

    Steps:
    0. Observe all filed in the officer before editing.

    1. Edit all the officers field once again adding '3' at the end
    2. Save it
    3. Back to edit mode and now update it all ending with '3
    4. Now back to the business page and click "undo"
    5. Verify Officers info

    Expected result:
    0. Notes are taken

    1. All fields are now added '3' at the end
    2. Draft is now saved and "Undo" is displayed
    3. All fields are now added '3' at the end
    4. Changes are undone and "Undo" is no longer available.
    5. All information are back to it was on step 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OfficersUIbugconnect

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions