Skip to content

Backfill of 'Register or renew temporary use of land or buildings to keep livestock' form - Runner - #1361

Open
Scullyon wants to merge 2 commits into
mainfrom
feat/DF-1425-backfill
Open

Scullyon wants to merge 2 commits into
mainfrom
feat/DF-1425-backfill

Conversation

@Scullyon

Copy link
Copy Markdown
Contributor

Initial backfill / submission linking functionality.

submission-linking-backfill-simpler

# Conflicts:
#	src/server/routes/homepage.js
#	src/server/services/submissionService.test.js
@sonarqubecloud

Copy link
Copy Markdown


const { accessToken } = request.auth.credentials

// Before the saved forms are read, so they include the submissions linked

@jbarnsley10 jbarnsley10 Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A bit chicken-and-egg. Do we read the forms first to determine if linking has already been done (and therefore don;t need a 'link' API call each time) or do we check if linked (using a 'link' API call) even though this will become redundant after the first time it happens for this form/user.
Is there a way to tell forms are linked purely on the 'getForms'-type call, because if there was, we could avoid the extra 'link' API call every time?

* How long the homepage waits for earlier submissions to be linked, so a slow
* submission API delays the page by no more than this
*/
const LINK_SUBMISSIONS_TIMEOUT_MS = 5000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this give ample time for all a user's previous submissions to be linked?

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.

2 participants