Skip to content

Delete routes to an exit page when that exit page is deleted - #3100

Merged
lfdebrux merged 2 commits into
mainfrom
ldeb-delete-exit-pages-delete-routes
Sep 11, 2026
Merged

lfdebrux merged 2 commits into
mainfrom
ldeb-delete-exit-pages-delete-routes

Conversation

@lfdebrux

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Make sure conditions that route to an exit page are deleted with the exit page. Also add the warning message to the delete exit page page for this, from the designs in Mural (https://app.mural.co/t/gaap0347/m/gaap0347/1777554146285/b4db73fa35cee565fab61bb4ca050a371393e52f?wid=40-1782227043493).

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@lfdebrux
lfdebrux force-pushed the ldeb-delete-exit-pages-delete-routes branch from 4573130 to c69fdd9 Compare September 10, 2026 12:49
SamJamCul
SamJamCul previously approved these changes Sep 10, 2026
@william-castoncook

Copy link
Copy Markdown
Contributor

Works as expected and content looks good.

When an exit page is deleted from the delete action of the exit page
controller, any conditions that route to that exit page should also be
deleted.

We do this in the controller rather than with the `dependent` behaviour
of the model itself, because with old-style exit pages (when the
multiple branches feature is not enabled) we need to be able to delete
the exit page when changing where a condition goes to.
Show a notification banner with a warning informing form creators that
routes to an exit page will be deleted when that exit page is deleted.

Don't show the notification banner when there is an error summary for
validation errors (as per GOV.UK Design System guidance).
@github-actions

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3100.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@lfdebrux
lfdebrux added this pull request to the merge queue Sep 11, 2026
Merged via the queue into main with commit 9a1b0ae Sep 11, 2026
3 checks passed
@lfdebrux
lfdebrux deleted the ldeb-delete-exit-pages-delete-routes branch September 11, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants