Skip to content
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

Fix back link for references interruptions #10130

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

CatalinVoineag
Copy link
Contributor

@CatalinVoineag CatalinVoineag commented Dec 2, 2024

Context

When filling up a reference, we show the candidate an interruption page when inputting a personal email address. The back link on this page can break if the reference is not in DB anymore. This can happen if the user deleted the reference in another tab.

This PR changes this to redirect the user to the review/index page if the reference in not present anymore.

https://dfe-teacher-services.sentry.io/issues/6104915581/?environment=production&project=1765973&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&sort=date&statsPeriod=24h&stream_index=0

Changes proposed in this pull request

Guidance to review

Go to review or pull locally
Add new reference with personal email
Stop on the interruption page, where we warn the candidate against using a personal email
Delete the reference in a new tab or console.
Click the back link

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
  • API release notes have been updated if necessary
  • If it adds a significant user-facing change, is it documented in the CHANGELOG?
  • Required environment variables have been updated added to the Azure KeyVault
  • Inform data insights team due to database changes
  • Make sure all information from the Trello card is in here
  • Rebased main
  • Cleaned commit history
  • Tested by running locally
  • Add PR link to Trello card

Sometimes the reference is not present in our DB any more. This can
happen if the user deleted the reference in another tab.

The back link for the references#interruptions controller broke when the
references didn't exist any more, now it will just redirect the user to
the references index page.
Copy link

sentry-io bot commented Dec 2, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: app/controllers/candidate_interface/references/interruptions_controller.rb

Function Unhandled Issue
set_navigation_links [**NoMethodError: undefined method id' for nil (NoMethodError)**](https://dfe-teacher-services.sentry.io/issues/6104915581/?referrer=github-open-pr-bot) CandidateInterface::References::InterruptionsCon... <br> Event Count:` 2

Did you find this useful? React with a 👍 or 👎

@CatalinVoineag CatalinVoineag requested a review from a team December 2, 2024 16:26
@CatalinVoineag CatalinVoineag marked this pull request as ready for review December 2, 2024 16:26
@CatalinVoineag CatalinVoineag added the deploy_v2 Deploy the review app to AKS label Dec 2, 2024
@github-actions github-actions bot temporarily deployed to review_aks-10130 December 2, 2024 16:29 Destroyed
@CatalinVoineag CatalinVoineag merged commit 5661ef8 into main Dec 3, 2024
46 checks passed
@CatalinVoineag CatalinVoineag deleted the cv/fix-reference-back-button branch December 3, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy_v2 Deploy the review app to AKS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants