cds-snc / cds-snc/platform-forms-client
Error path for editing a draft form once responses have been submitted
- Dominant language
- TypeScript
- Stars
- 46
- Forks
- 16
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 82
Description
When the data structure of a draft form gets modified, but there have been some responses that were submitted through "Test" mode, downloading the CSV with responses results in an error since we can't handle the non-active form structure.
## Steps to reproduce
- Create a form
- Submit test responses
- Modify the structure of the form
- Download CSV
- See alarm in slack events channel:
> Could not create submissions in format csv: e.map is not a function
## Details
- **Browser**: Chrome
- **Operating system**: Mac
- **Environment**: Production
- **Language**: (English
- **Viewport**: Desktop
## Expected behaviour
A path forward for users with an error message?
A detection of form status for on-call folks?
## Additional context
Flagged in #forms-production-events
Form: `cm408mivh00azqik5zfsxywaz `
Thread: https://gcdigital.slack.com/archives/C05G766KW49/p1730928120867699

Contributor guide
Research direction
Start by reproducing the CSV download flow after submitting Test-mode responses and modifying the form structure, then trace the source of the “e.map is not a function” error. The issue names no files or tests, so locate the handling for non-active form structures and the CSV export path first. Done should mean the failure has a defined user-facing path or error and no longer creates the reported Slack alarm.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100