Skip to content

False unsaved changes warning when switching tabs after saving organisation #154

@james-cross

Description

@james-cross

Summary

After saving an organisation successfully, switching to the Services tab triggers a false "Switch Tab without Saving?" warning message, even though the changes have been saved.

Steps to Reproduce

  1. Navigate to https://admin.streetsupport.net/organisations
  2. Edit an organisation (e.g. Citizens Advice - Sandwell and Walsall)
  3. Make changes to organisation details
  4. Save the organisation
  5. Attempt to switch to the Services tab
  6. Warning modal appears asking "Switch Tab without Saving?"

Expected Behaviour

After successfully saving organisation changes, switching tabs should not trigger an unsaved changes warning.

Actual Behaviour

A "Switch Tab without Saving?" modal appears even though the organisation data has been saved successfully.

Additional Context

  • User role: super-admin
  • Organisation being edited: Citizens Advice - Sandwell and Walsall
  • This appears to be related to a previous fix for CMS not saving info unless a box was closed
  • The save operation itself works correctly, but the client-side dirty state tracking is not being reset after successful save
  • Screenshot provided shows the warning modal

This suggests the form's dirty state is not being properly cleared after a successful save operation, causing the unsaved changes detection to persist incorrectly.

Additional Context

Original report

Reporter: Eliz Hopkins (westmidlands@streetsupport.net)
Submitted: 2026-04-02T12:31:32.530Z

What they were trying to do:

We solved the issue of the CMS not saving the info unless the box was closed. Now, I update the organisation, switch tabs to services and it comes up with a message saying do I want to switch without saving. even though I saved it.

What happened instead:

Shows a message "Switch Tab without Saving?"

Triage reasoning: This is clearly an admin CMS issue involving form state management after save operations. The problem is with client-side state tracking not being reset after successful saves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions