fix(DF-830): change preview banner text when notification email is not set. #397
Open
mokhld wants to merge 8 commits into
Open
fix(DF-830): change preview banner text when notification email is not set. #397mokhld wants to merge 8 commits into
mokhld wants to merge 8 commits into
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Proposed change
Payment-only forms can now submit through GOV.UK Pay without a notification email being set on the form metadata. The summary controller routes the no-email path through PaymentField
onSubmit(preauth/redirect) only, instead of skipping submission entirely.Impact
For the in-memory cache, the cache is stored in the server’s memory, so it is cleared every time the server restarts, including during a deployment. Active users will simply trigger a cache miss on their next request, which causes the server to rebuild the form model with the new key. No data is lost because user answers are stored in the session, not in the model cache.
For Redis cache, the old keys, for example formId_live_false, will remain until they expire. New requests will generate the new keys, for example formId_live_false_email@ref.com. This creates a one-time cache miss for existing users, which is safe.
Save and Exit persists the user’s answers, or state, to the Submission API. It does not store the cache key itself. When a user clicks a resume link, the Runner fetches the latest form metadata, including the current notificationEmail, and then asks the Engine to resolve the model.
The Engine generates the new cache key based on that latest metadata. Whether the user saved their progress before or after this change was merged is irrelevant to the resumption process.
The notificationEmail is sent to the Submission API at the point the user submits the form. By including the email in the cache key, we have increased reliability.
Previously, if a form was cached and the notification email was then changed in Designer, the Engine might have used the old cached model with the old email during submission. Now, a change in the email address forces a cache bust.
Jira ticket: DF-830
Type of change
Checklist
README.mdanddocs/*(where appropriate, e.g. new features).npm run test).npm run lint).npm run format).