Browse Source

CLDC-3207 Update prepare your file and guidance pages (#2215)

* Update prepare your file and guidance pages

* test

* Update more content
pull/2222/head
kosiakkatrina 11 months ago committed by GitHub
parent
commit
bdeca082f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      app/models/forms/bulk_upload_lettings/prepare_your_file.rb
  2. 5
      app/models/forms/bulk_upload_sales/prepare_your_file.rb
  3. 17
      app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb
  4. 11
      app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb
  5. 31
      app/views/bulk_upload_shared/guidance.html.erb
  6. 4
      spec/requests/bulk_upload_lettings_logs_controller_spec.rb
  7. 4
      spec/requests/bulk_upload_sales_logs_controller_spec.rb

4
app/models/forms/bulk_upload_lettings/prepare_your_file.rb

@ -41,6 +41,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 +50,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

5
app/models/forms/bulk_upload_sales/prepare_your_file.rb

@ -39,14 +39,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

17
app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb

@ -13,26 +13,17 @@
<h2 class="govuk-heading-s">Download template</h2>
<p class="govuk-body govuk-!-margin-bottom-2">Use one of these templates to upload logs for 2024/25:</p>
<ul class="govuk-list govuk-list--bullet">
<li>
<%= govuk_link_to "Download the new template", @form.template_path %>: In this template, the questions are in the same order as the 2024/25 paper form and web form.
</li>
<li>
<%= govuk_link_to "Download the legacy template", @form.legacy_template_path %>: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end.
</li>
</ul>
<p class="govuk-body govuk-!-margin-bottom-2">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.</p>
<p class="govuk-body govuk-!-margin-bottom-2"><%= govuk_link_to "Download the lettings bulk upload template (2024 to 2025)", @form.template_path %></p>
<p class="govuk-body govuk-!-margin-bottom-2">There are 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.</p>
<h2 class="govuk-heading-s">Create your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. Leave column A blank - the bulk upload fields start in column B.</li>
<li>Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.</li>
<li>Use the <%= govuk_link_to "Lettings #{@form.year_combo} Bulk Upload Specification", @form.specification_path %> to check your data is in the correct format.</li>
<li>Use the <%= govuk_link_to "Lettings bulk upload Specification (2024 to 2025)", @form.specification_path %> to check your data is in the correct format.</li>
<li><strong>Username field:</strong> To assign a log to someone else, enter the email address they use to log into CORE.</li>
<li>If you are using the new template, keep the headers. If you are using the legacy template, you can either keep or remove the headers. If you remove the headers, you should also remove the blank column A.</li>
<li>If you have reordered the headers, keep the headers in the file.</li>
</ul>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2023/24 data.") %>

11
app/views/bulk_upload_sales_logs/forms/prepare_your_file_2024.html.erb

@ -14,19 +14,16 @@
<h2 class="govuk-heading-s">Download template</h2>
<p class="govuk-body govuk-!-margin-bottom-2">Use one of these templates to upload logs for 2024/25:</p>
<ul class="govuk-list govuk-list--bullet">
<li><%= govuk_link_to "Download the new template", @form.template_path %>: In this template, the questions are in the same order as the 2024/25 paper form and web form.</li>
<li><%= govuk_link_to "Download the legacy template", @form.legacy_template_path %>: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end.</li>
</ul>
<p class="govuk-body govuk-!-margin-bottom-2">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.</p>
<p class="govuk-body govuk-!-margin-bottom-2"><%= govuk_link_to "Download the sales bulk upload template (2024 to 2025)", @form.template_path %>: In this template, the questions are in the same order as the 2024/25 paper form and web form.</p>
<p class="govuk-body govuk-!-margin-bottom-2">There are 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.</p>
<h2 class="govuk-heading-s">Create your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log. The bulk upload fields start at column B. Leave column A blank.</li>
<li>Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.</li>
<li>Use the <%= govuk_link_to "Sales #{@form.year_combo} Bulk Upload Specification", @form.specification_path %> to check your data is in the correct format.</li>
<li>Use the <%= govuk_link_to "Sales bulk upload Specification (2024 to 2025)", @form.specification_path %> to check your data is in the correct format.</li>
<li><strong>Username field:</strong> To assign a log to someone else, enter the email address they use to log into CORE.</li>
<li>If you are using the new template, keep the headers. If you are using the legacy template, you can either keep or remove the headers. If you remove the headers, you should also remove the blank column A.</li>
<li>If you have reordered the headers, keep the headers in the file.</li>
</ul>
<h2 class="govuk-heading-s">Save your file</h2>

31
app/views/bulk_upload_shared/guidance.html.erb

@ -28,7 +28,11 @@
<%= accordion.with_section(heading_text: "Using the bulk upload template") do %>
<p class="govuk-body">For each collection year, we publish a bulk upload template and specification.</p>
<p class="govuk-body">The bulk upload templates contain 7 or 8 rows of ‘headers’ with information about how to fill in the template, including:</p>
<% if @form.year == 2023 %>
<p class="govuk-body">The bulk upload templates contain 7 or 8 rows of ‘headers’ with information about how to fill in the template, including:</p>
<% else %>
<p class="govuk-body">The bulk upload templates contain 8 rows of ‘headers’ with information about how to fill in the template, including:</p>
<% end %>
<ul class="govuk-list govuk-list--bullet">
<li>the CORE form questions and their field numbers</li>
@ -39,23 +43,28 @@
<p class="govuk-body">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.</p>
<p class="govuk-body">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.</p>
<p class="govuk-body">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.</p>
<p class="govuk-body">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.</p>
<% if @form.year == 2023 %>
<p class="govuk-body">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.</p>
<p class="govuk-body">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.</p>
<p class="govuk-body"><strong>New template</strong>: 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.</p>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) – New question ordering", @form.lettings_template_path %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – New question ordering", @form.sales_template_path %></p>
<p class="govuk-body"><strong>New template</strong>: 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.</p>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) – New question ordering", @form.lettings_template_path %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – New question ordering", @form.sales_template_path %></p>
<p class="govuk-body"><strong>Legacy template</strong>: 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.</p>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) - Legacy version", @form.lettings_legacy_template_path %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – Legacy version", @form.sales_legacy_template_path %></p>
<p class="govuk-body"><strong>Legacy template</strong>: 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.</p>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) - Legacy version", @form.lettings_legacy_template_path %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – Legacy version", @form.sales_legacy_template_path %></p>
<% else %>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload template (2024 to 2025)", @form.lettings_template_path %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2024 to 2025)", @form.sales_template_path %></p>
<% end %>
<% end %>
<%= accordion.with_section(heading_text: "Using the bulk upload specification") do %>
<p class="govuk-body">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.</p>
<p class="govuk-body">There is a separate specification for lettings and sales:</p>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload specification (2023 to 2024)", @form.lettings_specification_path, target: "_blank" %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload specification (2023 to 2024)", @form.sales_specification_path, target: "_blank" %></p>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload specification (#{@form.year} to #{@form.year + 1})", @form.lettings_specification_path, target: "_blank" %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload specification (#{@form.year} to #{@form.year + 1})", @form.sales_specification_path, target: "_blank" %></p>
<p class="govuk-body">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.</p>
<% end %>

4
spec/requests/bulk_upload_lettings_logs_controller_spec.rb

@ -49,7 +49,7 @@ RSpec.describe BulkUploadLettingsLogsController, type: :request do
it "shows guidance page with correct title" do
Timecop.freeze(2022, 1, 1) do
get "/lettings-logs/bulk-upload-logs/guidance", params: {}
get "/lettings-logs/bulk-upload-logs/guidance?form%5Byear%5D=2022", params: {}
expect(response.body).to include("How to upload logs in bulk")
end
@ -59,7 +59,7 @@ RSpec.describe BulkUploadLettingsLogsController, type: :request do
context "when in crossover period" do
it "shows guidance page with correct title" do
Timecop.freeze(2023, 6, 1) do
get "/lettings-logs/bulk-upload-logs/guidance", params: {}
get "/lettings-logs/bulk-upload-logs/guidance?form%5Byear%5D=2023", params: {}
expect(response.body).to include("How to upload logs in bulk")
end

4
spec/requests/bulk_upload_sales_logs_controller_spec.rb

@ -49,7 +49,7 @@ RSpec.describe BulkUploadSalesLogsController, type: :request do
it "shows guidance page with correct title" do
Timecop.freeze(2022, 1, 1) do
get "/sales-logs/bulk-upload-logs/guidance", params: {}
get "/sales-logs/bulk-upload-logs/guidance?form%5Byear%5D=2022", params: {}
expect(response.body).to include("How to upload logs in bulk")
end
@ -59,7 +59,7 @@ RSpec.describe BulkUploadSalesLogsController, type: :request do
context "when in crossover period" do
it "shows guidance page with correct title" do
Timecop.freeze(2023, 6, 1) do
get "/sales-logs/bulk-upload-logs/guidance", params: {}
get "/sales-logs/bulk-upload-logs/guidance?form%5Byear%5D=2023", params: {}
expect(response.body).to include("How to upload logs in bulk")
end

Loading…
Cancel
Save