Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- `previousElapsedDurationSeconds` to `NewDraftSubmission`

## [23.6.0] - 2025-12-04

### Dependencies
Expand Down
2 changes: 2 additions & 0 deletions src/services/api/drafts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ async function uploadDraftData(
title: draftSubmission.title,
lastElementUpdated: draftSubmission.lastElementUpdated,
sectionState: draftSubmission.sectionState,
previousElapsedDurationSeconds:
draftSubmission.previousElapsedDurationSeconds,
onProgress,
abortSignal,
})
Expand Down
2 changes: 2 additions & 0 deletions src/services/draft-data-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,7 @@ export async function getDraftSubmission(
createdAt: latestFormSubmissionDraftVersion.createdAt,
formSubmissionDraftId: formSubmissionDraft.id,
sectionState: s3SubmissionData.sectionState,
previousElapsedDurationSeconds:
s3SubmissionData.previousElapsedDurationSeconds,
})
}
5 changes: 5 additions & 0 deletions src/types/submissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export type NewDraftSubmission = BaseNewFormSubmission & {
lastElementUpdated?: FormElement
/** The state of sections before the draft was saved */
sectionState?: SubmissionTypes.NewS3SubmissionData['sectionState']
/**
* The elapsed duration in seconds the user took to complete the submission
* before the draft was saved
*/
previousElapsedDurationSeconds?: SubmissionTypes.NewS3SubmissionData['previousElapsedDurationSeconds']
}

export type NewFormSubmission = BaseNewFormSubmission & {
Expand Down