Send emails for weekly submission batches#1975
Conversation
ab73a04 to
ac8af80
Compare
Rename send_batch to send_daily_batch and provide the date as an argument to the method, rather than when initializing the service. We will add a separate method to send weekly batches.
We are adding the ability to send weekly batches, so rename the existing mailer to make it clear that it is for daily batches.
This email uses placeholder content for now, re-using the same content as the daily batch email where possible. This will be updated when the actual content is produced.
Add a method that generates the CSV(s) for the defined date range and sends the email with them attached. We haven't decided what the CSV filenames will be for weekly submissions yet, so for now keep them the same as for the daily submissions using the the end date of the range. We can update this when it's decided.
Check the delivery_schedule for the delivery, and call the appropriate method to send the email. Update the logging to log different events for daily and weekly deliveries.
ac8af80 to
48d30e4
Compare
|
|
🎉 A review copy of this PR has been deployed! It is made of up two components Important Not all of the functionality of forms-runner is present in review apps. You should use the full dev environment to test the functionality which is disabled here. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |



What problem does this pull request solve?
Trello card: https://trello.com/c/v2LQDGgq/
Add a new "weekly" delivery schedule.
Modify SendSubmissionBatchJob to also be able to send weekly deliveries. This sends the email with placeholder content for the email body and attachment file names that will be updated when the content is designed.
Things to consider when reviewing