diff --git a/app/models/forms/bulk_upload_lettings/guidance.rb b/app/models/forms/bulk_upload_lettings/guidance.rb index 66683eb9b..2f1c8f530 100644 --- a/app/models/forms/bulk_upload_lettings/guidance.rb +++ b/app/models/forms/bulk_upload_lettings/guidance.rb @@ -38,6 +38,25 @@ module Forms def sales_specification_path Forms::BulkUploadSales::PrepareYourFile.new(year:).specification_path end + + def download_text(lettings_or_sales, file, new_or_legacy=nil) + "Download the #{lettings_or_sales} bulk upload #{file} (#{year_combo_full})#{new_or_legacy_text(new_or_legacy) if year == 2023 and new_or_legacy.present?}" + end + + def year_combo + "#{year}/#{year - 2000 + 1}" + end + + def year_combo_full + "#{year} to #{year + 1}" + end + + def new_or_legacy_text(new_or_legacy) + case new_or_legacy + when "new" then " – New question ordering" + when "legacy" then " – Legacy version" + end + end end end end diff --git a/app/models/forms/bulk_upload_lettings/prepare_your_file.rb b/app/models/forms/bulk_upload_lettings/prepare_your_file.rb index a2d59a370..43d2602db 100644 --- a/app/models/forms/bulk_upload_lettings/prepare_your_file.rb +++ b/app/models/forms/bulk_upload_lettings/prepare_your_file.rb @@ -34,6 +34,8 @@ module Forms case year when 2023 "/files/bulk-upload-lettings-legacy-template-2023-24.xlsx" + when 2024 + "/files/bulk-upload-lettings-legacy-template-2024-25.xlsx" end end @@ -41,6 +43,8 @@ module Forms case year when 2023 "/files/bulk-upload-lettings-template-2023-24.xlsx" + when 2024 + "/files/bulk-upload-lettings-template-2024-25.xlsx" end end @@ -48,6 +52,8 @@ module Forms case year when 2023 "/files/bulk-upload-lettings-specification-2023-24.xlsx" + when 2024 + "/files/bulk-upload-lettings-specification-2024-25.xlsx" end end diff --git a/app/models/forms/bulk_upload_sales/prepare_your_file.rb b/app/models/forms/bulk_upload_sales/prepare_your_file.rb index 227137d72..d4a163500 100644 --- a/app/models/forms/bulk_upload_sales/prepare_your_file.rb +++ b/app/models/forms/bulk_upload_sales/prepare_your_file.rb @@ -32,6 +32,8 @@ module Forms case year when 2023 "/files/bulk-upload-sales-legacy-template-2023-24.xlsx" + when 2024 + "/files/bulk-upload-sales-legacy-template-2024-25.xlsx" end end @@ -39,14 +41,17 @@ module Forms case year when 2023 "/files/bulk-upload-sales-template-2023-24.xlsx" + when 2024 + "/files/bulk-upload-sales-template-2024-25.xlsx" end end def specification_path case year - when 2023 "/files/bulk-upload-sales-specification-2023-24.xlsx" + when 2024 + "/files/bulk-upload-sales-specification-2024-25.xlsx" end end diff --git a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb index 618c2ab4c..5bdf31536 100644 --- a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb +++ b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb @@ -13,14 +13,10 @@
Use one of these templates to upload logs for 2024/25:
+Use this template to upload logs for 2024/25:
There are 7 or 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.
diff --git a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb b/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb index 0bbca2317..98ac42b88 100644 --- a/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb +++ b/app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb @@ -13,10 +13,9 @@Use one of these templates to upload logs for 2024/25:
+Use this template to upload logs for 2024/25:
There are 7 or 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.
diff --git a/app/views/bulk_upload_shared/guidance.html.erb b/app/views/bulk_upload_shared/guidance.html.erb index daca50456..1c63a3602 100644 --- a/app/views/bulk_upload_shared/guidance.html.erb +++ b/app/views/bulk_upload_shared/guidance.html.erb @@ -39,23 +39,27 @@You can paste your data below the headers or copy the headers and insert them above the data in your file. The bulk upload fields start at column B. Leave column A blank.
Make sure that each column of data aligns with the corresponding question in the headers. We recommend ordering your data to match the headers, but you can also reorder the headers to match your data. When processing the file, we check what each column of data represents based on the headers above.
+ + <% unless @form.year == 2023 %>For 2023/24 uploads, there are 2 templates to choose from, a new template and a legacy template. They outline suggested ways of ordering your data.
You must include the headers in your file when you upload, unless your data matches the exact order of the legacy template. If you choose to remove the headers, you must also remove the blank column A.
-New template: In this template, the questions are in the same order as the 2023/24 paper form and web form. Use this template if your organisation is new to bulk upload or if your housing management system matches the new column ordering.
-<%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) – New question ordering", @form.lettings_template_path %>
-<%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – New question ordering", @form.sales_template_path %>
- -Legacy template: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end. Use this template if you have not updated your system to match the new template yet.
-<%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) - Legacy version", @form.lettings_legacy_template_path %>
-<%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – Legacy version", @form.sales_legacy_template_path %>
+New template: In this template, the questions are in the same order as the <%= @form.year_combo %> paper form and web form. Use this template if your organisation is new to bulk upload or if your housing management system matches the new column ordering.
+ <% end %> +<%= govuk_link_to @form.download_text("lettings", "template", "new"), @form.lettings_template_path %>
+<%= govuk_link_to @form.download_text("sales", "template", "new"), @form.sales_template_path %>
+ <% if @form.year == 2023 %> +Legacy template: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end. Use this template if you have not updated your system to match the new template yet.
+<%= govuk_link_to @form.download_text("lettings", "template", "legacy"), @form.lettings_legacy_template_path %>
+<%= govuk_link_to @form.download_text("sales", "template", "legacy"), @form.sales_legacy_template_path %>
+ <% end %> <% end %> <%= accordion.with_section(heading_text: "Using the bulk upload specification") do %>The bulk upload specification contains the same information as the template headers, as well as more details about the accepted responses for each question. For multiple-choice questions, we use number or letter codes to represent each option, and the specification shows what answer each code represents.
There is a separate specification for lettings and sales:
-<%= govuk_link_to "Download the lettings bulk upload specification (2023 to 2024)", @form.lettings_specification_path, target: "_blank" %>
-<%= govuk_link_to "Download the sales bulk upload specification (2023 to 2024)", @form.sales_specification_path, target: "_blank" %>
+<%= govuk_link_to @form.download_text("lettings", "specification"), @form.lettings_specification_path, target: "_blank" %>
+<%= govuk_link_to @form.download_text("sales", "specification"), @form.sales_specification_path, target: "_blank" %>
If your upload fails because there are errors in the data, you can use the specification to help correct the errors. Having your file, the error report, and the specification open at the same time will make it easy to cross-reference field numbers and check accepted responses.
<% end %>