Skip to content

Added validation checks when reviewing personal information #10304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dcyoung-dev
Copy link
Collaborator

Context

We want to check that the Immigration Status form is valid before allowing the Candidate to mark the Personal Details section as complete. Previously Candidates could mark this section as complete without selecting their Immigration Status.

Changes proposed in this pull request

  • Added a validation check for the ImmigratioStatusForm for non-UK Canaidates when marking the Personal Details section as complete

Guidance to review

Before this PR

  • With a new Canadidate, edit the "Personal information" section
  • Add a first name, last name and dob
  • select a non UK nationality
  • On the immigration status page, navigate back to the "Your details" page
  • Click on "Change" in the "Personal information" section
  • Select "complete" and submit
  • You will see the section has been completed but there will be no "Visa or immigration status" information

After this PR

  • Following the same steps, when you mark the section as "Complete", the section will not complete.
  • The Candidate will be shown the Review page without error - this will be fixed next as there are no validation errors on the page for any other form within this section.

Things to check

  • If the code removes any existing feature flags, a data migration has also been added to delete the entry from the database
  • This code does not rely on migrations in the same Pull Request
  • If this code includes a migration adding or changing columns, it also backfills existing records for consistency
  • If this code adds a column to the DB, decide whether it needs to be in analytics yml file or analytics blocklist, if included inform data insights team of the changes
  • If this code adds a column that may include PII, the sanitise.sql script and 0025-protecting-personal-data-in-production-dump.md ADR have been updated
  • API release notes have been updated if necessary
  • If it adds a significant user-facing change, is it documented in the CHANGELOG?
  • Attach the PR to the Trello card

@dcyoung-dev
Copy link
Collaborator Author

Trello: https://trello.com/c/2eH1p6bZ

@dcyoung-dev dcyoung-dev self-assigned this Jan 28, 2025
@dcyoung-dev dcyoung-dev force-pushed the dy-bug-canaidate-submits-application-without-immigration-status branch from 8d7dabe to 560f5ed Compare January 28, 2025 11:10
@dcyoung-dev dcyoung-dev force-pushed the dy-bug-canaidate-submits-application-without-immigration-status branch from 560f5ed to ea0a7ca Compare February 5, 2025 14:48
Specs to do with Personal Details have been moved to a specific folder. This is to help with organising features
Renamed controller action to align with RESTful naming
Changed the order of some code to match other areas
Reorganised this action to take notes on what each variable is/does.
Part of building up a better understanding of this page
Stripped back the show page to remove complications. Added a simple test to ensure the correct data is show when a Candidate has not entered any details.

The spec included in this commit will pass, however other specs will fail due to the removal of some key functionality.
@dcyoung-dev dcyoung-dev force-pushed the dy-bug-canaidate-submits-application-without-immigration-status branch from ea0a7ca to 85cb1b9 Compare February 11, 2025 14:58
@dcyoung-dev dcyoung-dev deleted the dy-bug-canaidate-submits-application-without-immigration-status branch March 14, 2025 12:20
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