Skip to content

Change value sent for 'None of the above' option for conditions#1904

Closed
SamJamCul wants to merge 1 commit intomainfrom
fix-none-of-the-above-value-condition-error
Closed

Change value sent for 'None of the above' option for conditions#1904
SamJamCul wants to merge 1 commit intomainfrom
fix-none-of-the-above-value-condition-error

Conversation

@SamJamCul
Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

https://trello.com/c/2H6cVned/2228-routes-based-on-none-of-the-above-answers-do-not-work

When creating or updating a condition for an optional selection question, we've been saving the option 'None of the above' in our database as the answer value none_of_the_above. This has had the effect of not functioning in forms runner, as it's compared to the actual answer value None of the above. This PR goes in hand with govuk-forms/forms-api#733 to ensure that the answer value missing error now avoids triggering when the answer value is None of the above.

The change in this PR makes sure that we're saving the answer value for a condition as None of the above which in turn means runner will correctly compare against the actual answer value when given.

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?

@SamJamCul SamJamCul force-pushed the fix-none-of-the-above-value-condition-error branch from f882d49 to e532cb7 Compare April 17, 2025 14:27
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at https://pr-1904.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 more details please see the review app wiki page

@SamJamCul SamJamCul closed this Apr 30, 2025
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.

1 participant