You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Officers - Compare changes to initial officer state instead of previous edits when in 'edit' mode. #29727
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
jacqueline-williams-549 commentedon Aug 7, 2025
This looks great, tested with name change and roles changes
moraesfm commentedon Aug 8, 2025
@deetz99 @jacqueline-williams-549 could you please clarify what is "original officer state" that the button will revert into when pressed?
deetz99 commentedon Aug 8, 2025
@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.
moraesfm commentedon Aug 8, 2025
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
deetz99 commentedon Aug 8, 2025
@moraesfm
Not sure what you mean by this.
Brand new officers won't have an undo button because there is no 'initial state' to go back to.
moraesfm commentedon Aug 11, 2025
Scenario 1: OK
Preconditions:
Have a form previously submitted with officers
Test steps:
0. Observe all filed in the officer before editing.
Expected result:
0. Notes are taken
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.
Expected result:
0. Notes are taken