Skip to content

Redirect forms-runner to 'Edit question routes' page when multiple branches enabled - #3129

Merged
lfdebrux merged 1 commit into
mainfrom
ldeb-update-redirect-from-forms-runner-for-multiple-branches
Sep 18, 2026
Merged

lfdebrux merged 1 commit into
mainfrom
ldeb-update-redirect-from-forms-runner-for-multiple-branches

Conversation

@lfdebrux

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/ufMggbI2/3272-make-forms-runner-backwards-route-error-page-work-with-multiple-branches-post-release

Currently when previewing a draft form with a route that goes backwards, forms-runner shows an error page instead of trapping the user in an infinite loop. The error page has a link to forms-admin, using the redirect_from_forms_runner#routes URL [[1]].

When the multiple branches feature is enabled for a form, we want the link from forms-runner to edit the routes for a question to go to the new 'Edit question routes' page, rather than the old routes journey as it does currently.

This PR updates the controller action to choose the correct page based on the multiple_branches feature flag.

[1]: https://github.com/govuk-forms/forms-runner/blob/cfc34640ad85d2be9f7f21f055a3fd8212c47886/app/controllers/forms/step_controller.rb#L202).

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?

…anches enabled

Currently when previewing a draft form with a route that goes backwards,
forms-runner shows an error page instead of trapping the user in an
infinite loop. The error page has a link to forms-admin, using the
`redirect_from_forms_runner#routes` URL [[1]].

When the multiple branches feature is enabled for a form, we want the
link from forms-runner to edit the routes for a question to go to the
new 'Edit question routes' page, rather than the old routes journey.

[1]: https://github.com/govuk-forms/forms-runner/blob/cfc34640ad85d2be9f7f21f055a3fd8212c47886/app/controllers/forms/step_controller.rb#L202).
@github-actions

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3129.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 18, 2026
Merged via the queue into main with commit 117f3a2 Sep 18, 2026
4 checks passed
@lfdebrux
lfdebrux deleted the ldeb-update-redirect-from-forms-runner-for-multiple-branches branch September 18, 2026 10:44
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