Skip to content

Commit e131efa

Browse files
committed
Add weekly submissions CSV column to form CSV report
1 parent 5d2beff commit e131efa

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

app/services/reports/forms_csv_report_service.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Reports::FormsCsvReportService
2828
"Submission type",
2929
"Submission formats",
3030
"Daily submissions CSV enabled",
31+
"Weekly submissions CSV enabled",
3132
].freeze
3233

3334
attr_reader :form_documents
@@ -77,6 +78,7 @@ def form_row(form)
7778
form["content"]["submission_type"],
7879
form["content"]["submission_format"]&.sort&.join(" "),
7980
form["content"]["send_daily_submission_batch"],
81+
form["content"]["send_weekly_submission_batch"],
8082
]
8183
end
8284
end

spec/services/reports/forms_csv_report_service_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
end
2424
let(:form) do
2525
create(:form, :live, :with_support, submission_type: "email", submission_format: %w[csv json],
26-
payment_url: "https://www.gov.uk/payments/organisation/service", send_daily_submission_batch: true, pages: [
26+
payment_url: "https://www.gov.uk/payments/organisation/service", send_daily_submission_batch: true,
27+
send_weekly_submission_batch: true, pages: [
2728
create(:page, :with_address_settings, is_repeatable: true),
2829
create(:page, :with_date_settings),
2930
create(:page, answer_type: "email"),
@@ -74,6 +75,7 @@
7475
"email",
7576
"csv json",
7677
"true",
78+
"true",
7779
)
7880
end
7981
end

0 commit comments

Comments
 (0)