Skip to content

Prepare to drop old columns that have been replaced by DeliveryConfigurations#2942

Draft
stephencdaly wants to merge 9 commits into
mainfrom
prepare-to-drop-submission-type-and-submission-format
Draft

Prepare to drop old columns that have been replaced by DeliveryConfigurations#2942
stephencdaly wants to merge 9 commits into
mainfrom
prepare-to-drop-submission-type-and-submission-format

Conversation

@stephencdaly

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/WMnjLlJV

The following columns have been replaced by the delivery_configurations table, and are no longer used by forms-runner

  • submission_type
  • submission_format
  • send_daily_submission_batch
  • send_weekly_submission_batch

Replace all places where we were reading and updating these attributes with only reading and updating the DeliveryConfigurations. Mark the columns as ignored so we can drop them in a subsequent PR.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

Update reports to use the `delivery_configurations` rather then the
deprecated `submission_type`,
`submission_format`,`send_daily_submission_batch` and
`send_weekly_submission_batch` attributes.
When enabling/disabling CSV/JSON submission attachments, only read
and upate the immediate email delivery configuration, rather than
the deprecated submission_type and submission_format fields on the
form.
Only read and update the form's DeliveryConfigurations when updating
whether daily/weekly batch submission emails are enabled. This will
allow us to remove the `send_daily_submission_batch` and
`send_weekly_submission_batch` attributes from the Form model.
These translations are for an input object that no longer exists
Use delivery_configurations instead of deprectated submission_type,
submission_format, send_daily_submission_batch and
send_weekly_submission_batch fields on the live form page.
Use delivery_configurations rather than the deprected attributes
when determining whether the tasks for email attachments and batch
submissions are complete.
Update the rake tasks for enabling/disabling S3 and email submissions
to have the following tasks:
- enable_s3
- disable_s3
- enable_email
- disable_email

These tasks will now only edit the delivery_configurations and not
edit the submission_type and submission_format which are deprecated
and unused.

The new tasks make it possible to have both S3 and email submissions
enabled at the same time.
This has been run on all environments and needs to be deleted so we
can ignore the deprecated Form columns.
The following attributes are no longer used by forms-admin or
forms-runner, so can be ignored in preparation for dropping the
columns:
- submission_type
- submission_format
- send_daily_submission_batch
- send_weekly_submission_batch
@stephencdaly
stephencdaly force-pushed the prepare-to-drop-submission-type-and-submission-format branch from 5f97934 to 5a2b297 Compare July 17, 2026 18:03
@github-actions

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2942.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

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.

1 participant