Add job to send a batch of submissions for a form#1901
Conversation
09b279d to
5ca0574
Compare
38a3d43 to
72f905b
Compare
5ca0574 to
d5f802d
Compare
2443b2c to
c43f10a
Compare
781fe3e to
7861825
Compare
This scopes submission based on their created_at, form_id and mode. The given date is converted to the local time before the comparison to the created_at value. Co-authored-by: Stephen Daly <stephen.daly@digital.cabinet-office.gov.uk>
Add a job that will send an email containing CSV(s) of submissions for a given form on a given day for a given mode. This job is not scheduled by anything yet. Co-authored-by: Samuel Culley <samuel.culley@digital.cabinet-office.gov.uk>
7861825 to
5ccc9fd
Compare
db/migrate/20260218110428_add_index_on_form_id_and_created_at_and_mode_to_submissions.rb
Outdated
Show resolved
Hide resolved
df1446e to
e91e7b2
Compare
This index will be used to locate a batch of submissions for daily batching. Co-authored-by: Stephen Daly <stephen.daly@digital.cabinet-office.gov.uk>
This scope orders a list of submissions by their form's udpated_at, which is used as a proxy for its version, and then the submission date. The intention is to use this in the CSV generation for submission batches, where we'll need to maintain the order that submissions were made, but keep them in version clusters Co-authored-by: Stephen Daly <stephen.daly@digital.cabinet-office.gov.uk>
The CSV generator now takes a submission query, and creates a set of CSVs based on how many different versions it can pick out. If two submissions have different versions but would still have the same CSV headers, then they will be part of the same CSV. Co-authored-by: Stephen Daly <stephen.daly@digital.cabinet-office.gov.uk>
Shifts the checks for a form having a submission_email out of the submission batch service and into the batch job. This will mean that the job will terminate early when no submission_email is present, rather than continuing even though no email gets sent.
e91e7b2 to
29e494e
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/fMG08XG5
Add a job that will send an email containing CSV(s) of submissions for a given form on a given day for a given mode.
This job is not scheduled by anything yet.
Things to consider when reviewing