Skip to content

Fix other parts for exit pages - #3086

Merged
thomasiles merged 3 commits into
mainfrom
fix-other-parts-for-exit-pages
Sep 4, 2026
Merged

Fix other parts for exit pages#3086
thomasiles merged 3 commits into
mainfrom
fix-other-parts-for-exit-pages

Conversation

@thomasiles

@thomasiles thomasiles commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Update exit page related code across the app

Trello card: https://trello.com/c/O0iVW7hX/3213-update-code-not-related-to-routing-to-work-with-new-style-exit-pages

This PR modifies a few different parts of the code which need to be modified because of the changes exit pages.

The main reason the code has to change is because pages can now have exit pages which are not connected to conditions.

The database seed has not been updated. This was in the trello card. The current seed has examples for the new style of exit pages and the existing, condition linked, style. I think this makes sense while both are still possible (the multiple branches work is still behind a feature flag). I've created a new trello card to track tasks to complete when the feature is released and the flag remove.

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?

@thomasiles
thomasiles marked this pull request as ready for review September 3, 2026 13:07
Comment thread app/services/revert_draft_form_service.rb Outdated
Comment thread spec/services/revert_draft_form_service_spec.rb Outdated
Comment thread spec/services/revert_draft_form_service_spec.rb Outdated
Comment thread app/services/form_copy_service.rb Outdated
Comment thread app/services/form_copy_service.rb
Comment thread app/services/form_copy_service.rb Outdated
We need to ensure we are reverting exit pages, even when they are not
attached to conditions.

This commit adds exit pages to the revert draft service.
We need to ensure we are copying exit pages, even when they are not
attached to conditions.

This commit makes sure exit pages are correctly copied.

We also make sure welsh translations are copied correctly.
Change the reports to forms which use the new FormDocument structure.

We use a fallback to also show exit pages for legacy form documents.
@thomasiles
thomasiles force-pushed the fix-other-parts-for-exit-pages branch from 3365284 to 0509da0 Compare September 4, 2026 08:13
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3086.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.

@thomasiles
thomasiles added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit cb44bd1 Sep 4, 2026
3 checks passed
@thomasiles
thomasiles deleted the fix-other-parts-for-exit-pages branch September 4, 2026 10:09
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.

2 participants