Skip to content

Use delivery_configurations to decide whether to send batch emails#2220

Open
stephencdaly wants to merge 1 commit into
mainfrom
use-delivery-configurations-for-batch-emails
Open

Use delivery_configurations to decide whether to send batch emails#2220
stephencdaly wants to merge 1 commit into
mainfrom
use-delivery-configurations-for-batch-emails

Conversation

@stephencdaly

@stephencdaly stephencdaly commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

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

We are replacing the send_daily_submission_batch and send_weekly_submission_batch form attributes with delivery_configurations with a delivery_schedule of "daily" or "weekly".

Update the BatchSubmissionsSelector to look at whether the appropriate delivery_configurations exist to decide whether to send batched submissions for a form.

We need to maintain backwards compatibility, and look at the old attributes if the delivery_configurations are not present to support Submissions that were created before the delivery_configurations were added. This backwards compatibility can be removed once all Submissions without delivery_configurations on the form document have been deleted.

Review notes:

I've duplicated all the tests for checking the old send_daily_submission_batch/send_weekly_submission_batch attributes and checking the delivery_configurations.

The old tests are unchanged, but the indentation has changed - so hiding whitespace changes should help with reviewing.

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?

We are replacing the `send_daily_submission_batch` and
`send_weekly_submission_batch` form attributes with
`delivery_configurations` with a `delivery_schedule` of "daily" or
"weekly".

Update the BatchSubmissionsSelector to look at whether the appropriate
delivery_configurations exist to decide whether to send batched
submissions for a form.

We need to maintain backwards compatibility, and look at the old
attributes if the delivery_configurations are not present to support
Submissions that were created before the delivery_configurations were
added. This backwards compatibility can be removed once all
Submissions without delivery_configurations on the form document have
been deleted.
@stephencdaly
stephencdaly force-pushed the use-delivery-configurations-for-batch-emails branch from e662b7e to 0e514a1 Compare July 17, 2026 15:31
@github-actions

Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

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