Skip to content

Fix institution mismatch after saving vetting-type-hint - #532

Open
kayjoosten wants to merge 1 commit into
mainfrom
feature/issue-409-vetting-type-hint-institution
Open

Fix institution mismatch after saving vetting-type-hint#532
kayjoosten wants to merge 1 commit into
mainfrom
feature/issue-409-vetting-type-hint-institution

Conversation

@kayjoosten

Copy link
Copy Markdown
Contributor

Summary

  • After saving activation help text (vetting-type-hint) for an institution other than the RAA's home institution, the "Select institution" dropdown and page subtitle snapped back to the home institution while the displayed text stayed on the institution just edited.
  • Redirect to the same route with the saved institution on success (POST/Redirect/GET), so the dropdown and subtitle stay in sync with the saved hints.
  • On save failure, the form still re-renders in place so submitted input isn't lost.

Fixes #409

Test plan

  • As an RAA/SRAA with access to 2+ institutions, edit vetting-type-hint text for a non-home institution and save; confirm the dropdown and displayed text both show the edited institution afterwards.
  • Confirm a failed save keeps the submitted hint text on the form instead of clearing it.
  • COMPOSER_MEMORY_LIMIT=1G composer check-ci passes.

Redirect to the vetting-type-hint route with the saved institution on
success, instead of re-rendering directly. Previously the select
institution dropdown and page subtitle fell back to the RAA's home
institution on POST, while the hint text shown was for the institution
that was actually just edited, leaving the two out of sync. On save
failure the form still re-renders in place so the submitted hints are
not lost.

Fixes #409
@kayjoosten
kayjoosten requested a review from johanib September 7, 2026 09:04
}

$this->logger->debug('Vetting type hint saving failed, adding error to form');
$this->addFlash('error', 'ra.vetting_type_hint.error');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make test and test

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.

After setting vetting-type-hint "Select institution" returns to RAAs home institution

1 participant