diff --git a/app/components/create_log_actions_component.html.erb b/app/components/create_log_actions_component.html.erb index 2c3b75aea..26e7af6de 100644 --- a/app/components/create_log_actions_component.html.erb +++ b/app/components/create_log_actions_component.html.erb @@ -9,10 +9,38 @@ <% end %> <% if FeatureToggle.create_test_logs_enabled? %> - <%= govuk_link_to "New test log", create_test_log_href %> - <%= govuk_link_to "New test log (setup only)", create_setup_test_log_href %> - <%= govuk_link_to "24 BU test file", create_test_bulk_upload_href(2024) %> - <%= govuk_link_to "25 BU test file", create_test_bulk_upload_href(2025) %> +
+ Testing tools + These tools can only be seen and used in testing environments. +
+ <%= govuk_button_link_to create_test_log_href, class: "govuk-button" do %> + New test log + + <% end %> + <%= govuk_button_link_to create_setup_test_log_href, class: "govuk-button" do %> + New test log (setup only) + + <% end %> + <%= govuk_button_link_to create_test_bulk_upload_href(2024), class: "govuk-button govuk-button--secondary" do %> + 24/25 BU test file + + + + + <% end %> + <%= govuk_button_link_to create_test_bulk_upload_href(2025), class: "govuk-button govuk-button--secondary" do %> + 25/26 BU test file + + + + + <% end %> +
+
<% end %> <% end %> diff --git a/app/frontend/styles/_testing-tools.scss b/app/frontend/styles/_testing-tools.scss new file mode 100644 index 000000000..325d2fbf8 --- /dev/null +++ b/app/frontend/styles/_testing-tools.scss @@ -0,0 +1,20 @@ +.app-testing-tools__inset { + border-left-color: #f47738; + margin-bottom: 0; + margin-top: 0; + padding-top: 5px; + padding-bottom: 5px; +} + +.app-testing-tools__link { + @include govuk-link-common; + @include govuk-link-style-no-visited-state; +} + +.app-testing-tools__tag { + @include govuk-font(14); + background-color: #fcd6c3; + margin-top: 0; + margin-bottom: 10px; + margin-right: 15px; +} diff --git a/app/frontend/styles/application.scss b/app/frontend/styles/application.scss index 370592640..33574bf9b 100644 --- a/app/frontend/styles/application.scss +++ b/app/frontend/styles/application.scss @@ -49,6 +49,7 @@ $govuk-breakpoints: ( @import "sub-navigation"; @import "unread-notification"; @import "red-link"; +@import "testing-tools"; @import "custom-rails-admin"; @import "node_modules/@ministryofjustice/frontend/moj/components/date-picker/date-picker"; diff --git a/app/helpers/filters_helper.rb b/app/helpers/filters_helper.rb index b983609b8..043874b21 100644 --- a/app/helpers/filters_helper.rb +++ b/app/helpers/filters_helper.rb @@ -167,7 +167,7 @@ module FiltersHelper def reset_filters_link(filter_type, filter_path_params = {}) if applied_filters_count(filter_type).positive? - govuk_link_to "Clear", clear_filters_path(filter_type:, filter_path_params:) + govuk_link_to "Clear", clear_filters_path(filter_type:, filter_path_params:), aria: { label: "Clear filters" } end end diff --git a/app/models/derived_variables/lettings_log_variables.rb b/app/models/derived_variables/lettings_log_variables.rb index 179d08010..195b187de 100644 --- a/app/models/derived_variables/lettings_log_variables.rb +++ b/app/models/derived_variables/lettings_log_variables.rb @@ -67,7 +67,7 @@ module DerivedVariables::LettingsLogVariables end self.has_benefits = get_has_benefits self.tshortfall_known = 0 if tshortfall - self.nocharge = household_charge&.zero? ? 1 : 0 + self.nocharge = household_charge # Nocharge: 0 = No, 1 = Yes, Household charge: 0 = Yes, 1 = No if form.start_year_2024_or_later? && is_bedsit? self.beds = 1 end diff --git a/app/models/form/lettings/questions/nationality_all.rb b/app/models/form/lettings/questions/nationality_all.rb index 8a0e3d1d9..a4bb750a1 100644 --- a/app/models/form/lettings/questions/nationality_all.rb +++ b/app/models/form/lettings/questions/nationality_all.rb @@ -13,6 +13,10 @@ class Form::Lettings::Questions::NationalityAll < ::Form::Question answer_options[log.nationality_all.to_s]["name"] end + def displayed_answer_options(_log, _current_user = nil) + @answer_options.reject { |key, _| key == "826" } + end + QUESTION_NUMBER_FROM_YEAR = { 2023 => 36, 2024 => 35 }.freeze def label_from_value(value) diff --git a/app/models/form/lettings/questions/person_working_situation.rb b/app/models/form/lettings/questions/person_working_situation.rb index cc4644f48..74e11d030 100644 --- a/app/models/form/lettings/questions/person_working_situation.rb +++ b/app/models/form/lettings/questions/person_working_situation.rb @@ -10,25 +10,47 @@ class Form::Lettings::Questions::PersonWorkingSituation < ::Form::Question end def answer_options - { "1" => { "value" => "Full-time – 30 hours or more" }, - "2" => { "value" => "Part-time – Less than 30 hours" }, - "7" => { "value" => "Full-time student" }, - "3" => { "value" => "In government training into work" }, - "4" => { "value" => "Jobseeker" }, - "6" => { "value" => "Not seeking work" }, - "8" => { "value" => "Unable to work because of long term sick or disability" }, - "5" => { "value" => "Retired" }, - "9" => { - "value" => "Child under 16", - "depends_on" => [ - { "age#{@person_index}_known" => 1 }, - { "age#{@person_index}_known" => nil }, - { "age#{@person_index}" => { "operator" => "<", "operand" => 16 } }, - ], - }, - "0" => { "value" => "Other" }, - "divider" => { "value" => true }, - "10" => { "value" => "Person prefers not to say" } } + if form.start_year_2025_or_later? + { "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, + "7" => { "value" => "Full-time student" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, + "5" => { "value" => "Retired" }, + "9" => { + "value" => "Child under 16", + "depends_on" => [ + { "age#{@person_index}_known" => 1 }, + { "age#{@person_index}_known" => nil }, + { "age#{@person_index}" => { "operator" => "<", "operand" => 16 } }, + ], + }, + "0" => { "value" => "Other" }, + "divider" => { "value" => true }, + "10" => { "value" => "Person prefers not to say" } } + else + { "1" => { "value" => "Full-time – 30 hours or more" }, + "2" => { "value" => "Part-time – Less than 30 hours" }, + "7" => { "value" => "Full-time student" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long term sick or disability" }, + "5" => { "value" => "Retired" }, + "9" => { + "value" => "Child under 16", + "depends_on" => [ + { "age#{@person_index}_known" => 1 }, + { "age#{@person_index}_known" => nil }, + { "age#{@person_index}" => { "operator" => "<", "operand" => 16 } }, + ], + }, + "0" => { "value" => "Other" }, + "divider" => { "value" => true }, + "10" => { "value" => "Person prefers not to say" } } + end end def question_number diff --git a/app/models/form/lettings/questions/previous_tenure.rb b/app/models/form/lettings/questions/previous_tenure.rb index c35d08d13..bf21f5b6d 100644 --- a/app/models/form/lettings/questions/previous_tenure.rb +++ b/app/models/form/lettings/questions/previous_tenure.rb @@ -49,8 +49,8 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question "3" => { "value" => "Private sector tenancy" }, "27" => { "value" => "Owner occupation (low-cost home ownership)" }, "26" => { "value" => "Owner occupation (private)" }, - "28" => { "value" => "Living with friends and family (long-term)" }, - "39" => { "value" => "Sofa surfing (moving regularly between family and friends, no permanent bed)" }, + "28" => { "value" => "Living with friends or family (long-term)" }, + "39" => { "value" => "Sofa surfing (moving regularly between family or friends, no permanent bed)" }, "14" => { "value" => "Bed and breakfast" }, "7" => { "value" => "Direct access hostel" }, "10" => { "value" => "Hospital" }, diff --git a/app/models/form/lettings/questions/working_situation1.rb b/app/models/form/lettings/questions/working_situation1.rb index dbaf4fc7a..6098eb136 100644 --- a/app/models/form/lettings/questions/working_situation1.rb +++ b/app/models/form/lettings/questions/working_situation1.rb @@ -4,23 +4,41 @@ class Form::Lettings::Questions::WorkingSituation1 < ::Form::Question @id = "ecstat1" @type = "radio" @check_answers_card_number = 1 - @answer_options = ANSWER_OPTIONS + @answer_options = answer_options @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] end - ANSWER_OPTIONS = { - "1" => { "value" => "Full-time – 30 hours or more" }, - "2" => { "value" => "Part-time – Less than 30 hours" }, - "7" => { "value" => "Full-time student" }, - "3" => { "value" => "In government training into work" }, - "4" => { "value" => "Jobseeker" }, - "6" => { "value" => "Not seeking work" }, - "8" => { "value" => "Unable to work because of long term sick or disability" }, - "5" => { "value" => "Retired" }, - "0" => { "value" => "Other" }, - "divider" => { "value" => true }, - "10" => { "value" => "Tenant prefers not to say" }, - }.freeze + def answer_options + if form.start_year_2025_or_later? + { + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, + "7" => { "value" => "Full-time student" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, + "5" => { "value" => "Retired" }, + "0" => { "value" => "Other" }, + "divider" => { "value" => true }, + "10" => { "value" => "Tenant prefers not to say" }, + } + else + { + "1" => { "value" => "Full-time – 30 hours or more" }, + "2" => { "value" => "Part-time – Less than 30 hours" }, + "7" => { "value" => "Full-time student" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long term sick or disability" }, + "5" => { "value" => "Retired" }, + "0" => { "value" => "Other" }, + "divider" => { "value" => true }, + "10" => { "value" => "Tenant prefers not to say" }, + } + end + end QUESTION_NUMBER_FROM_YEAR = { 2023 => 37, 2024 => 36 }.freeze end diff --git a/app/models/form/sales/pages/deposit.rb b/app/models/form/sales/pages/deposit.rb index b204227b2..4fc5e1b83 100644 --- a/app/models/form/sales/pages/deposit.rb +++ b/app/models/form/sales/pages/deposit.rb @@ -3,6 +3,7 @@ class Form::Sales::Pages::Deposit < ::Form::Page super(id, hsh, subsection) @ownershipsch = ownershipsch @optional = optional + @copy_key = copy_key end def questions @@ -18,4 +19,10 @@ class Form::Sales::Pages::Deposit < ::Form::Page log.ownershipsch == 1 end + + def copy_key + return "sales.sale_information.deposit.shared_ownership" if @ownershipsch == 1 + return "sales.sale_information.deposit.discounted_ownership" if @ownershipsch == 2 + return "sales.sale_information.deposit.outright_sale" if @ownershipsch == 3 + end end diff --git a/app/models/form/sales/questions/buyer1_working_situation.rb b/app/models/form/sales/questions/buyer1_working_situation.rb index 30ca41ac4..ea0e9e54f 100644 --- a/app/models/form/sales/questions/buyer1_working_situation.rb +++ b/app/models/form/sales/questions/buyer1_working_situation.rb @@ -17,14 +17,14 @@ class Form::Sales::Questions::Buyer1WorkingSituation < ::Form::Question def answer_options if form.start_year_2025_or_later? { - "1" => { "value" => "Full-time - 30 hours or more" }, - "2" => { "value" => "Part-time - Less than 30 hours" }, + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, "3" => { "value" => "In government training into work" }, "4" => { "value" => "Jobseeker" }, "5" => { "value" => "Retired" }, "6" => { "value" => "Not seeking work" }, "7" => { "value" => "Full-time student" }, - "8" => { "value" => "Unable to work due to long term sick or disability" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, "0" => { "value" => "Other" }, "10" => { "value" => "Buyer prefers not to say" }, }.freeze diff --git a/app/models/form/sales/questions/buyer2_working_situation.rb b/app/models/form/sales/questions/buyer2_working_situation.rb index 0e69d09d3..32a7c93f4 100644 --- a/app/models/form/sales/questions/buyer2_working_situation.rb +++ b/app/models/form/sales/questions/buyer2_working_situation.rb @@ -22,14 +22,14 @@ class Form::Sales::Questions::Buyer2WorkingSituation < ::Form::Question def answer_options if form.start_year_2025_or_later? { - "1" => { "value" => "Full-time - 30 hours or more" }, - "2" => { "value" => "Part-time - Less than 30 hours" }, + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, "3" => { "value" => "In government training into work" }, "4" => { "value" => "Jobseeker" }, "5" => { "value" => "Retired" }, "6" => { "value" => "Not seeking work" }, "7" => { "value" => "Full-time student" }, - "8" => { "value" => "Unable to work due to long term sick or disability" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, "9" => { "value" => "Child under 16" }, "0" => { "value" => "Other" }, "10" => { "value" => "Buyer prefers not to say" }, diff --git a/app/models/form/sales/questions/deposit_amount.rb b/app/models/form/sales/questions/deposit_amount.rb index aec119496..55d1244f4 100644 --- a/app/models/form/sales/questions/deposit_amount.rb +++ b/app/models/form/sales/questions/deposit_amount.rb @@ -12,6 +12,7 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question @question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch] @optional = optional @top_guidance_partial = top_guidance_partial + @copy_key = copy_key end def derived?(log) @@ -29,4 +30,10 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question return "financial_calculations_discounted_ownership" if @ownershipsch == 2 return "financial_calculations_outright_sale" if @ownershipsch == 3 end + + def copy_key + return "sales.sale_information.deposit.shared_ownership" if @ownershipsch == 1 + return "sales.sale_information.deposit.discounted_ownership" if @ownershipsch == 2 + return "sales.sale_information.deposit.outright_sale" if @ownershipsch == 3 + end end diff --git a/app/models/form/sales/questions/nationality_all.rb b/app/models/form/sales/questions/nationality_all.rb index 6338bb529..5610e0264 100644 --- a/app/models/form/sales/questions/nationality_all.rb +++ b/app/models/form/sales/questions/nationality_all.rb @@ -12,6 +12,10 @@ class Form::Sales::Questions::NationalityAll < ::Form::Question answer_options[log.send(id).to_s]["name"] end + def displayed_answer_options(_log, _current_user = nil) + @answer_options.reject { |key, _| key == "826" } + end + QUESTION_NUMBER_FROM_YEAR_AND_BUYER_INDEX = { 2023 => { 1 => 24, 2 => 32 }, 2024 => { 1 => 26, 2 => 34 }, diff --git a/app/models/form/sales/questions/person_working_situation.rb b/app/models/form/sales/questions/person_working_situation.rb index ab31561fa..39c18a22a 100644 --- a/app/models/form/sales/questions/person_working_situation.rb +++ b/app/models/form/sales/questions/person_working_situation.rb @@ -18,14 +18,14 @@ class Form::Sales::Questions::PersonWorkingSituation < ::Form::Question def answer_options if form.start_year_2025_or_later? { - "1" => { "value" => "Full-time - 30 hours or more" }, - "2" => { "value" => "Part-time - Less than 30 hours" }, + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, "3" => { "value" => "In government training into work" }, "4" => { "value" => "Jobseeker" }, "5" => { "value" => "Retired" }, "6" => { "value" => "Not seeking work" }, "7" => { "value" => "Full-time student" }, - "8" => { "value" => "Unable to work due to long term sick or disability" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, "9" => { "value" => "Child under 16", "depends_on" => [ diff --git a/app/models/lettings_log.rb b/app/models/lettings_log.rb index 2d29fb6db..823582132 100644 --- a/app/models/lettings_log.rb +++ b/app/models/lettings_log.rb @@ -381,6 +381,10 @@ class LettingsLog < Log referral == 1 end + def is_from_prp_only_housing_register_or_waiting_list? + referral_type == 3 + end + def is_relet_to_temp_tenant? # 9: Re-let to tenant who occupied same property as temporary accommodation rsnvac == 9 diff --git a/app/models/validations/household_validations.rb b/app/models/validations/household_validations.rb index 723ab30b6..ce913531b 100644 --- a/app/models/validations/household_validations.rb +++ b/app/models/validations/household_validations.rb @@ -30,10 +30,15 @@ module Validations::HouseholdValidations end validate_other_field(record, 20, :reason, :reasonother) - if record.is_reason_permanently_decanted? && record.referral.present? && !record.is_internal_transfer? - record.errors.add :referral, I18n.t("validations.lettings.household.referral.leaving_last_settled_home.reason_permanently_decanted") - record.errors.add :referral_type, I18n.t("validations.lettings.household.referral.leaving_last_settled_home.reason_permanently_decanted") - record.errors.add :reason, I18n.t("validations.lettings.household.reason.leaving_last_settled_home.not_internal_transfer") + if record.is_reason_permanently_decanted? + if record.referral_type.present? && !record.is_from_prp_only_housing_register_or_waiting_list? + record.errors.add :referral_type, I18n.t("validations.lettings.household.referral_type.leaving_last_settled_home.reason_permanently_decanted") + end + + if record.referral.present? && !record.is_internal_transfer? + record.errors.add :referral, I18n.t("validations.lettings.household.referral.leaving_last_settled_home.reason_permanently_decanted") + record.errors.add :reason, I18n.t("validations.lettings.household.reason.leaving_last_settled_home.not_internal_transfer") + end end return unless record.form.start_year_2024_or_later? @@ -172,7 +177,6 @@ module Validations::HouseholdValidations label = record.form.get_question("prevten", record).present? ? record.form.get_question("prevten", record).label_from_value(record.prevten) : "" record.errors.add :prevten, :internal_transfer_non_social_housing, message: I18n.t("validations.lettings.household.prevten.internal_transfer", prevten: label) record.errors.add :referral, :internal_transfer_non_social_housing, message: I18n.t("validations.lettings.household.referral.prevten_invalid", prevten: label) - record.errors.add :referral_type, :internal_transfer_non_social_housing, message: I18n.t("validations.lettings.household.referral.prevten_invalid", prevten: label) end end @@ -182,7 +186,6 @@ module Validations::HouseholdValidations if record.is_internal_transfer? && record.owning_organisation.provider_type == "PRP" && record.is_prevten_la_general_needs? record.errors.add :prevten, :internal_transfer_fixed_or_lifetime, message: I18n.t("validations.lettings.household.prevten.la_general_needs.internal_transfer") record.errors.add :referral, :internal_transfer_fixed_or_lifetime, message: I18n.t("validations.lettings.household.referral.la_general_needs.internal_transfer") - record.errors.add :referral_type, :internal_transfer_fixed_or_lifetime, message: I18n.t("validations.lettings.household.referral.la_general_needs.internal_transfer") end end diff --git a/app/services/bulk_upload/lettings/year2023/row_parser.rb b/app/services/bulk_upload/lettings/year2023/row_parser.rb index 3424e0608..70aa4951e 100644 --- a/app/services/bulk_upload/lettings/year2023/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2023/row_parser.rb @@ -27,9 +27,9 @@ class BulkUpload::Lettings::Year2023::RowParser field_20: "Address line 2", field_21: "Town or city", field_22: "County", - field_23: "Part 1 of the property's postcode", - field_24: "Part 2 of the property's postcode", - field_25: "What is the property's local authority?", + field_23: "Part 1 of the property’s postcode", + field_24: "Part 2 of the property’s postcode", + field_25: "What is the property’s local authority?", field_26: "What type was the property most recently let as?", field_27: "What is the reason for the property being vacant?", field_28: "How many times was the property offered between becoming vacant and this letting?", @@ -50,39 +50,39 @@ class BulkUpload::Lettings::Year2023::RowParser field_43: "What is the length of the fixed-term tenancy to the nearest year?", field_44: "Is this letting sheltered accommodation?", field_45: "Has tenant seen the MHCLG privacy notice?", - field_46: "What is the lead tenant's age?", - field_47: "Which of these best describes the lead tenant's gender identity?", - field_48: "Which of these best describes the lead tenant's ethnic background?", - field_49: "What is the lead tenant's nationality?", - field_50: "Which of these best describes the lead tenant's working situation?", - field_51: "What is person 2's relationship to the lead tenant?", - field_52: "What is person 2's age?", - field_53: "Which of these best describes person 2's gender identity?", - field_54: "Which of these best describes person 2's working situation?", - field_55: "What is person 3's relationship to the lead tenant?", - field_56: "What is person 3's age?", - field_57: "Which of these best describes person 3's gender identity?", - field_58: "Which of these best describes person 3's working situation?", - field_59: "What is person 4's relationship to the lead tenant?", - field_60: "What is person 4's age?", - field_61: "Which of these best describes person 4's gender identity?", - field_62: "Which of these best describes person 4's working situation?", - field_63: "What is person 5's relationship to the lead tenant?", - field_64: "What is person 5's age?", - field_65: "Which of these best describes person 5's gender identity?", - field_66: "Which of these best describes person 5's working situation?", - field_67: "What is person 6's relationship to the lead tenant?", - field_68: "What is person 6's age?", - field_69: "Which of these best describes person 6's gender identity?", - field_70: "Which of these best describes person 6's working situation?", - field_71: "What is person 7's relationship to the lead tenant?", - field_72: "What is person 7's age?", - field_73: "Which of these best describes person 7's gender identity?", - field_74: "Which of these best describes person 7's working situation?", - field_75: "What is person 8's relationship to the lead tenant?", - field_76: "What is person 8's age?", - field_77: "Which of these best describes person 8's gender identity?", - field_78: "Which of these best describes person 8's working situation?", + field_46: "What is the lead tenant’s age?", + field_47: "Which of these best describes the lead tenant’s gender identity?", + field_48: "Which of these best describes the lead tenant’s ethnic background?", + field_49: "What is the lead tenant’s nationality?", + field_50: "Which of these best describes the lead tenant’s working situation?", + field_51: "What is person 2’s relationship to the lead tenant?", + field_52: "What is person 2’s age?", + field_53: "Which of these best describes person 2’s gender identity?", + field_54: "Which of these best describes person 2’s working situation?", + field_55: "What is person 3’s relationship to the lead tenant?", + field_56: "What is person 3’s age?", + field_57: "Which of these best describes person 3’s gender identity?", + field_58: "Which of these best describes person 3’s working situation?", + field_59: "What is person 4’s relationship to the lead tenant?", + field_60: "What is person 4’s age?", + field_61: "Which of these best describes person 4’s gender identity?", + field_62: "Which of these best describes person 4’s working situation?", + field_63: "What is person 5’s relationship to the lead tenant?", + field_64: "What is person 5’s age?", + field_65: "Which of these best describes person 5’s gender identity?", + field_66: "Which of these best describes person 5’s working situation?", + field_67: "What is person 6’s relationship to the lead tenant?", + field_68: "What is person 6’s age?", + field_69: "Which of these best describes person 6’s gender identity?", + field_70: "Which of these best describes person 6’s working situation?", + field_71: "What is person 7’s relationship to the lead tenant?", + field_72: "What is person 7’s age?", + field_73: "Which of these best describes person 7’s gender identity?", + field_74: "Which of these best describes person 7’s working situation?", + field_75: "What is person 8’s relationship to the lead tenant?", + field_76: "What is person 8’s age?", + field_77: "Which of these best describes person 8’s gender identity?", + field_78: "Which of these best describes person 8’s working situation?", field_79: "Does anybody in the household have links to the UK armed forces?", field_80: "Is this person still serving in the UK armed forces?", field_81: "Was this person seriously injured or ill as a result of serving in the UK armed forces?", @@ -94,41 +94,41 @@ class BulkUpload::Lettings::Year2023::RowParser field_87: "Does anybody in the household have any disabled access needs?", field_88: "Does anybody in the household have any disabled access needs?", field_89: "Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?", - field_90: "Does this person's condition affect their dexterity?", - field_91: "Does this person's condition affect their learning or understanding or concentrating?", - field_92: "Does this person's condition affect their hearing?", - field_93: "Does this person's condition affect their memory?", - field_94: "Does this person's condition affect their mental health?", - field_95: "Does this person's condition affect their mobility?", - field_96: "Does this person's condition affect them socially or behaviourally?", - field_97: "Does this person's condition affect their stamina or breathing or fatigue?", - field_98: "Does this person's condition affect their vision?", - field_99: "Does this person's condition affect them in another way?", + field_90: "Does this person’s condition affect their dexterity?", + field_91: "Does this person’s condition affect their learning or understanding or concentrating?", + field_92: "Does this person’s condition affect their hearing?", + field_93: "Does this person’s condition affect their memory?", + field_94: "Does this person’s condition affect their mental health?", + field_95: "Does this person’s condition affect their mobility?", + field_96: "Does this person’s condition affect them socially or behaviourally?", + field_97: "Does this person’s condition affect their stamina or breathing or fatigue?", + field_98: "Does this person’s condition affect their vision?", + field_99: "Does this person’s condition affect them in another way?", field_100: "How long has the household continuously lived in the local authority area of the new letting?", field_101: "How long has the household been on the local authority waiting list for the new letting?", field_102: "What is the tenant’s main reason for the household leaving their last settled home?", field_103: "If 'Other', what was the main reason for leaving their last settled home?", field_104: "Where was the household immediately before this letting?", field_105: "Did the household experience homelessness immediately before this letting?", - field_106: "Do you know the postcode of the household's last settled home?", - field_107: "What is the postcode of the household's last settled home?", - field_108: "What is the postcode of the household's last settled home?", - field_109: "What is the local authority of the household's last settled home?", + field_106: "Do you know the postcode of the household’s last settled home?", + field_107: "What is the postcode of the household’s last settled home?", + field_108: "What is the postcode of the household’s last settled home?", + field_109: "What is the local authority of the household’s last settled home?", field_110: "Was the household given 'reasonable preference' by the local authority?", - field_111: "Reasonable preference reason They were homeless or about to lose their home (within 56 days)", - field_112: "Reasonable preference reason They were living in insanitary, overcrowded or unsatisfactory housing", - field_113: "Reasonable preference reason They needed to move on medical and welfare reasons (including disability)", - field_114: "Reasonable preference reason They needed to move to avoid hardship to themselves or others", - field_115: "Reasonable preference reason Don't know", + field_111: "Reasonable preference reason - They were homeless or about to lose their home (within 56 days)", + field_112: "Reasonable preference reason - They were living in insanitary, overcrowded or unsatisfactory housing", + field_113: "Reasonable preference reason - They needed to move on medical and welfare reasons (including disability)", + field_114: "Reasonable preference reason - They needed to move to avoid hardship to themselves or others", + field_115: "Reasonable preference reason - Don’t know", field_116: "Was the letting made under the Choice-Based Lettings (CBL)?", field_117: "Was the letting made under the Common Allocation Policy (CAP)?", field_118: "Was the letting made under the Common Housing Register (CHR)?", field_119: "What was the source of referral for this letting?", - field_120: "Do you know the household's combined total income after tax?", + field_120: "Do you know the household’s combined total income after tax?", field_121: "How often does the household receive income?", field_122: "How much income does the household have in total?", field_123: "Is the tenant likely to be receiving any of these housing-related benefits?", - field_124: "How much of the household's income is from Universal Credit, state pensions or benefits?", + field_124: "How much of the household’s income is from Universal Credit, state pensions or benefits?", field_125: "Does the household pay rent or other charges for the accommodation?", field_126: "How often does the household pay rent and other charges?", field_127: "If this is a care home, how much does the household pay every [time period]?", diff --git a/app/services/bulk_upload/lettings/year2024/row_parser.rb b/app/services/bulk_upload/lettings/year2024/row_parser.rb index 5016ebc8b..101352f0a 100644 --- a/app/services/bulk_upload/lettings/year2024/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2024/row_parser.rb @@ -24,9 +24,9 @@ class BulkUpload::Lettings::Year2024::RowParser field_18: "Address line 2", field_19: "Town or city", field_20: "County", - field_21: "Part 1 of the property's postcode", - field_22: "Part 2 of the property's postcode", - field_23: "What is the property's local authority?", + field_21: "Part 1 of the property’s postcode", + field_22: "Part 2 of the property’s postcode", + field_23: "What is the property’s local authority?", field_25: "What type was the property most recently let as?", field_24: "What is the reason for the property being vacant?", field_26: "What type of unit is the property?", @@ -46,39 +46,39 @@ class BulkUpload::Lettings::Year2024::RowParser field_40: "What is the length of the fixed-term tenancy to the nearest year?", field_41: "Is this letting sheltered accommodation?", field_15: "Has tenant seen the MHCLG privacy notice?", - field_42: "What is the lead tenant's age?", - field_43: "Which of these best describes the lead tenant's gender identity?", - field_44: "Which of these best describes the lead tenant's ethnic background?", - field_45: "What is the lead tenant's nationality?", - field_46: "Which of these best describes the lead tenant's working situation?", - field_47: "What is person 2's relationship to the lead tenant?", - field_48: "What is person 2's age?", - field_49: "Which of these best describes person 2's gender identity?", - field_50: "Which of these best describes person 2's working situation?", - field_51: "What is person 3's relationship to the lead tenant?", - field_52: "What is person 3's age?", - field_53: "Which of these best describes person 3's gender identity?", - field_54: "Which of these best describes person 3's working situation?", - field_55: "What is person 4's relationship to the lead tenant?", - field_56: "What is person 4's age?", - field_57: "Which of these best describes person 4's gender identity?", - field_58: "Which of these best describes person 4's working situation?", - field_59: "What is person 5's relationship to the lead tenant?", - field_60: "What is person 5's age?", - field_61: "Which of these best describes person 5's gender identity?", - field_62: "Which of these best describes person 5's working situation?", - field_63: "What is person 6's relationship to the lead tenant?", - field_64: "What is person 6's age?", - field_65: "Which of these best describes person 6's gender identity?", - field_66: "Which of these best describes person 6's working situation?", - field_67: "What is person 7's relationship to the lead tenant?", - field_68: "What is person 7's age?", - field_69: "Which of these best describes person 7's gender identity?", - field_70: "Which of these best describes person 7's working situation?", - field_71: "What is person 8's relationship to the lead tenant?", - field_72: "What is person 8's age?", - field_73: "Which of these best describes person 8's gender identity?", - field_74: "Which of these best describes person 8's working situation?", + field_42: "What is the lead tenant’s age?", + field_43: "Which of these best describes the lead tenant’s gender identity?", + field_44: "Which of these best describes the lead tenant’s ethnic background?", + field_45: "What is the lead tenant’s nationality?", + field_46: "Which of these best describes the lead tenant’s working situation?", + field_47: "What is person 2’s relationship to the lead tenant?", + field_48: "What is person 2’s age?", + field_49: "Which of these best describes person 2’s gender identity?", + field_50: "Which of these best describes person 2’s working situation?", + field_51: "What is person 3’s relationship to the lead tenant?", + field_52: "What is person 3’s age?", + field_53: "Which of these best describes person 3’s gender identity?", + field_54: "Which of these best describes person 3’s working situation?", + field_55: "What is person 4’s relationship to the lead tenant?", + field_56: "What is person 4’s age?", + field_57: "Which of these best describes person 4’s gender identity?", + field_58: "Which of these best describes person 4’s working situation?", + field_59: "What is person 5’s relationship to the lead tenant?", + field_60: "What is person 5’s age?", + field_61: "Which of these best describes person 5’s gender identity?", + field_62: "Which of these best describes person 5’s working situation?", + field_63: "What is person 6’s relationship to the lead tenant?", + field_64: "What is person 6’s age?", + field_65: "Which of these best describes person 6’s gender identity?", + field_66: "Which of these best describes person 6’s working situation?", + field_67: "What is person 7’s relationship to the lead tenant?", + field_68: "What is person 7’s age?", + field_69: "Which of these best describes person 7’s gender identity?", + field_70: "Which of these best describes person 7’s working situation?", + field_71: "What is person 8’s relationship to the lead tenant?", + field_72: "What is person 8’s age?", + field_73: "Which of these best describes person 8’s gender identity?", + field_74: "Which of these best describes person 8’s working situation?", field_75: "Does anybody in the household have links to the UK armed forces?", field_76: "Is this person still serving in the UK armed forces?", field_77: "Was this person seriously injured or ill as a result of serving in the UK armed forces?", @@ -90,42 +90,42 @@ class BulkUpload::Lettings::Year2024::RowParser field_83: "Does anybody in the household have any disabled access needs?", field_84: "Does anybody in the household have any disabled access needs?", field_85: "Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?", - field_86: "Does this person's condition affect their dexterity?", - field_87: "Does this person's condition affect their learning or understanding or concentrating?", - field_88: "Does this person's condition affect their hearing?", - field_89: "Does this person's condition affect their memory?", - field_90: "Does this person's condition affect their mental health?", - field_91: "Does this person's condition affect their mobility?", - field_92: "Does this person's condition affect them socially or behaviourally?", - field_93: "Does this person's condition affect their stamina or breathing or fatigue?", - field_94: "Does this person's condition affect their vision?", - field_95: "Does this person's condition affect them in another way?", + field_86: "Does this person’s condition affect their dexterity?", + field_87: "Does this person’s condition affect their learning or understanding or concentrating?", + field_88: "Does this person’s condition affect their hearing?", + field_89: "Does this person’s condition affect their memory?", + field_90: "Does this person’s condition affect their mental health?", + field_91: "Does this person’s condition affect their mobility?", + field_92: "Does this person’s condition affect them socially or behaviourally?", + field_93: "Does this person’s condition affect their stamina or breathing or fatigue?", + field_94: "Does this person’s condition affect their vision?", + field_95: "Does this person’s condition affect them in another way?", field_96: "How long has the household continuously lived in the local authority area of the new letting?", field_97: "How long has the household been on the local authority waiting list for the new letting?", field_98: "What is the tenant’s main reason for the household leaving their last settled home?", field_99: "If 'Other', what was the main reason for leaving their last settled home?", field_100: "Where was the household immediately before this letting?", field_101: "Did the household experience homelessness immediately before this letting?", - field_102: "Do you know the postcode of the household's last settled home?", - field_103: "What is the postcode of the household's last settled home?", - field_104: "What is the postcode of the household's last settled home?", - field_105: "What is the local authority of the household's last settled home?", + field_102: "Do you know the postcode of the household’s last settled home?", + field_103: "What is the postcode of the household’s last settled home?", + field_104: "What is the postcode of the household’s last settled home?", + field_105: "What is the local authority of the household’s last settled home?", field_106: "Was the household given 'reasonable preference' by the local authority?", - field_107: "Reasonable preference reason They were homeless or about to lose their home (within 56 days)", - field_108: "Reasonable preference reason They were living in insanitary, overcrowded or unsatisfactory housing", - field_109: "Reasonable preference reason They needed to move on medical and welfare reasons (including disability)", - field_110: "Reasonable preference reason They needed to move to avoid hardship to themselves or others", - field_111: "Reasonable preference reason Don't know", + field_107: "Reasonable preference reason - They were homeless or about to lose their home (within 56 days)", + field_108: "Reasonable preference reason - They were living in insanitary, overcrowded or unsatisfactory housing", + field_109: "Reasonable preference reason - They needed to move on medical and welfare reasons (including disability)", + field_110: "Reasonable preference reason - They needed to move to avoid hardship to themselves or others", + field_111: "Reasonable preference reason - Don’t know", field_112: "Was the letting made under the Choice-Based Lettings (CBL)?", field_113: "Was the letting made under the Common Allocation Policy (CAP)?", field_114: "Was the letting made under the Common Housing Register (CHR)?", field_115: "Was the letting made under the Accessible Register?", field_116: "What was the source of referral for this letting?", - field_117: "Do you know the household's combined total income after tax?", + field_117: "Do you know the household’s combined total income after tax?", field_118: "How often does the household receive income?", field_119: "How much income does the household have in total?", field_120: "Is the tenant likely to be receiving any of these housing-related benefits?", - field_121: "How much of the household's income is from Universal Credit, state pensions or benefits?", + field_121: "How much of the household’s income is from Universal Credit, state pensions or benefits?", field_122: "Does the household pay rent or other charges for the accommodation?", field_123: "How often does the household pay rent and other charges?", field_124: "If this is a care home, how much does the household pay every [time period]?", @@ -445,6 +445,7 @@ class BulkUpload::Lettings::Year2024::RowParser validate :validate_incomplete_soft_validations, on: :after_log validate :validate_nationality, on: :after_log validate :validate_reasonpref_reason_values, on: :after_log + validate :validate_prevten_value_when_renewal, on: :after_log validate :validate_nulls, on: :after_log @@ -674,6 +675,13 @@ private end end + def validate_prevten_value_when_renewal + return unless field_7 == 1 + return if field_100.blank? || [6, 30, 31, 32, 33, 34, 35, 36].include?(field_100) + + errors.add(:field_100, I18n.t("#{ERROR_BASE_KEY}.prevten.invalid")) + end + def duplicate_check_fields [ "startdate", @@ -1311,7 +1319,7 @@ private attributes["illness_type_9"] = field_92 attributes["illness_type_10"] = field_95 - attributes["irproduct_other"] = field_12 + attributes["irproduct_other"] = field_12 if RENT_TYPE_BU_MAPPING[field_11] == 5 attributes["propcode"] = field_14 diff --git a/app/services/bulk_upload/lettings/year2025/row_parser.rb b/app/services/bulk_upload/lettings/year2025/row_parser.rb index 89a8cca38..61351764b 100644 --- a/app/services/bulk_upload/lettings/year2025/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2025/row_parser.rb @@ -27,9 +27,9 @@ class BulkUpload::Lettings::Year2025::RowParser field_20: "Address line 2", field_21: "Town or city", field_22: "County", - field_23: "Part 1 of the property's postcode", - field_24: "Part 2 of the property's postcode", - field_25: "What is the property's local authority?", + field_23: "Part 1 of the property’s postcode", + field_24: "Part 2 of the property’s postcode", + field_25: "What is the property’s local authority?", field_26: "What type of unit is the property?", field_27: "Which type of building is the property?", field_28: "Is the property built or adapted to wheelchair-user standards?", @@ -46,39 +46,39 @@ class BulkUpload::Lettings::Year2025::RowParser field_39: "What is the type of tenancy?", field_40: "If 'Other', what is the type of tenancy?", field_41: "What is the length of the fixed-term tenancy to the nearest year?", - field_42: "What is the lead tenant's age?", - field_43: "Which of these best describes the lead tenant's gender identity?", - field_44: "Which of these best describes the lead tenant's ethnic background?", - field_45: "What is the lead tenant's nationality?", - field_46: "Which of these best describes the lead tenant's working situation?", + field_42: "What is the lead tenant’s age?", + field_43: "Which of these best describes the lead tenant’s gender identity?", + field_44: "Which of these best describes the lead tenant’s ethnic background?", + field_45: "What is the lead tenant’s nationality?", + field_46: "Which of these best describes the lead tenant’s working situation?", field_47: "Is person 2 the partner of the lead tenant?", - field_48: "What is person 2's age?", - field_49: "Which of these best describes person 2's gender identity?", - field_50: "Which of these best describes person 2's working situation?", + field_48: "What is person 2’s age?", + field_49: "Which of these best describes person 2’s gender identity?", + field_50: "Which of these best describes person 2’s working situation?", field_51: "Is person 3 the partner of the lead tenant?", - field_52: "What is person 3's age?", - field_53: "Which of these best describes person 3's gender identity?", - field_54: "Which of these best describes person 3's working situation?", + field_52: "What is person 3’s age?", + field_53: "Which of these best describes person 3’s gender identity?", + field_54: "Which of these best describes person 3’s working situation?", field_55: "Is person 4 the partner of the lead tenant?", - field_56: "What is person 4's age?", - field_57: "Which of these best describes person 4's gender identity?", - field_58: "Which of these best describes person 4's working situation?", + field_56: "What is person 4’s age?", + field_57: "Which of these best describes person 4’s gender identity?", + field_58: "Which of these best describes person 4’s working situation?", field_59: "Is person 5 the partner of the lead tenant?", - field_60: "What is person 5's age?", - field_61: "Which of these best describes person 5's gender identity?", - field_62: "Which of these best describes person 5's working situation?", + field_60: "What is person 5’s age?", + field_61: "Which of these best describes person 5’s gender identity?", + field_62: "Which of these best describes person 5’s working situation?", field_63: "Is person 6 the partner of the lead tenant?", - field_64: "What is person 6's age?", - field_65: "Which of these best describes person 6's gender identity?", - field_66: "Which of these best describes person 6's working situation?", + field_64: "What is person 6’s age?", + field_65: "Which of these best describes person 6’s gender identity?", + field_66: "Which of these best describes person 6’s working situation?", field_67: "Is person 7 the partner of the lead tenant?", - field_68: "What is person 7's age?", - field_69: "Which of these best describes person 7's gender identity?", - field_70: "Which of these best describes person 7's working situation?", + field_68: "What is person 7’s age?", + field_69: "Which of these best describes person 7’s gender identity?", + field_70: "Which of these best describes person 7’s working situation?", field_71: "Is person 8 the partner of the lead tenant?", - field_72: "What is person 8's age?", - field_73: "Which of these best describes person 8's gender identity?", - field_74: "Which of these best describes person 8's working situation?", + field_72: "What is person 8’s age?", + field_73: "Which of these best describes person 8’s gender identity?", + field_74: "Which of these best describes person 8’s working situation?", field_75: "Does anybody in the household have links to the UK armed forces?", field_76: "Is this person still serving in the UK armed forces?", field_77: "Was this person seriously injured or ill as a result of serving in the UK armed forces?", @@ -90,42 +90,42 @@ class BulkUpload::Lettings::Year2025::RowParser field_83: "Does anybody in the household have any disabled access needs?", field_84: "Does anybody in the household have any disabled access needs?", field_85: "Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?", - field_86: "Does this person's condition affect their dexterity?", - field_87: "Does this person's condition affect their learning or understanding or concentrating?", - field_88: "Does this person's condition affect their hearing?", - field_89: "Does this person's condition affect their memory?", - field_90: "Does this person's condition affect their mental health?", - field_91: "Does this person's condition affect their mobility?", - field_92: "Does this person's condition affect them socially or behaviourally?", - field_93: "Does this person's condition affect their stamina or breathing or fatigue?", - field_94: "Does this person's condition affect their vision?", - field_95: "Does this person's condition affect them in another way?", + field_86: "Does this person’s condition affect their dexterity?", + field_87: "Does this person’s condition affect their learning or understanding or concentrating?", + field_88: "Does this person’s condition affect their hearing?", + field_89: "Does this person’s condition affect their memory?", + field_90: "Does this person’s condition affect their mental health?", + field_91: "Does this person’s condition affect their mobility?", + field_92: "Does this person’s condition affect them socially or behaviourally?", + field_93: "Does this person’s condition affect their stamina or breathing or fatigue?", + field_94: "Does this person’s condition affect their vision?", + field_95: "Does this person’s condition affect them in another way?", field_96: "How long has the household continuously lived in the local authority area of the new letting?", field_97: "How long has the household been on the local authority waiting list for the new letting?", field_98: "What is the tenant’s main reason for the household leaving their last settled home?", field_99: "If 'Other', what was the main reason for leaving their last settled home?", field_100: "Where was the household immediately before this letting?", field_101: "Did the household experience homelessness immediately before this letting?", - field_102: "Do you know the postcode of the household's last settled home?", - field_103: "What is the postcode of the household's last settled home?", - field_104: "What is the postcode of the household's last settled home?", - field_105: "What is the local authority of the household's last settled home?", + field_102: "Do you know the postcode of the household’s last settled home?", + field_103: "What is the postcode of the household’s last settled home?", + field_104: "What is the postcode of the household’s last settled home?", + field_105: "What is the local authority of the household’s last settled home?", field_106: "Was the household given 'reasonable preference' by the local authority?", - field_107: "Reasonable preference reason They were homeless or about to lose their home (within 56 days)", - field_108: "Reasonable preference reason They were living in insanitary, overcrowded or unsatisfactory housing", - field_109: "Reasonable preference reason They needed to move on medical and welfare reasons (including disability)", - field_110: "Reasonable preference reason They needed to move to avoid hardship to themselves or others", - field_111: "Reasonable preference reason Don't know", + field_107: "Reasonable preference reason - They were homeless or about to lose their home (within 56 days)", + field_108: "Reasonable preference reason - They were living in insanitary, overcrowded or unsatisfactory housing", + field_109: "Reasonable preference reason - They needed to move on medical and welfare reasons (including disability)", + field_110: "Reasonable preference reason - They needed to move to avoid hardship to themselves or others", + field_111: "Reasonable preference reason - Don’t know", field_112: "Was the letting made under the Choice-Based Lettings (CBL)?", field_113: "Was the letting made under the Common Allocation Policy (CAP)?", field_114: "Was the letting made under the Common Housing Register (CHR)?", field_115: "Was the letting made under the Accessible Register?", field_116: "What was the source of referral for this letting?", - field_117: "Do you know the household's combined total income after tax?", + field_117: "Do you know the household’s combined total income after tax?", field_118: "How often does the household receive income?", field_119: "How much income does the household have in total?", field_120: "Is the tenant likely to be receiving any of these housing-related benefits?", - field_121: "How much of the household's income is from Universal Credit, state pensions or benefits?", + field_121: "How much of the household’s income is from Universal Credit, state pensions or benefits?", field_122: "Does the household pay rent or other charges for the accommodation?", field_123: "How often does the household pay rent and other charges?", field_124: "What is the basic rent?", @@ -444,6 +444,7 @@ class BulkUpload::Lettings::Year2025::RowParser validate :validate_incomplete_soft_validations, on: :after_log validate :validate_nationality, on: :after_log validate :validate_reasonpref_reason_values, on: :after_log + validate :validate_prevten_value_when_renewal, on: :after_log validate :validate_nulls, on: :after_log @@ -673,6 +674,13 @@ private end end + def validate_prevten_value_when_renewal + return unless field_7 == 1 + return if field_100.blank? || [6, 30, 31, 32, 33, 34, 35, 38].include?(field_100) + + errors.add(:field_100, I18n.t("#{ERROR_BASE_KEY}.prevten.invalid")) + end + def duplicate_check_fields [ "startdate", @@ -1308,7 +1316,7 @@ private attributes["illness_type_9"] = field_92 attributes["illness_type_10"] = field_95 - attributes["irproduct_other"] = field_12 + attributes["irproduct_other"] = field_12 if RENT_TYPE_BU_MAPPING[field_11] == 5 attributes["propcode"] = field_14 diff --git a/app/services/bulk_upload/sales/year2023/row_parser.rb b/app/services/bulk_upload/sales/year2023/row_parser.rb index 39fb41d6b..ddcf18b6a 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -16,7 +16,7 @@ class BulkUpload::Sales::Year2023::RowParser field_9: "What is the type of discounted ownership sale?", field_10: "What is the type of outright sale?", - field_11: "If 'other', what is the 'other' type?", + field_11: "If 'Other', what is the 'Other' type?", field_12: "Is the buyer a company?", field_13: "Will the buyers live in the property?", field_14: "Is this a joint purchase?", @@ -24,7 +24,7 @@ class BulkUpload::Sales::Year2023::RowParser field_16: "How many bedrooms does the property have?", field_17: "What type of unit is the property?", field_18: "Which type of bulding is the property?", - field_19: "If known, enter this property's UPRN", + field_19: "If known, enter this property’s UPRN", field_20: "Address line 1", field_21: "Address line 2", @@ -39,19 +39,19 @@ class BulkUpload::Sales::Year2023::RowParser field_30: "Age of buyer 1", field_31: "Gender identity of buyer 1", - field_32: "What is buyer 1's ethnic group?", - field_33: "What is buyer 1's nationality?", - field_34: "If 'Any other country', what is buyer 1's nationality?", + field_32: "What is buyer 1’s ethnic group?", + field_33: "What is buyer 1’s nationality?", + field_34: "If 'Any other country', what is buyer 1’s nationality?", field_35: "Working situation of buyer 1", field_36: "Will buyer 1 live in the property?", field_37: "Relationship to buyer 1 for person 2", field_38: "Age of person 2", field_39: "Gender identity of person 2", - field_40: "Which of the following best describes buyer 2's ethnic background?", + field_40: "Which of the following best describes buyer 2’s ethnic background?", - field_41: "What is buyer 2's nationality?", - field_42: "If 'Any other country', what is buyer 2's nationality?", - field_43: "What is buyer 2 or person 2's working situation?", + field_41: "What is buyer 2’s nationality?", + field_42: "If 'Any other country', what is buyer 2’s nationality?", + field_43: "What is buyer 2 or person 2’s working situation?", field_44: "Will buyer 2 live in the property?", field_45: "Besides the buyers, how many people will live in the property?", field_46: "Relationship to buyer 1 for person 3", @@ -72,28 +72,28 @@ class BulkUpload::Sales::Year2023::RowParser field_60: "Gender identity of person 6", field_61: "Working situation of person 6", - field_62: "What was buyer 1's previous tenure?", - field_63: "Do you know the postcode of buyer 1's last settled home?", - field_64: "Part 1 of postcode of buyer 1's last settled home", - field_65: "Part 2 of postcode of buyer 1's last settled home", - field_66: "What is the local authority of buyer 1's last settled home?", + field_62: "What was buyer 1’s previous tenure?", + field_63: "Do you know the postcode of buyer 1’s last settled home?", + field_64: "Part 1 of postcode of buyer 1’s last settled home", + field_65: "Part 2 of postcode of buyer 1’s last settled home", + field_66: "What is the local authority of buyer 1’s last settled home?", field_67: "Was the buyer registered with their PRP (HA)?", field_68: "Was the buyer registered with another PRP (HA)?", field_69: "Was the buyer registered with the local authority?", field_70: "Was the buyer registered with a Help to Buy agent?", field_71: "At the time of purchase, was buyer 2 living at the same address as buyer 1?", - field_72: "What was buyer 2's previous tenure?", + field_72: "What was buyer 2’s previous tenure?", field_73: "Has the buyer ever served in the UK Armed Forces and for how long?", field_74: "Is the buyer still serving in the UK armed forces?", field_75: "Are any of the buyers a spouse or civil partner of a UK Armed Forces regular who died in service within the last 2 years?", field_76: "Does anyone in the household consider themselves to have a disability?", field_77: "Does anyone in the household use a wheelchair?", - field_78: "What is buyer 1's gross annual income?", - field_79: "Was buyer 1's income used for a mortgage application?", - field_80: "What is buyer 2's gross annual income?", + field_78: "What is buyer 1’s gross annual income?", + field_79: "Was buyer 1’s income used for a mortgage application?", + field_80: "What is buyer 2’s gross annual income?", - field_81: "Was buyer 2's income used for a mortgage application?", + field_81: "Was buyer 2’s income used for a mortgage application?", field_82: "Were the buyers receiving any of these housing-related benefits immediately before buying this property?", field_83: "What is the total amount the buyers had in savings before they paid any deposit for the property?", field_84: "Have any of the purchasers previously owned a property?", @@ -113,16 +113,16 @@ class BulkUpload::Sales::Year2023::RowParser field_97: "What is the year of the practical completion or handover date?", field_98: "Was the household re-housed under a local authority nominations agreement?", field_99: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?", - field_100: "How many bedrooms did the buyer's previous property have?", + field_100: "How many bedrooms did the buyer’s previous property have?", - field_101: "What was the type of the buyer's previous property?", - field_102: "What was the rent type of the buyer's previous property?", + field_101: "What was the type of the buyer’s previous property?", + field_102: "What was the rent type of the buyer’s previous property?", field_103: "What was the full purchase price?", field_104: "What was the initial percentage equity stake purchased?", field_105: "Was a mortgage used for the purchase of this property? - Shared ownership", field_106: "What is the mortgage amount?", field_107: "What is the name of the mortgage lender? - Shared ownership", - field_108: "If 'other', what is the name of the mortgage lender?", + field_108: "If 'Other', what is the name of the mortgage lender?", field_109: "What is the length of the mortgage in years? - Shared ownership", field_110: "Does this include any extra borrowing?", @@ -138,7 +138,7 @@ class BulkUpload::Sales::Year2023::RowParser field_120: "What is the mortgage amount?", field_121: "What is the name of the mortgage lender? - Discounted ownership", - field_122: "If 'other', what is the name of the mortgage lender?", + field_122: "If 'Other', what is the name of the mortgage lender?", field_123: "What is the length of the mortgage in years? - Discounted ownership", field_124: "Does this include any extra borrowing?", field_125: "How much was the cash deposit paid on the property?", @@ -148,7 +148,7 @@ class BulkUpload::Sales::Year2023::RowParser field_129: "What is the mortgage amount?", field_130: "What is the name of the mortgage lender? - Outright sale", - field_131: "If 'other', what is the name of the mortgage lender?", + field_131: "If 'Other', what is the name of the mortgage lender?", field_132: "What is the length of the mortgage in years? - Outright sale", field_133: "Does this include any extra borrowing?", field_134: "How much was the cash deposit paid on the property?", diff --git a/app/services/bulk_upload/sales/year2024/row_parser.rb b/app/services/bulk_upload/sales/year2024/row_parser.rb index a613a118c..a1b214182 100644 --- a/app/services/bulk_upload/sales/year2024/row_parser.rb +++ b/app/services/bulk_upload/sales/year2024/row_parser.rb @@ -17,7 +17,7 @@ class BulkUpload::Sales::Year2024::RowParser field_10: "What is the type of discounted ownership sale?", field_11: "What is the type of outright sale?", - field_12: "If 'other', what is the 'other' type?", + field_12: "If 'Other', what is the 'Other' type?", field_13: "Is the buyer a company?", field_14: "Will the buyers live in the property?", field_15: "Is this a joint purchase?", @@ -27,7 +27,7 @@ class BulkUpload::Sales::Year2024::RowParser field_19: "How many bedrooms does the property have?", field_20: "What type of unit is the property?", field_21: "Which type of bulding is the property?", - field_22: "If known, enter this property's UPRN", + field_22: "If known, enter this property’s UPRN", field_23: "Address line 1", field_24: "Address line 2", @@ -40,17 +40,17 @@ class BulkUpload::Sales::Year2024::RowParser field_31: "Age of buyer 1", field_32: "Gender identity of buyer 1", - field_33: "What is buyer 1's ethnic group?", - field_34: "What is buyer 1's nationality?", + field_33: "What is buyer 1’s ethnic group?", + field_34: "What is buyer 1’s nationality?", field_35: "Working situation of buyer 1", field_36: "Will buyer 1 live in the property?", field_37: "Relationship to buyer 1 for person 2", field_38: "Age of person 2", field_39: "Gender identity of person 2", - field_40: "Which of the following best describes buyer 2's ethnic background?", + field_40: "Which of the following best describes buyer 2’s ethnic background?", - field_41: "What is buyer 2's nationality?", - field_42: "What is buyer 2 or person 2's working situation?", + field_41: "What is buyer 2’s nationality?", + field_42: "What is buyer 2 or person 2’s working situation?", field_43: "Will buyer 2 live in the property?", field_44: "Besides the buyers, how many people will live in the property?", field_45: "Relationship to buyer 1 for person 3", @@ -71,28 +71,28 @@ class BulkUpload::Sales::Year2024::RowParser field_59: "Gender identity of person 6", field_60: "Working situation of person 6", - field_61: "What was buyer 1's previous tenure?", - field_62: "Do you know the postcode of buyer 1's last settled home?", - field_63: "Part 1 of postcode of buyer 1's last settled home", - field_64: "Part 2 of postcode of buyer 1's last settled home", - field_65: "What is the local authority of buyer 1's last settled home?", + field_61: "What was buyer 1’s previous tenure?", + field_62: "Do you know the postcode of buyer 1’s last settled home?", + field_63: "Part 1 of postcode of buyer 1’s last settled home", + field_64: "Part 2 of postcode of buyer 1’s last settled home", + field_65: "What is the local authority of buyer 1’s last settled home?", field_66: "Was the buyer registered with their PRP (HA)?", field_67: "Was the buyer registered with another PRP (HA)?", field_68: "Was the buyer registered with the local authority?", field_69: "Was the buyer registered with a Help to Buy agent?", field_70: "At the time of purchase, was buyer 2 living at the same address as buyer 1?", - field_71: "What was buyer 2's previous tenure?", + field_71: "What was buyer 2’s previous tenure?", field_72: "Has the buyer ever served in the UK Armed Forces and for how long?", field_73: "Is the buyer still serving in the UK armed forces?", field_74: "Are any of the buyers a spouse or civil partner of a UK Armed Forces regular who died in service within the last 2 years?", field_75: "Does anyone in the household consider themselves to have a disability?", field_76: "Does anyone in the household use a wheelchair?", - field_77: "What is buyer 1's gross annual income?", - field_78: "Was buyer 1's income used for a mortgage application?", - field_79: "What is buyer 2's gross annual income?", + field_77: "What is buyer 1’s gross annual income?", + field_78: "Was buyer 1’s income used for a mortgage application?", + field_79: "What is buyer 2’s gross annual income?", - field_80: "Was buyer 2's income used for a mortgage application?", + field_80: "Was buyer 2’s income used for a mortgage application?", field_81: "Were the buyers receiving any of these housing-related benefits immediately before buying this property?", field_82: "What is the total amount the buyers had in savings before they paid any deposit for the property?", field_83: "Have any of the purchasers previously owned a property?", @@ -111,16 +111,16 @@ class BulkUpload::Sales::Year2024::RowParser field_95: "What is the month of the practical completion or handover date?", field_96: "What is the year of the practical completion or handover date?", field_97: "Was the household re-housed under a local authority nominations agreement?", - field_98: "How many bedrooms did the buyer's previous property have?", + field_98: "How many bedrooms did the buyer’s previous property have?", - field_99: "What was the type of the buyer's previous property?", - field_100: "What was the rent type of the buyer's previous property?", + field_99: "What was the type of the buyer’s previous property?", + field_100: "What was the rent type of the buyer’s previous property?", field_101: "What was the full purchase price?", field_102: "What was the initial percentage equity stake purchased?", field_103: "Was a mortgage used for the purchase of this property? - Shared ownership", field_104: "What is the mortgage amount?", field_105: "What is the name of the mortgage lender? - Shared ownership", - field_106: "If 'other', what is the name of the mortgage lender?", + field_106: "If 'Other', what is the name of the mortgage lender?", field_107: "What is the length of the mortgage in years? - Shared ownership", field_108: "Does this include any extra borrowing?", @@ -136,7 +136,7 @@ class BulkUpload::Sales::Year2024::RowParser field_118: "What is the mortgage amount?", field_119: "What is the name of the mortgage lender? - Discounted ownership", - field_120: "If 'other', what is the name of the mortgage lender?", + field_120: "If 'Other', what is the name of the mortgage lender?", field_121: "What is the length of the mortgage in years? - Discounted ownership", field_122: "Does this include any extra borrowing?", field_123: "How much was the cash deposit paid on the property?", diff --git a/app/services/bulk_upload/sales/year2025/row_parser.rb b/app/services/bulk_upload/sales/year2025/row_parser.rb index 886b3e928..d4be45910 100644 --- a/app/services/bulk_upload/sales/year2025/row_parser.rb +++ b/app/services/bulk_upload/sales/year2025/row_parser.rb @@ -21,7 +21,7 @@ class BulkUpload::Sales::Year2025::RowParser field_14: "Was the buyer interviewed for any of the answers you will provide on this log?", field_15: "Data Protection question", - field_16: "If known, enter this property's UPRN", + field_16: "If known, enter this property’s UPRN", field_17: "Address line 1", field_18: "Address line 2", field_19: "Town or city", @@ -36,16 +36,16 @@ class BulkUpload::Sales::Year2025::RowParser field_28: "Age of buyer 1", field_29: "Gender identity of buyer 1", - field_30: "What is buyer 1's ethnic group?", - field_31: "What is buyer 1's nationality?", + field_30: "What is buyer 1’s ethnic group?", + field_31: "What is buyer 1’s nationality?", field_32: "Working situation of buyer 1", field_33: "Will buyer 1 live in the property?", field_34: "Is buyer 2 or person 2 the partner of buyer 1?", field_35: "Age of person 2", field_36: "Gender identity of person 2", - field_37: "Which of the following best describes buyer 2's ethnic background?", - field_38: "What is buyer 2's nationality?", - field_39: "What is buyer 2 or person 2's working situation?", + field_37: "Which of the following best describes buyer 2’s ethnic background?", + field_38: "What is buyer 2’s nationality?", + field_39: "What is buyer 2 or person 2’s working situation?", field_40: "Will buyer 2 live in the property?", field_41: "Besides the buyers, how many people will live in the property?", @@ -66,13 +66,13 @@ class BulkUpload::Sales::Year2025::RowParser field_56: "Gender identity of person 6", field_57: "Working situation of person 6", - field_58: "What was buyer 1's previous tenure?", - field_59: "Do you know the postcode of buyer 1's last settled home?", - field_60: "Part 1 of postcode of buyer 1's last settled home", - field_61: "Part 2 of postcode of buyer 1's last settled home", - field_62: "What is the local authority of buyer 1's last settled home?", + field_58: "What was buyer 1’s previous tenure?", + field_59: "Do you know the postcode of buyer 1’s last settled home?", + field_60: "Part 1 of postcode of buyer 1’s last settled home", + field_61: "Part 2 of postcode of buyer 1’s last settled home", + field_62: "What is the local authority of buyer 1’s last settled home?", field_63: "At the time of purchase, was buyer 2 living at the same address as buyer 1?", - field_64: "What was buyer 2's previous tenure?", + field_64: "What was buyer 2’s previous tenure?", field_65: "Has the buyer ever served in the UK Armed Forces and for how long?", field_66: "Is the buyer still serving in the UK armed forces?", @@ -80,10 +80,10 @@ class BulkUpload::Sales::Year2025::RowParser field_68: "Does anyone in the household consider themselves to have a disability?", field_69: "Does anyone in the household use a wheelchair?", - field_70: "What is buyer 1's gross annual income?", - field_71: "Was buyer 1's income used for a mortgage application?", - field_72: "What is buyer 2's gross annual income?", - field_73: "Was buyer 2's income used for a mortgage application?", + field_70: "What is buyer 1’s gross annual income?", + field_71: "Was buyer 1’s income used for a mortgage application?", + field_72: "What is buyer 2’s gross annual income?", + field_73: "Was buyer 2’s income used for a mortgage application?", field_74: "Were the buyers receiving any of these housing-related benefits immediately before buying this property?", field_75: "What is the total amount the buyers had in savings before they paid any deposit for the property?", field_76: "Have any of the purchasers previously owned a property?", @@ -94,9 +94,9 @@ class BulkUpload::Sales::Year2025::RowParser field_80: "What is the day of the practical completion or handover date?", field_81: "What is the month of the practical completion or handover date?", field_82: "What is the year of the practical completion or handover date?", - field_83: "How many bedrooms did the buyer's previous property have?", - field_84: "What was the type of the buyer's previous property?", - field_85: "What was the rent type of the buyer's previous property?", + field_83: "How many bedrooms did the buyer’s previous property have?", + field_84: "What was the type of the buyer’s previous property?", + field_85: "What was the rent type of the buyer’s previous property?", field_86: "What was the full purchase price?", field_87: "What was the initial percentage share purchased?", field_88: "Was a mortgage used for the purchase of this property? - Shared ownership", diff --git a/app/services/documentation_generator.rb b/app/services/documentation_generator.rb index 999216d6d..c2005f320 100644 --- a/app/services/documentation_generator.rb +++ b/app/services/documentation_generator.rb @@ -8,10 +8,14 @@ class DocumentationGenerator include Validations::LocalAuthorityValidations include Validations::SoftValidations include Validations::Sales::SoftValidations - - def describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) - form = FormHandler.instance.forms["current_#{log_type}"] - + include Validations::SetupValidations + include Validations::HouseholdValidations + include Validations::PropertyValidations + include Validations::FinancialValidations + include Validations::TenancyValidations + include Validations::DateValidations + + def describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) all_validation_methods.each do |meth| if LogValidation.where(validation_name: meth.to_s, bulk_upload_specific: false, log_type:, collection_year: "#{form.start_date.year}/#{form.start_date.year + 1}").exists? Rails.logger.info("Validation #{meth} already exists for #{form.start_date.year}") @@ -69,9 +73,9 @@ class DocumentationGenerator end end - def describe_soft_validations(client, all_validation_methods, all_helper_methods, log_type) + def describe_soft_validations(client, form, all_validation_methods, all_helper_methods, log_type) validation_descriptions = {} - all_validation_methods[0..5].each do |meth| + all_validation_methods.each do |meth| validation_source = method(meth).source helper_methods_source = all_helper_methods.map { |helper_method| if validation_source.include?(helper_method.to_s) @@ -87,20 +91,34 @@ class DocumentationGenerator validation_descriptions[meth.to_s] = result end - current_form = FormHandler.instance.forms["current_#{log_type}"] - previous_form = FormHandler.instance.forms["previous_#{log_type}"] - - [current_form, previous_form].each do |form| - interruption_screen_pages = form.pages.select { |page| page.questions.first.type == "interruption_screen" } - interruption_screen_pages_grouped_by_question = interruption_screen_pages.group_by { |page| page.questions.first.id } - interruption_screen_pages_grouped_by_question.each do |_question_id, pages| - pages.map do |page| - save_soft_validation(form, page, validation_descriptions, log_type) - end + interruption_screen_pages = form.pages.select { |page| page.questions.first.type == "interruption_screen" } + interruption_screen_pages_grouped_by_question = interruption_screen_pages.group_by { |page| page.questions.first.id } + interruption_screen_pages_grouped_by_question.each do |_question_id, pages| + pages.map do |page| + save_soft_validation(form, page, validation_descriptions, log_type) end end end + def validation_and_helper_methods(validation_classes) + all_validation_methods = validation_classes.map(&:instance_methods).flatten.select { |method| method.starts_with?("validate_") }.uniq + all_methods = validation_classes.map { |x| x.instance_methods + x.private_instance_methods }.flatten.uniq + all_helper_methods = all_methods - all_validation_methods + [all_validation_methods, all_helper_methods] + end + + def get_soft_sales_methods + all_helper_methods = Validations::SoftValidations.private_instance_methods + Validations::Sales::SoftValidations.private_instance_methods + all_validation_methods = Validations::SoftValidations.instance_methods + Validations::Sales::SoftValidations.instance_methods + [all_helper_methods, all_validation_methods] + end + + def get_soft_lettings_methods + all_helper_methods = Validations::SoftValidations.private_instance_methods + all_validation_methods = Validations::SoftValidations.instance_methods + [all_helper_methods, all_validation_methods] + end + private def describe_hard_validation(client, meth, validation_source, helper_methods_source, form, file_path) @@ -109,7 +127,7 @@ private begin client.chat( parameters: { - model: "gpt-3.5-turbo", + model: "gpt-4o-mini", messages: [ { role: "system", @@ -201,7 +219,7 @@ private def soft_validation_description(client, meth, validation_source, helper_methods_source) client.chat( parameters: { - model: "gpt-3.5-turbo", + model: "gpt-4o-mini", messages: [ { role: "system", diff --git a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file.html.erb b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file.html.erb index 887b81554..ec3c12b27 100644 --- a/app/views/bulk_upload_lettings_logs/forms/prepare_your_file.html.erb +++ b/app/views/bulk_upload_lettings_logs/forms/prepare_your_file.html.erb @@ -20,7 +20,7 @@

Create your file

<%= govuk_list [ - "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.", + "Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log - your data should start in column B.", "Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.", "Use the #{govuk_link_to "Lettings bulk upload Specification (#{@form.year_combo})", @form.specification_path} to check your data is in the correct format.".html_safe, "Username field: To assign a log to someone else, enter the email address they use to log into CORE.".html_safe, diff --git a/app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb b/app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb index 00c693cd4..f7ec0ee86 100644 --- a/app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb +++ b/app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb @@ -20,7 +20,7 @@

Create your file

<%= govuk_list [ - "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.", + "Fill in the template with data from your housing management system. Your data should go below the headers, with one row per log - your data should start in column B.", "Make sure each column of your data aligns with the matching headers above. You may need to reorder your data.", "Use the #{govuk_link_to "Sales bulk upload Specification (#{@form.year_combo})", @form.specification_path} to check your data is in the correct format.".html_safe, "Username field: To assign a log to someone else, enter the email address they use to log into CORE.".html_safe, diff --git a/app/views/bulk_upload_shared/guidance.html.erb b/app/views/bulk_upload_shared/guidance.html.erb index 330d3b4ea..4a45f7673 100644 --- a/app/views/bulk_upload_shared/guidance.html.erb +++ b/app/views/bulk_upload_shared/guidance.html.erb @@ -32,7 +32,7 @@ <%= govuk_list ["the CORE form questions and their field numbers", "each field’s valid responses", "if/when certain fields can be left blank", "which fields are used to check for duplicate logs"], type: :bullet %> -

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.

+

You can paste your data below the headers or copy the headers and insert them above the data in your file - your data should start in column B.

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.

<%= govuk_link_to "Download the lettings bulk upload template (#{@form.year} to #{@form.year + 1})", @form.lettings_template_path %>

<%= govuk_link_to "Download the sales bulk upload template (#{@form.year} to #{@form.year + 1})", @form.sales_template_path %>

diff --git a/app/views/content/privacy_notice.md b/app/views/content/privacy_notice.md index b3d3d8c04..9e7d3682d 100644 --- a/app/views/content/privacy_notice.md +++ b/app/views/content/privacy_notice.md @@ -41,6 +41,6 @@ Detail-level data is anonymised and protected, minimising identification risk. I ## Complaints -If you’re unhappy with any privacy notice aspect, or how we process your information, contact the Department Data Protection Officer: +If you’re unhappy with any privacy notice aspect, or how we process your information, contact the Department Data Protection Officer: You also have the right to complain to the Information Commissioner’s Office (ICO): [https://ico.org.uk/make-a-complaint/](https://ico.org.uk/make-a-complaint/) diff --git a/app/views/home/_data_box.html.erb b/app/views/home/_data_box.html.erb index 2000e85a1..82a377457 100644 --- a/app/views/home/_data_box.html.erb +++ b/app/views/home/_data_box.html.erb @@ -1,6 +1,5 @@
-
- <%= govuk_link_to data_box[:count], data_box[:path], class: "govuk-link--no-visited-state govuk-link--no-underline" %> -
- <%= govuk_link_to data_box[:text], data_box[:path], class: "govuk-link--no-visited-state" %> + <%= govuk_link_to data_box[:path], class: "govuk-link--no-visited-state govuk-link--no-underline" do %> + <%= data_box[:count] %>
<%= data_box[:text] %> + <% end %>
diff --git a/app/views/merge_requests/_merge_request_list.html.erb b/app/views/merge_requests/_merge_request_list.html.erb index e73a1aa02..7a541cddb 100644 --- a/app/views/merge_requests/_merge_request_list.html.erb +++ b/app/views/merge_requests/_merge_request_list.html.erb @@ -1,4 +1,4 @@ -
+
<% if @merge_requests.empty? %>

No merge requests

<% else %> diff --git a/app/views/organisation_relationships/_related_org_list.erb b/app/views/organisation_relationships/_related_org_list.erb index e4c32f23f..5b3b50932 100644 --- a/app/views/organisation_relationships/_related_org_list.erb +++ b/app/views/organisation_relationships/_related_org_list.erb @@ -1,4 +1,4 @@ -
+
<%= govuk_table do |table| %> <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: search_item, filters_count: 0)) %> diff --git a/app/views/organisations/_organisation_list.html.erb b/app/views/organisations/_organisation_list.html.erb index 16309a5eb..b5b4b820b 100644 --- a/app/views/organisations/_organisation_list.html.erb +++ b/app/views/organisations/_organisation_list.html.erb @@ -1,4 +1,4 @@ -
+
<%= govuk_table do |table| %> <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "organisation", filters_count: applied_filters_count(@filter_type))) %> diff --git a/app/views/schemes/_scheme_list.html.erb b/app/views/schemes/_scheme_list.html.erb index 1c11e86d1..f8d3eb581 100644 --- a/app/views/schemes/_scheme_list.html.erb +++ b/app/views/schemes/_scheme_list.html.erb @@ -1,4 +1,4 @@ -
+
<%= govuk_table do |table| %> <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> diff --git a/app/views/users/_user_list.html.erb b/app/views/users/_user_list.html.erb index 82a82b33b..aa686179d 100644 --- a/app/views/users/_user_list.html.erb +++ b/app/views/users/_user_list.html.erb @@ -1,4 +1,4 @@ -
+
<%= govuk_table do |table| %> <%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "user", filters_count: applied_filters_count(@filter_type))) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 3e35a32ce..086a26923 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -423,7 +423,7 @@ en: warnings: organisation: - deactivate: "All schemes and users at this organisation will be deactivated. All the organisation's relationships will be removed. It will no longer be possible to create logs for this organisation." + deactivate: "All schemes and users at this organisation will be deactivated. All the organisation’s relationships will be removed. It will no longer be possible to create logs for this organisation." reactivate: "All schemes, users, and relationships that were active when this organisation was deactivated will be reactivated." location: deactivate: diff --git a/config/locales/forms/2023/lettings/guidance.en.yml b/config/locales/forms/2023/lettings/guidance.en.yml index 1ce7e8a0c..326d37dba 100644 --- a/config/locales/forms/2023/lettings/guidance.en.yml +++ b/config/locales/forms/2023/lettings/guidance.en.yml @@ -14,7 +14,7 @@ en:

If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.

" scheme_changes_link_text: "Read more about how schemes have changed" view_schemes_link_text: "View your organisation’s schemes" - + privacy_notice_tenant: content: "Make sure the tenant has seen %{privacy_notice_link} before completing this log." privacy_notice_link_text: "the Ministry of Housing, Communities and Local Government (MHCLG) privacy notice" @@ -39,7 +39,7 @@ en: title: "What is a void date?" content: "

Date the property was (legally or contractually) available to let, or for:

    -
  • re-lets: the day after the previous tenant's contract ended
  • +
  • re-lets: the day after the previous tenant’s contract ended
  • new builds: the day the landlord legally first owned the property (‘completion date’)
  • new conversions or acquisitions: completion date, or the day after rehabilitation work ended
  • new leases: the day the landlord got contractual property rights and could let it out to tenants
  • @@ -60,4 +60,4 @@ en:
  • housing benefit
  • child benefit
  • council tax support
  • -
" \ No newline at end of file + " diff --git a/config/locales/forms/2023/lettings/household_characteristics.en.yml b/config/locales/forms/2023/lettings/household_characteristics.en.yml index 09db802f5..274c2528d 100644 --- a/config/locales/forms/2023/lettings/household_characteristics.en.yml +++ b/config/locales/forms/2023/lettings/household_characteristics.en.yml @@ -20,8 +20,8 @@ en: age1: page_header: "" age1_known: - check_answer_label: "Lead tenant's age" - check_answer_prompt: "Enter lead tenant's age if known" + check_answer_label: "Lead tenant’s age" + check_answer_prompt: "Enter lead tenant’s age if known" hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "Do you know the lead tenant’s age?" age1: @@ -93,7 +93,7 @@ en: details_known_2: page_header: "You’ve given us the details for 1 person in the household" check_answer_label: "Details known for person 2" - check_answer_prompt: "Tell us if you know person 2's details" + check_answer_prompt: "Tell us if you know person 2’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 2?" @@ -108,7 +108,7 @@ en: page_header: "" age2_known: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age if known" + check_answer_prompt: "Enter person 2’s age if known" hint_text: "" question_text: "Do you know person 2’s age?" age2: @@ -134,7 +134,7 @@ en: details_known_3: page_header: "You’ve given us the details for 2 people in the household" check_answer_label: "Details known for person 3" - check_answer_prompt: "Tell us if you know person 3's details" + check_answer_prompt: "Tell us if you know person 3’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 3?" @@ -149,7 +149,7 @@ en: page_header: "" age3_known: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age if known" + check_answer_prompt: "Enter person 3’s age if known" hint_text: "" question_text: "Do you know person 3’s age?" age3: @@ -175,7 +175,7 @@ en: details_known_4: page_header: "You’ve given us the details for 3 people in the household" check_answer_label: "Details known for person 4" - check_answer_prompt: "Tell us if you know person 4's details" + check_answer_prompt: "Tell us if you know person 4’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 4?" @@ -190,7 +190,7 @@ en: page_header: "" age4_known: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age if known" + check_answer_prompt: "Enter person 4’s age if known" hint_text: "" question_text: "Do you know person 4’s age?" age4: @@ -216,7 +216,7 @@ en: details_known_5: page_header: "You’ve given us the details for 4 people in the household" check_answer_label: "Details known for person 5" - check_answer_prompt: "Tell us if you know person 5's details" + check_answer_prompt: "Tell us if you know person 5’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 5?" @@ -231,7 +231,7 @@ en: page_header: "" age5_known: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age if known" + check_answer_prompt: "Enter person 5’s age if known" hint_text: "" question_text: "Do you know person 5’s age?" age5: @@ -257,7 +257,7 @@ en: details_known_6: page_header: "You’ve given us the details for 5 people in the household" check_answer_label: "Details known for person 6" - check_answer_prompt: "Tell us if you know person 6's details" + check_answer_prompt: "Tell us if you know person 6’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 6?" @@ -272,7 +272,7 @@ en: page_header: "" age6_known: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age if known" + check_answer_prompt: "Enter person 6’s age if known" hint_text: "" question_text: "Do you know person 6’s age?" age6: @@ -298,7 +298,7 @@ en: details_known_7: page_header: "You’ve given us the details for 6 people in the household" check_answer_label: "Details known for person 7" - check_answer_prompt: "Tell us if you know person 7's details" + check_answer_prompt: "Tell us if you know person 7’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 7?" @@ -313,7 +313,7 @@ en: page_header: "" age7_known: check_answer_label: "Person 7’s age" - check_answer_prompt: "Enter person 7's age if known" + check_answer_prompt: "Enter person 7’s age if known" hint_text: "" question_text: "Do you know person 7’s age?" age7: @@ -339,7 +339,7 @@ en: details_known_8: page_header: "You’ve given us the details for 7 people in the household" check_answer_label: "Details known for person 8" - check_answer_prompt: "Tell us if you know person 8's details" + check_answer_prompt: "Tell us if you know person 8’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 8?" @@ -354,7 +354,7 @@ en: page_header: "" age8_known: check_answer_label: "Person 8’s age" - check_answer_prompt: "Enter person 8's age if known" + check_answer_prompt: "Enter person 8’s age if known" hint_text: "" question_text: "Do you know person 8’s age?" age8: diff --git a/config/locales/forms/2023/lettings/household_situation.en.yml b/config/locales/forms/2023/lettings/household_situation.en.yml index 1ce9f900a..eb9ecae7f 100644 --- a/config/locales/forms/2023/lettings/household_situation.en.yml +++ b/config/locales/forms/2023/lettings/household_situation.en.yml @@ -80,8 +80,8 @@ en: previous_local_authority: page_header: "" previous_la_known: - check_answer_label: "Local authority of household's last settled accommodation" - check_answer_prompt: "Enter the local authority of the buyer's last settled accommodation if known" + check_answer_label: "Local authority of household’s last settled accommodation" + check_answer_prompt: "Enter the local authority of the buyer’s last settled accommodation if known" hint_text: "This is also known as the household’s ‘last settled home’." question_text: "Do you know the local authority of the household’s last settled accommodation?" prevloc: diff --git a/config/locales/forms/2023/lettings/property_information.en.yml b/config/locales/forms/2023/lettings/property_information.en.yml index 089e29c0e..3745957c5 100644 --- a/config/locales/forms/2023/lettings/property_information.en.yml +++ b/config/locales/forms/2023/lettings/property_information.en.yml @@ -9,12 +9,12 @@ en: check_answer_label: "UPRN known" check_answer_prompt: "Enter UPRN if known" hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.

The UPRN may not be the same as the property reference assigned by your organisation.

If you don’t know the UPRN you can enter the address of the property instead on the next screen." - question_text: "Do you know the property's UPRN?" + question_text: "Do you know the property’s UPRN?" uprn: check_answer_label: "UPRN" check_answer_prompt: "" hint_text: "" - question_text: "What is the property's UPRN?" + question_text: "What is the property’s UPRN?" uprn_confirmed: page_header: "We found an address that might be this property" @@ -24,7 +24,7 @@ en: question_text: "Is this the property address?" address: - page_header: "Q12 - What is the property's address?" + page_header: "Q12 - What is the property’s address?" address_line1: check_answer_label: "Address lines 1 and 2" check_answer_prompt: "Enter address lines 1 and 2" @@ -61,7 +61,7 @@ en: first_time_property_let_as_social_housing: page_header: "" check_answer_label: "First time being let as social housing" - check_answer_prompt: "Tell us if it's the first time being let as social housing" + check_answer_prompt: "Tell us if it’s the first time being let as social housing" hint_text: "" question_text: "Is this the first time the property has been let as social housing?" diff --git a/config/locales/forms/2023/lettings/setup.en.yml b/config/locales/forms/2023/lettings/setup.en.yml index c4927532e..00b6811c0 100644 --- a/config/locales/forms/2023/lettings/setup.en.yml +++ b/config/locales/forms/2023/lettings/setup.en.yml @@ -55,7 +55,7 @@ en: renewal: page_header: "" check_answer_label: "Property renewal" - check_answer_prompt: "Tell us if it's a property renewal" + check_answer_prompt: "Tell us if it’s a property renewal" hint_text: "A renewal is a letting to the same tenant in the same property. If the property was previously being used as temporary accommodation, then answer 'no'." question_text: "Is this letting a renewal?" diff --git a/config/locales/forms/2023/lettings/soft_validations.en.yml b/config/locales/forms/2023/lettings/soft_validations.en.yml index 450547f72..4b2b5af18 100644 --- a/config/locales/forms/2023/lettings/soft_validations.en.yml +++ b/config/locales/forms/2023/lettings/soft_validations.en.yml @@ -42,7 +42,7 @@ en: partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" - check_answer_prompt: "Confirm partner's age" + check_answer_prompt: "Confirm partner’s age" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant." diff --git a/config/locales/forms/2023/lettings/tenancy_information.en.yml b/config/locales/forms/2023/lettings/tenancy_information.en.yml index 1208251b9..892a5ce70 100644 --- a/config/locales/forms/2023/lettings/tenancy_information.en.yml +++ b/config/locales/forms/2023/lettings/tenancy_information.en.yml @@ -6,14 +6,14 @@ en: joint: page_header: "" check_answer_label: "Joint tenancy" - check_answer_prompt: "Tell us if it's a joint tenancy" + check_answer_prompt: "Tell us if it’s a joint tenancy" hint_text: "" question_text: "Is this a joint tenancy?" startertenancy: page_header: "" check_answer_label: "Starter or introductory tenancy" - check_answer_prompt: "Tell us if it's a starter or introductory tenancy" + check_answer_prompt: "Tell us if it’s a starter or introductory tenancy" hint_text: "This is also known as an ‘introductory period’." question_text: "Is this a starter tenancy?" diff --git a/config/locales/forms/2023/sales/household_characteristics.en.yml b/config/locales/forms/2023/sales/household_characteristics.en.yml index 94871e918..60c642fd4 100644 --- a/config/locales/forms/2023/sales/household_characteristics.en.yml +++ b/config/locales/forms/2023/sales/household_characteristics.en.yml @@ -35,12 +35,12 @@ en: page_header: "" age1_known: check_answer_label: "Buyer 1’s age" - check_answer_prompt: "Enter buyer 1's age if known" + check_answer_prompt: "Enter buyer 1’s age if known" hint_text: "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest." question_text: "Do you know buyer 1’s age?" age1: check_answer_label: "Buyer 1’s age" - check_answer_prompt: "Enter buyer 1's age" + check_answer_prompt: "Enter buyer 1’s age" hint_text: "" question_text: "Age" @@ -99,10 +99,10 @@ en: ecstat1: page_header: "" - check_answer_label: "Buyer 1's working situation" + check_answer_label: "Buyer 1’s working situation" check_answer_prompt: "" hint_text: "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest." - question_text: "Which of these best describes buyer 1's working situation?" + question_text: "Which of these best describes buyer 1’s working situation?" buy1livein: page_header: "" @@ -114,10 +114,10 @@ en: relat2: buyer: page_header: "" - check_answer_label: "Buyer 2's relationship to buyer 1" + check_answer_label: "Buyer 2’s relationship to buyer 1" check_answer_prompt: "" hint_text: "" - question_text: "What is buyer 2's relationship to buyer 1?" + question_text: "What is buyer 2’s relationship to buyer 1?" person: page_header: "" check_answer_label: "Person 2’s relationship to buyer 1" @@ -130,24 +130,24 @@ en: page_header: "" age2_known: check_answer_label: "Buyer 2’s age" - check_answer_prompt: "Enter buyer 2's age if known" + check_answer_prompt: "Enter buyer 2’s age if known" hint_text: "" question_text: "Do you know buyer 2’s age?" age2: check_answer_label: "Buyer 2’s age" - check_answer_prompt: "Enter buyer 2's age" + check_answer_prompt: "Enter buyer 2’s age" hint_text: "" question_text: "Age" person: page_header: "" age2_known: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age if known" + check_answer_prompt: "Enter person 2’s age if known" hint_text: "" question_text: "Do you know person 2’s age?" age2: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age" + check_answer_prompt: "Enter person 2’s age" hint_text: "" question_text: "Age" @@ -214,10 +214,10 @@ en: ecstat2: buyer: page_header: "" - check_answer_label: "Buyer 2's working situation" + check_answer_label: "Buyer 2’s working situation" check_answer_prompt: "" hint_text: "" - question_text: "Which of these best describes buyer 2's working situation?" + question_text: "Which of these best describes buyer 2’s working situation?" person: page_header: "" check_answer_label: "Person 2’s working situation" @@ -249,14 +249,14 @@ en: details_known_2: page_header: "" check_answer_label: "Details known for person 2?" - check_answer_prompt: "Tell us if you know person 2's details" + check_answer_prompt: "Tell us if you know person 2’s details" hint_text: "" question_text: "Do you know the details for person 2?" details_known_3: page_header: "" check_answer_label: "Details known for person 3?" - check_answer_prompt: "Tell us if you know person 3's details" + check_answer_prompt: "Tell us if you know person 3’s details" hint_text: "" question_text: "Do you know the details for person 3?" @@ -271,12 +271,12 @@ en: page_header: "" age3_known: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age if known" + check_answer_prompt: "Enter person 3’s age if known" hint_text: "" question_text: "Do you know person 3’s age?" age3: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age" + check_answer_prompt: "Enter person 3’s age" hint_text: "" question_text: "Age" @@ -297,7 +297,7 @@ en: details_known_4: page_header: "" check_answer_label: "Details known for person 4?" - check_answer_prompt: "Tell us if you know person 4's details" + check_answer_prompt: "Tell us if you know person 4’s details" hint_text: "" question_text: "Do you know the details for person 4?" @@ -312,12 +312,12 @@ en: page_header: "" age4_known: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age if known" + check_answer_prompt: "Enter person 4’s age if known" hint_text: "" question_text: "Do you know person 4’s age?" age4: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age" + check_answer_prompt: "Enter person 4’s age" hint_text: "" question_text: "Age" @@ -338,7 +338,7 @@ en: details_known_5: page_header: "" check_answer_label: "Details known for person 5?" - check_answer_prompt: "Tell us if you know person 5's details" + check_answer_prompt: "Tell us if you know person 5’s details" hint_text: "" question_text: "Do you know the details for person 5?" @@ -353,12 +353,12 @@ en: page_header: "" age5_known: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age if known" + check_answer_prompt: "Enter person 5’s age if known" hint_text: "" question_text: "Do you know person 5’s age?" age5: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age" + check_answer_prompt: "Enter person 5’s age" hint_text: "" question_text: "Age" @@ -379,7 +379,7 @@ en: details_known_6: page_header: "" check_answer_label: "Details known for person 6?" - check_answer_prompt: "Tell us if you know person 6's details" + check_answer_prompt: "Tell us if you know person 6’s details" hint_text: "" question_text: "Do you know the details for person 6?" @@ -394,12 +394,12 @@ en: page_header: "" age6_known: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age if known" + check_answer_prompt: "Enter person 6’s age if known" hint_text: "" question_text: "Do you know person 6’s age?" age6: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age" + check_answer_prompt: "Enter person 6’s age" hint_text: "" question_text: "Age" diff --git a/config/locales/forms/2023/sales/household_situation.en.yml b/config/locales/forms/2023/sales/household_situation.en.yml index 63131b772..a0a6d8947 100644 --- a/config/locales/forms/2023/sales/household_situation.en.yml +++ b/config/locales/forms/2023/sales/household_situation.en.yml @@ -27,7 +27,7 @@ en: page_header: "" previous_la_known: check_answer_label: "Local authority of buyer 1’s last settled accommodation" - check_answer_prompt: "Enter the local authority of the buyer's last settled accommodation if known" + check_answer_prompt: "Enter the local authority of the buyer’s last settled accommodation if known" hint_text: "This is also known as the household’s 'last settled home'" question_text: "Do you know the local authority of buyer 1’s last settled accommodation?" prevloc: diff --git a/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml index 939849e48..1466630d3 100644 --- a/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2023/sales/income_benefits_and_savings.en.yml @@ -7,7 +7,7 @@ en: page_header: "" income1nk: check_answer_label: "Buyer 1’s gross annual income known" - check_answer_prompt: "Enter buyer 1's gross annual income if known" + check_answer_prompt: "Enter buyer 1’s gross annual income if known" hint_text: "" question_text: "Do you know buyer 1’s annual income?" income1: @@ -27,7 +27,7 @@ en: page_header: "" income2nk: check_answer_label: "Buyer 2’s gross annual income known" - check_answer_prompt: "Enter buyer 2's gross annual income if known" + check_answer_prompt: "Enter buyer 2’s gross annual income if known" hint_text: "" question_text: "Do you know buyer 2’s annual income?" income2: @@ -60,7 +60,7 @@ en: page_header: "" savingsnk: check_answer_label: "Buyers’ total savings" - check_answer_prompt: "Enter buyers' total savings if known" + check_answer_prompt: "Enter buyers’ total savings if known" hint_text: "" question_text: "Do you know how much the buyers had in savings before they paid any deposit for the property?" savings: @@ -72,7 +72,7 @@ en: page_header: "" savingsnk: check_answer_label: "Buyer’s total savings" - check_answer_prompt: "Enter buyer's total savings if known" + check_answer_prompt: "Enter buyer’s total savings if known" hint_text: "" question_text: "Do you know how much the buyer had in savings before they paid any deposit for the property?" savings: diff --git a/config/locales/forms/2023/sales/other_household_information.en.yml b/config/locales/forms/2023/sales/other_household_information.en.yml index b26aa3e9c..54436e15e 100644 --- a/config/locales/forms/2023/sales/other_household_information.en.yml +++ b/config/locales/forms/2023/sales/other_household_information.en.yml @@ -28,7 +28,7 @@ en: page_header: "" check_answer_label: "Household member has a disability" check_answer_prompt: "Tell us if someone has a disability" - hint_text: "This includes any long-term health condition that has an impact on the person's day-to-day life" + hint_text: "This includes any long-term health condition that has an impact on the person’s day-to-day life" question_text: "Does anyone in the household consider themselves to have a disability?" wheel: diff --git a/config/locales/forms/2023/sales/property_information.en.yml b/config/locales/forms/2023/sales/property_information.en.yml index d74af46e3..ec0591281 100644 --- a/config/locales/forms/2023/sales/property_information.en.yml +++ b/config/locales/forms/2023/sales/property_information.en.yml @@ -9,12 +9,12 @@ en: check_answer_label: "UPRN known" check_answer_prompt: "Enter UPRN if known" hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.

The UPRN may not be the same as the property reference assigned by your organisation.

If you don’t know the UPRN you can enter the address of the property instead on the next screen." - question_text: "Do you know the property's UPRN?" + question_text: "Do you know the property’s UPRN?" uprn: check_answer_label: "UPRN" check_answer_prompt: "" hint_text: "" - question_text: "What is the property's UPRN?" + question_text: "What is the property’s UPRN?" uprn_confirmed: page_header: "We found an address that might be this property" @@ -24,7 +24,7 @@ en: question_text: "Is this the property address?" address: - page_header: "Q15 - What is the property's address?" + page_header: "Q15 - What is the property’s address?" address_line1: check_answer_label: "Address lines 1 and 2" check_answer_prompt: "Enter address lines 1 and 2" diff --git a/config/locales/forms/2023/sales/sale_information.en.yml b/config/locales/forms/2023/sales/sale_information.en.yml index 137e95a87..cd46e9a1e 100644 --- a/config/locales/forms/2023/sales/sale_information.en.yml +++ b/config/locales/forms/2023/sales/sale_information.en.yml @@ -32,7 +32,7 @@ en: staircasing: page_header: "" check_answer_label: "Staircasing transaction" - check_answer_prompt: "Tell us if it's a staircasing transaction" + check_answer_prompt: "Tell us if it’s a staircasing transaction" hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property." question_text: "Is this a staircasing transaction?" about_staircasing: @@ -174,11 +174,24 @@ en: question_text: "Does this include any extra borrowing?" deposit: - page_header: "About the deposit" - check_answer_label: "Deposit amount" - check_answer_prompt: "" - hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan" - question_text: "How much cash deposit was paid on the property?" + discounted_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan." + question_text: "How much cash deposit was paid on the property?" + shared_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" + outright_sale: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" cashdis: page_header: "About the deposit" diff --git a/config/locales/forms/2023/sales/soft_validations.en.yml b/config/locales/forms/2023/sales/soft_validations.en.yml index 11e6bea28..71b1653b3 100644 --- a/config/locales/forms/2023/sales/soft_validations.en.yml +++ b/config/locales/forms/2023/sales/soft_validations.en.yml @@ -7,9 +7,9 @@ en: max: page_header: "" check_answer_label: "Retirement confirmation" - check_answer_prompt: "Confirm person isn't retired" + check_answer_prompt: "Confirm person isn’t retired" hint_text: "" - question_text: "Are you sure this person isn't retired?" + question_text: "Are you sure this person isn’t retired?" title_text: "You told us this person is over 66 and not retired." informative_text: "The minimum expected retirement age in England is 66." min: @@ -146,7 +146,7 @@ en: check_answer_label: "Deposit confirmation" check_answer_prompt: "Confirm deposit amount" hint_text: "" - question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" + question_text: "Are you sure that the deposit is this much higher than the buyer’s savings?" title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." not_joint_purchase: @@ -154,7 +154,7 @@ en: check_answer_label: "Deposit confirmation" check_answer_prompt: "Confirm deposit amount" hint_text: "" - question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" + question_text: "Are you sure that the deposit is this much higher than the buyer’s savings?" title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." @@ -196,7 +196,7 @@ en: partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" - check_answer_prompt: "Confirm partner's age" + check_answer_prompt: "Confirm partner’s age" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1." diff --git a/config/locales/forms/2024/lettings/guidance.en.yml b/config/locales/forms/2024/lettings/guidance.en.yml index ba5d152d6..41349c607 100644 --- a/config/locales/forms/2024/lettings/guidance.en.yml +++ b/config/locales/forms/2024/lettings/guidance.en.yml @@ -39,7 +39,7 @@ en: title: "What is a void date?" content: "

Date the property was (legally or contractually) available to let, or for:

    -
  • re-lets: the day after the previous tenant's contract ended
  • +
  • re-lets: the day after the previous tenant’s contract ended
  • new builds: the day the landlord legally first owned the property (‘completion date’)
  • new conversions or acquisitions: completion date, or the day after rehabilitation work ended
  • new leases: the day the landlord got contractual property rights and could let it out to tenants
  • diff --git a/config/locales/forms/2024/lettings/household_characteristics.en.yml b/config/locales/forms/2024/lettings/household_characteristics.en.yml index 574777f21..eb634b51f 100644 --- a/config/locales/forms/2024/lettings/household_characteristics.en.yml +++ b/config/locales/forms/2024/lettings/household_characteristics.en.yml @@ -13,8 +13,8 @@ en: age1: page_header: "" age1_known: - check_answer_label: "Lead tenant's age" - check_answer_prompt: "Enter lead tenant's age if known" + check_answer_label: "Lead tenant’s age" + check_answer_prompt: "Enter lead tenant’s age if known" hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "Do you know the lead tenant’s age?" age1: @@ -92,7 +92,7 @@ en: details_known_2: page_header: "You’ve given us the details for 1 person in the household" check_answer_label: "Details known for person 2" - check_answer_prompt: "Tell us if you know person 2's details" + check_answer_prompt: "Tell us if you know person 2’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 2?" @@ -107,7 +107,7 @@ en: page_header: "" age2_known: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age if known" + check_answer_prompt: "Enter person 2’s age if known" hint_text: "" question_text: "Do you know person 2’s age?" age2: @@ -133,7 +133,7 @@ en: details_known_3: page_header: "You’ve given us the details for 2 people in the household" check_answer_label: "Details known for person 3" - check_answer_prompt: "Tell us if you know person 3's details" + check_answer_prompt: "Tell us if you know person 3’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 3?" @@ -148,7 +148,7 @@ en: page_header: "" age3_known: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age if known" + check_answer_prompt: "Enter person 3’s age if known" hint_text: "" question_text: "Do you know person 3’s age?" age3: @@ -174,7 +174,7 @@ en: details_known_4: page_header: "You’ve given us the details for 3 people in the household" check_answer_label: "Details known for person 4" - check_answer_prompt: "Tell us if you know person 4's details" + check_answer_prompt: "Tell us if you know person 4’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 4?" @@ -189,7 +189,7 @@ en: page_header: "" age4_known: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age if known" + check_answer_prompt: "Enter person 4’s age if known" hint_text: "" question_text: "Do you know person 4’s age?" age4: @@ -215,7 +215,7 @@ en: details_known_5: page_header: "You’ve given us the details for 4 people in the household" check_answer_label: "Details known for person 5" - check_answer_prompt: "Tell us if you know person 5's details" + check_answer_prompt: "Tell us if you know person 5’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 5?" @@ -230,7 +230,7 @@ en: page_header: "" age5_known: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age if known" + check_answer_prompt: "Enter person 5’s age if known" hint_text: "" question_text: "Do you know person 5’s age?" age5: @@ -256,7 +256,7 @@ en: details_known_6: page_header: "You’ve given us the details for 5 people in the household" check_answer_label: "Details known for person 6" - check_answer_prompt: "Tell us if you know person 6's details" + check_answer_prompt: "Tell us if you know person 6’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 6?" @@ -271,7 +271,7 @@ en: page_header: "" age6_known: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age if known" + check_answer_prompt: "Enter person 6’s age if known" hint_text: "" question_text: "Do you know person 6’s age?" age6: @@ -297,7 +297,7 @@ en: details_known_7: page_header: "You’ve given us the details for 6 people in the household" check_answer_label: "Details known for person 7" - check_answer_prompt: "Tell us if you know person 7's details" + check_answer_prompt: "Tell us if you know person 7’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 7?" @@ -312,7 +312,7 @@ en: page_header: "" age7_known: check_answer_label: "Person 7’s age" - check_answer_prompt: "Enter person 7's age if known" + check_answer_prompt: "Enter person 7’s age if known" hint_text: "" question_text: "Do you know person 7’s age?" age7: @@ -338,7 +338,7 @@ en: details_known_8: page_header: "You’ve given us the details for 7 people in the household" check_answer_label: "Details known for person 8" - check_answer_prompt: "Tell us if you know person 8's details" + check_answer_prompt: "Tell us if you know person 8’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 8?" @@ -353,7 +353,7 @@ en: page_header: "" age8_known: check_answer_label: "Person 8’s age" - check_answer_prompt: "Enter person 8's age if known" + check_answer_prompt: "Enter person 8’s age if known" hint_text: "" question_text: "Do you know person 8’s age?" age8: diff --git a/config/locales/forms/2024/lettings/household_situation.en.yml b/config/locales/forms/2024/lettings/household_situation.en.yml index 1caae7373..43eedf692 100644 --- a/config/locales/forms/2024/lettings/household_situation.en.yml +++ b/config/locales/forms/2024/lettings/household_situation.en.yml @@ -80,8 +80,8 @@ en: previous_local_authority: page_header: "" previous_la_known: - check_answer_label: "Local authority of household's last settled accommodation" - check_answer_prompt: "Enter the local authority of the buyer's last settled accommodation if known" + check_answer_label: "Local authority of household’s last settled accommodation" + check_answer_prompt: "Enter the local authority of the buyer’s last settled accommodation if known" hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." question_text: "Do you know the local authority of the household’s last settled accommodation?" prevloc: diff --git a/config/locales/forms/2024/lettings/property_information.en.yml b/config/locales/forms/2024/lettings/property_information.en.yml index 016c78958..68cc75dcb 100644 --- a/config/locales/forms/2024/lettings/property_information.en.yml +++ b/config/locales/forms/2024/lettings/property_information.en.yml @@ -6,7 +6,7 @@ en: first_time_property_let_as_social_housing: page_header: "" check_answer_label: "First time being let as social housing" - check_answer_prompt: "Tell us if it's the first time being let as social housing" + check_answer_prompt: "Tell us if it’s the first time being let as social housing" hint_text: "" question_text: "Is this the first time the property has been let as social housing?" @@ -16,12 +16,12 @@ en: check_answer_label: "UPRN known" check_answer_prompt: "Enter UPRN if known" hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.

    The UPRN may not be the same as the property reference assigned by your organisation.

    If you don’t know the UPRN you can enter the address of the property instead on the next screen." - question_text: "Do you know the property's UPRN?" + question_text: "Do you know the property’s UPRN?" uprn: check_answer_label: "UPRN" check_answer_prompt: "" hint_text: "" - question_text: "What is the property's UPRN?" + question_text: "What is the property’s UPRN?" uprn_confirmed: page_header: "We found an address that might be this property" @@ -51,14 +51,14 @@ en: question_text: "Select the correct address" address_search: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" check_answer_label: "Address" check_answer_prompt: "Enter address or UPRN" hint_text: "For example, '1 Victoria Road' or '10010457355'" question_text: "Enter address or UPRN" address: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" address_line1: check_answer_label: "Address lines 1 and 2" check_answer_prompt: "Enter address lines 1 and 2" diff --git a/config/locales/forms/2024/lettings/setup.en.yml b/config/locales/forms/2024/lettings/setup.en.yml index d3fd4d03c..6e2d5c3da 100644 --- a/config/locales/forms/2024/lettings/setup.en.yml +++ b/config/locales/forms/2024/lettings/setup.en.yml @@ -55,7 +55,7 @@ en: renewal: page_header: "" check_answer_label: "Property renewal" - check_answer_prompt: "Tell us if it's a property renewal" + check_answer_prompt: "Tell us if it’s a property renewal" hint_text: "If the property was previously being used as temporary accommodation, then answer 'no'." question_text: "Is this letting a renewal of social housing to the same tenant in the same property?" diff --git a/config/locales/forms/2024/lettings/soft_validations.en.yml b/config/locales/forms/2024/lettings/soft_validations.en.yml index afb9ec36a..78e87d42e 100644 --- a/config/locales/forms/2024/lettings/soft_validations.en.yml +++ b/config/locales/forms/2024/lettings/soft_validations.en.yml @@ -42,7 +42,7 @@ en: partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" - check_answer_prompt: "Confirm partner's age" + check_answer_prompt: "Confirm partner’s age" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant." diff --git a/config/locales/forms/2024/lettings/tenancy_information.en.yml b/config/locales/forms/2024/lettings/tenancy_information.en.yml index c9e56f943..989b4b448 100644 --- a/config/locales/forms/2024/lettings/tenancy_information.en.yml +++ b/config/locales/forms/2024/lettings/tenancy_information.en.yml @@ -6,14 +6,14 @@ en: joint: page_header: "" check_answer_label: "Joint tenancy" - check_answer_prompt: "Tell us if it's a joint tenancy" + check_answer_prompt: "Tell us if it’s a joint tenancy" hint_text: "This is where two or more people are named on the tenancy agreement" question_text: "Is this a joint tenancy?" startertenancy: page_header: "" check_answer_label: "Starter or introductory tenancy" - check_answer_prompt: "Tell us if it's a starter or introductory tenancy" + check_answer_prompt: "Tell us if it’s a starter or introductory tenancy" hint_text: "If the tenancy has an ‘introductory period’ answer ‘yes’.

    You should submit a CORE log at the beginning of the starter tenancy or introductory period, with the best information you have at the time. You do not need to submit a log when a tenant later rolls onto the main tenancy." question_text: "Is this a starter tenancy?" diff --git a/config/locales/forms/2024/sales/household_characteristics.en.yml b/config/locales/forms/2024/sales/household_characteristics.en.yml index 239958f30..bcac1cf9a 100644 --- a/config/locales/forms/2024/sales/household_characteristics.en.yml +++ b/config/locales/forms/2024/sales/household_characteristics.en.yml @@ -7,12 +7,12 @@ en: page_header: "" age1_known: check_answer_label: "Buyer 1’s age" - check_answer_prompt: "Enter buyer 1's age if known" + check_answer_prompt: "Enter buyer 1’s age if known" hint_text: "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest." question_text: "Do you know buyer 1’s age?" age1: check_answer_label: "Buyer 1’s age" - check_answer_prompt: "Enter buyer 1's age" + check_answer_prompt: "Enter buyer 1’s age" hint_text: "" question_text: "Age" @@ -78,10 +78,10 @@ en: ecstat1: page_header: "" - check_answer_label: "Buyer 1's working situation" + check_answer_label: "Buyer 1’s working situation" check_answer_prompt: "" hint_text: "" - question_text: "Which of these best describes buyer 1's working situation?" + question_text: "Which of these best describes buyer 1’s working situation?" buy1livein: page_header: "" @@ -93,10 +93,10 @@ en: relat2: buyer: page_header: "" - check_answer_label: "Buyer 2's relationship to buyer 1" + check_answer_label: "Buyer 2’s relationship to buyer 1" check_answer_prompt: "" hint_text: "" - question_text: "What is buyer 2's relationship to buyer 1?" + question_text: "What is buyer 2’s relationship to buyer 1?" person: page_header: "" check_answer_label: "Person 2’s relationship to buyer 1" @@ -109,24 +109,24 @@ en: page_header: "" age2_known: check_answer_label: "Buyer 2’s age" - check_answer_prompt: "Enter buyer 2's age if known" + check_answer_prompt: "Enter buyer 2’s age if known" hint_text: "" question_text: "Do you know buyer 2’s age?" age2: check_answer_label: "Buyer 2’s age" - check_answer_prompt: "Enter buyer 2's age" + check_answer_prompt: "Enter buyer 2’s age" hint_text: "" question_text: "Age" person: page_header: "" age2_known: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age if known" + check_answer_prompt: "Enter person 2’s age if known" hint_text: "" question_text: "Do you know person 2’s age?" age2: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age" + check_answer_prompt: "Enter person 2’s age" hint_text: "" question_text: "Age" @@ -200,10 +200,10 @@ en: ecstat2: buyer: page_header: "" - check_answer_label: "Buyer 2's working situation" + check_answer_label: "Buyer 2’s working situation" check_answer_prompt: "" hint_text: "" - question_text: "Which of these best describes buyer 2's working situation?" + question_text: "Which of these best describes buyer 2’s working situation?" person: page_header: "" check_answer_label: "Person 2’s working situation" @@ -235,14 +235,14 @@ en: details_known_2: page_header: "" check_answer_label: "Details known for person 2?" - check_answer_prompt: "Tell us if you know person 2's details" + check_answer_prompt: "Tell us if you know person 2’s details" hint_text: "" question_text: "Do you know the details for person 2?" details_known_3: page_header: "" check_answer_label: "Details known for person 3?" - check_answer_prompt: "Tell us if you know person 3's details" + check_answer_prompt: "Tell us if you know person 3’s details" hint_text: "" question_text: "Do you know the details for person 3?" @@ -257,12 +257,12 @@ en: page_header: "" age3_known: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age if known" + check_answer_prompt: "Enter person 3’s age if known" hint_text: "" question_text: "Do you know person 3’s age?" age3: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age" + check_answer_prompt: "Enter person 3’s age" hint_text: "" question_text: "Age" @@ -283,7 +283,7 @@ en: details_known_4: page_header: "" check_answer_label: "Details known for person 4?" - check_answer_prompt: "Tell us if you know person 4's details" + check_answer_prompt: "Tell us if you know person 4’s details" hint_text: "" question_text: "Do you know the details for person 4?" @@ -298,12 +298,12 @@ en: page_header: "" age4_known: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age if known" + check_answer_prompt: "Enter person 4’s age if known" hint_text: "" question_text: "Do you know person 4’s age?" age4: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age" + check_answer_prompt: "Enter person 4’s age" hint_text: "" question_text: "Age" @@ -324,7 +324,7 @@ en: details_known_5: page_header: "" check_answer_label: "Details known for person 5?" - check_answer_prompt: "Tell us if you know person 5's details" + check_answer_prompt: "Tell us if you know person 5’s details" hint_text: "" question_text: "Do you know the details for person 5?" @@ -339,12 +339,12 @@ en: page_header: "" age5_known: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age if known" + check_answer_prompt: "Enter person 5’s age if known" hint_text: "" question_text: "Do you know person 5’s age?" age5: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age" + check_answer_prompt: "Enter person 5’s age" hint_text: "" question_text: "Age" @@ -365,7 +365,7 @@ en: details_known_6: page_header: "" check_answer_label: "Details known for person 6?" - check_answer_prompt: "Tell us if you know person 6's details" + check_answer_prompt: "Tell us if you know person 6’s details" hint_text: "" question_text: "Do you know the details for person 6?" @@ -380,12 +380,12 @@ en: page_header: "" age6_known: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age if known" + check_answer_prompt: "Enter person 6’s age if known" hint_text: "" question_text: "Do you know person 6’s age?" age6: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age" + check_answer_prompt: "Enter person 6’s age" hint_text: "" question_text: "Age" diff --git a/config/locales/forms/2024/sales/household_situation.en.yml b/config/locales/forms/2024/sales/household_situation.en.yml index 72f68694a..b418e9ad7 100644 --- a/config/locales/forms/2024/sales/household_situation.en.yml +++ b/config/locales/forms/2024/sales/household_situation.en.yml @@ -27,7 +27,7 @@ en: page_header: "" previous_la_known: check_answer_label: "Local authority of buyer 1’s last settled accommodation" - check_answer_prompt: "Enter the local authority of the buyer's last settled accommodation if known" + check_answer_prompt: "Enter the local authority of the buyer’s last settled accommodation if known" hint_text: "This is also known as the household’s 'last settled home'" question_text: "Do you know the local authority of buyer 1’s last settled accommodation?" prevloc: diff --git a/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml index 86fa347fc..8db3cc125 100644 --- a/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2024/sales/income_benefits_and_savings.en.yml @@ -7,7 +7,7 @@ en: page_header: "" income1nk: check_answer_label: "Buyer 1’s gross annual income known" - check_answer_prompt: "Enter buyer 1's gross annual income if known" + check_answer_prompt: "Enter buyer 1’s gross annual income if known" hint_text: "" question_text: "Do you know buyer 1’s annual income?" income1: @@ -27,7 +27,7 @@ en: page_header: "" income2nk: check_answer_label: "Buyer 2’s gross annual income known" - check_answer_prompt: "Enter buyer 2's gross annual income if known" + check_answer_prompt: "Enter buyer 2’s gross annual income if known" hint_text: "" question_text: "Do you know buyer 2’s annual income?" income2: @@ -62,7 +62,7 @@ en: page_header: "" savingsnk: check_answer_label: "Buyers’ total savings" - check_answer_prompt: "Enter buyers' total savings if known" + check_answer_prompt: "Enter buyers’ total savings if known" hint_text: "" question_text: "Do you know how much the buyers had in savings before they paid any deposit for the property?" savings: @@ -74,7 +74,7 @@ en: page_header: "" savingsnk: check_answer_label: "Buyer’s total savings" - check_answer_prompt: "Enter buyer's total savings if known" + check_answer_prompt: "Enter buyer’s total savings if known" hint_text: "" question_text: "Do you know how much the buyer had in savings before they paid any deposit for the property?" savings: diff --git a/config/locales/forms/2024/sales/other_household_information.en.yml b/config/locales/forms/2024/sales/other_household_information.en.yml index 0e6a4e31c..e270c342d 100644 --- a/config/locales/forms/2024/sales/other_household_information.en.yml +++ b/config/locales/forms/2024/sales/other_household_information.en.yml @@ -28,7 +28,7 @@ en: page_header: "" check_answer_label: "Household member has a disability" check_answer_prompt: "Tell us if someone has a disability" - hint_text: "This includes any long-term health condition that has an impact on the person's day-to-day life" + hint_text: "This includes any long-term health condition that has an impact on the person’s day-to-day life" question_text: "Does anyone in the household consider themselves to have a disability?" wheel: diff --git a/config/locales/forms/2024/sales/property_information.en.yml b/config/locales/forms/2024/sales/property_information.en.yml index 518654211..af35d9190 100644 --- a/config/locales/forms/2024/sales/property_information.en.yml +++ b/config/locales/forms/2024/sales/property_information.en.yml @@ -9,12 +9,12 @@ en: check_answer_label: "UPRN known" check_answer_prompt: "Enter UPRN if known" hint_text: "The Unique Property Reference Number (UPRN) is a unique number system created by Ordnance Survey and used by housing providers and various industries across the UK. An example UPRN is 10010457355.

    The UPRN may not be the same as the property reference assigned by your organisation.

    If you don’t know the UPRN you can enter the address of the property instead on the next screen." - question_text: "Do you know the property's UPRN?" + question_text: "Do you know the property’s UPRN?" uprn: check_answer_label: "UPRN" check_answer_prompt: "" hint_text: "" - question_text: "What is the property's UPRN?" + question_text: "What is the property’s UPRN?" uprn_confirmed: page_header: "We found an address that might be this property" @@ -44,14 +44,14 @@ en: question_text: "Select the correct address" address_search: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" check_answer_label: "Address" check_answer_prompt: "Enter address or UPRN" hint_text: "For example, '1 Victoria Road' or '10010457355'" question_text: "Enter address or UPRN" address: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" address_line1: check_answer_label: "Address lines 1 and 2" check_answer_prompt: "Enter address lines 1 and 2" diff --git a/config/locales/forms/2024/sales/sale_information.en.yml b/config/locales/forms/2024/sales/sale_information.en.yml index d03d712a9..e8f898e3a 100644 --- a/config/locales/forms/2024/sales/sale_information.en.yml +++ b/config/locales/forms/2024/sales/sale_information.en.yml @@ -32,7 +32,7 @@ en: staircasing: page_header: "" check_answer_label: "Staircasing transaction" - check_answer_prompt: "Tell us if it's a staircasing transaction" + check_answer_prompt: "Tell us if it’s a staircasing transaction" hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property." question_text: "Is this a staircasing transaction?" about_staircasing: @@ -179,11 +179,24 @@ en: question_text: "Does this include any extra borrowing?" deposit: - page_header: "About the deposit" - check_answer_label: "Deposit amount" - check_answer_prompt: "" - hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan. As this is a fully staircased sale this question is optional. If you do not have the information available click save and continue" - question_text: "How much cash deposit was paid on the property?" + discounted_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan." + question_text: "How much cash deposit was paid on the property?" + shared_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" + outright_sale: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" cashdis: page_header: "About the deposit" diff --git a/config/locales/forms/2024/sales/soft_validations.en.yml b/config/locales/forms/2024/sales/soft_validations.en.yml index 2b75ddbd1..c0c5588fb 100644 --- a/config/locales/forms/2024/sales/soft_validations.en.yml +++ b/config/locales/forms/2024/sales/soft_validations.en.yml @@ -7,9 +7,9 @@ en: max: page_header: "" check_answer_label: "Retirement confirmation" - check_answer_prompt: "Confirm person isn't retired" + check_answer_prompt: "Confirm person isn’t retired" hint_text: "" - question_text: "Are you sure this person isn't retired?" + question_text: "Are you sure this person isn’t retired?" title_text: "You told us this person is over 66 and not retired." informative_text: "The minimum expected retirement age in England is 66." min: @@ -144,7 +144,7 @@ en: check_answer_label: "Deposit confirmation" check_answer_prompt: "Confirm deposit amount" hint_text: "" - question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" + question_text: "Are you sure that the deposit is this much higher than the buyer’s savings?" title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." not_joint_purchase: @@ -152,7 +152,7 @@ en: check_answer_label: "Deposit confirmation" check_answer_prompt: "Confirm deposit amount" hint_text: "" - question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" + question_text: "Are you sure that the deposit is this much higher than the buyer’s savings?" title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." @@ -203,7 +203,7 @@ en: partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" - check_answer_prompt: "Confirm partner's age" + check_answer_prompt: "Confirm partner’s age" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1." diff --git a/config/locales/forms/2025/lettings/guidance.en.yml b/config/locales/forms/2025/lettings/guidance.en.yml index 432735e77..5c9f81c75 100644 --- a/config/locales/forms/2025/lettings/guidance.en.yml +++ b/config/locales/forms/2025/lettings/guidance.en.yml @@ -38,7 +38,7 @@ en: title: "What is a void date?" content: "

    Date the property was (legally or contractually) available to let, or for:

      -
    • re-lets: the day after the previous tenant's contract ended
    • +
    • re-lets: the day after the previous tenant’s contract ended
    • new builds: the day the landlord legally first owned the property (‘completion date’)
    • new conversions or acquisitions: completion date, or the day after rehabilitation work ended
    • new leases: the day the landlord got contractual property rights and could let it out to tenants
    • diff --git a/config/locales/forms/2025/lettings/household_characteristics.en.yml b/config/locales/forms/2025/lettings/household_characteristics.en.yml index c54048973..432b0d08f 100644 --- a/config/locales/forms/2025/lettings/household_characteristics.en.yml +++ b/config/locales/forms/2025/lettings/household_characteristics.en.yml @@ -13,8 +13,8 @@ en: age1: page_header: "" age1_known: - check_answer_label: "Lead tenant's age" - check_answer_prompt: "Enter lead tenant's age if known" + check_answer_label: "Lead tenant’s age" + check_answer_prompt: "Enter lead tenant’s age if known" hint_text: "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest." question_text: "Do you know the lead tenant’s age?" age1: @@ -92,7 +92,7 @@ en: details_known_2: page_header: "You’ve given us the details for 1 person in the household" check_answer_label: "Details known for person 2" - check_answer_prompt: "Tell us if you know person 2's details" + check_answer_prompt: "Tell us if you know person 2’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 2?" @@ -107,7 +107,7 @@ en: page_header: "" age2_known: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age if known" + check_answer_prompt: "Enter person 2’s age if known" hint_text: "" question_text: "Do you know person 2’s age?" age2: @@ -133,7 +133,7 @@ en: details_known_3: page_header: "You’ve given us the details for 2 people in the household" check_answer_label: "Details known for person 3" - check_answer_prompt: "Tell us if you know person 3's details" + check_answer_prompt: "Tell us if you know person 3’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 3?" @@ -148,7 +148,7 @@ en: page_header: "" age3_known: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age if known" + check_answer_prompt: "Enter person 3’s age if known" hint_text: "" question_text: "Do you know person 3’s age?" age3: @@ -174,7 +174,7 @@ en: details_known_4: page_header: "You’ve given us the details for 3 people in the household" check_answer_label: "Details known for person 4" - check_answer_prompt: "Tell us if you know person 4's details" + check_answer_prompt: "Tell us if you know person 4’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 4?" @@ -189,7 +189,7 @@ en: page_header: "" age4_known: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age if known" + check_answer_prompt: "Enter person 4’s age if known" hint_text: "" question_text: "Do you know person 4’s age?" age4: @@ -215,7 +215,7 @@ en: details_known_5: page_header: "You’ve given us the details for 4 people in the household" check_answer_label: "Details known for person 5" - check_answer_prompt: "Tell us if you know person 5's details" + check_answer_prompt: "Tell us if you know person 5’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 5?" @@ -230,7 +230,7 @@ en: page_header: "" age5_known: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age if known" + check_answer_prompt: "Enter person 5’s age if known" hint_text: "" question_text: "Do you know person 5’s age?" age5: @@ -256,7 +256,7 @@ en: details_known_6: page_header: "You’ve given us the details for 5 people in the household" check_answer_label: "Details known for person 6" - check_answer_prompt: "Tell us if you know person 6's details" + check_answer_prompt: "Tell us if you know person 6’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 6?" @@ -271,7 +271,7 @@ en: page_header: "" age6_known: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age if known" + check_answer_prompt: "Enter person 6’s age if known" hint_text: "" question_text: "Do you know person 6’s age?" age6: @@ -297,7 +297,7 @@ en: details_known_7: page_header: "You’ve given us the details for 6 people in the household" check_answer_label: "Details known for person 7" - check_answer_prompt: "Tell us if you know person 7's details" + check_answer_prompt: "Tell us if you know person 7’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 7?" @@ -312,7 +312,7 @@ en: page_header: "" age7_known: check_answer_label: "Person 7’s age" - check_answer_prompt: "Enter person 7's age if known" + check_answer_prompt: "Enter person 7’s age if known" hint_text: "" question_text: "Do you know person 7’s age?" age7: @@ -338,7 +338,7 @@ en: details_known_8: page_header: "You’ve given us the details for 7 people in the household" check_answer_label: "Details known for person 8" - check_answer_prompt: "Tell us if you know person 8's details" + check_answer_prompt: "Tell us if you know person 8’s details" hint_text: "You must provide details for everyone in the household if you know them." question_text: "Do you know details for person 8?" @@ -353,7 +353,7 @@ en: page_header: "" age8_known: check_answer_label: "Person 8’s age" - check_answer_prompt: "Enter person 8's age if known" + check_answer_prompt: "Enter person 8’s age if known" hint_text: "" question_text: "Do you know person 8’s age?" age8: diff --git a/config/locales/forms/2025/lettings/household_situation.en.yml b/config/locales/forms/2025/lettings/household_situation.en.yml index 22c7052eb..549f28810 100644 --- a/config/locales/forms/2025/lettings/household_situation.en.yml +++ b/config/locales/forms/2025/lettings/household_situation.en.yml @@ -80,8 +80,8 @@ en: previous_local_authority: page_header: "" previous_la_known: - check_answer_label: "Local authority of household's last settled accommodation" - check_answer_prompt: "Enter the local authority of the buyer's last settled accommodation if known" + check_answer_label: "Local authority of household’s last settled accommodation" + check_answer_prompt: "Enter the local authority of the buyer’s last settled accommodation if known" hint_text: "This is the tenant’s last long-standing home. It is where the tenant was living before any period in temporary accommodation, sleeping rough or otherwise homeless." question_text: "Do you know the local authority of the household’s last settled accommodation?" prevloc: diff --git a/config/locales/forms/2025/lettings/property_information.en.yml b/config/locales/forms/2025/lettings/property_information.en.yml index 41cf2d3aa..d58be493a 100644 --- a/config/locales/forms/2025/lettings/property_information.en.yml +++ b/config/locales/forms/2025/lettings/property_information.en.yml @@ -6,19 +6,19 @@ en: first_time_property_let_as_social_housing: page_header: "" check_answer_label: "First time being let as social housing" - check_answer_prompt: "Tell us if it's the first time being let as social housing" + check_answer_prompt: "Tell us if it’s the first time being let as social housing" hint_text: "" question_text: "Is this the first time the property has been let as social housing?" address_search: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" check_answer_label: "Address" check_answer_prompt: "Enter address or UPRN" hint_text: "For example, '1 Victoria Road' or '10010457355'" question_text: "Enter address or UPRN" address: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" address_line1: check_answer_label: "Address lines 1 and 2" check_answer_prompt: "Enter address lines 1 and 2" diff --git a/config/locales/forms/2025/lettings/setup.en.yml b/config/locales/forms/2025/lettings/setup.en.yml index bf228f9c9..cdce57421 100644 --- a/config/locales/forms/2025/lettings/setup.en.yml +++ b/config/locales/forms/2025/lettings/setup.en.yml @@ -55,7 +55,7 @@ en: renewal: page_header: "" check_answer_label: "Property renewal" - check_answer_prompt: "Tell us if it's a property renewal" + check_answer_prompt: "Tell us if it’s a property renewal" hint_text: "If the property was previously being used as temporary accommodation, then answer 'no'." question_text: "Is this letting a renewal of social housing to the same tenant in the same property?" diff --git a/config/locales/forms/2025/lettings/soft_validations.en.yml b/config/locales/forms/2025/lettings/soft_validations.en.yml index 8e018b315..2427c18f9 100644 --- a/config/locales/forms/2025/lettings/soft_validations.en.yml +++ b/config/locales/forms/2025/lettings/soft_validations.en.yml @@ -42,7 +42,7 @@ en: partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" - check_answer_prompt: "Confirm partner's age" + check_answer_prompt: "Confirm partner’s age" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant." diff --git a/config/locales/forms/2025/lettings/tenancy_information.en.yml b/config/locales/forms/2025/lettings/tenancy_information.en.yml index d8750b433..fa0fa9089 100644 --- a/config/locales/forms/2025/lettings/tenancy_information.en.yml +++ b/config/locales/forms/2025/lettings/tenancy_information.en.yml @@ -6,14 +6,14 @@ en: joint: page_header: "" check_answer_label: "Joint tenancy" - check_answer_prompt: "Tell us if it's a joint tenancy" + check_answer_prompt: "Tell us if it’s a joint tenancy" hint_text: "This is where two or more people are named on the tenancy agreement" question_text: "Is this a joint tenancy?" startertenancy: page_header: "" check_answer_label: "Starter or introductory tenancy" - check_answer_prompt: "Tell us if it's a starter or introductory tenancy" + check_answer_prompt: "Tell us if it’s a starter or introductory tenancy" hint_text: "If the tenancy has an ‘introductory period’, answer ‘yes’.

      You should submit a CORE log at the beginning of the starter tenancy or introductory period, with the best information you have at the time. You do not need to submit a log when a tenant later rolls onto the main tenancy." question_text: "Is this a starter tenancy?" diff --git a/config/locales/forms/2025/sales/household_characteristics.en.yml b/config/locales/forms/2025/sales/household_characteristics.en.yml index bde557cea..c0dab7df6 100644 --- a/config/locales/forms/2025/sales/household_characteristics.en.yml +++ b/config/locales/forms/2025/sales/household_characteristics.en.yml @@ -7,12 +7,12 @@ en: page_header: "" age1_known: check_answer_label: "Buyer 1’s age" - check_answer_prompt: "Enter buyer 1's age if known" + check_answer_prompt: "Enter buyer 1’s age if known" hint_text: "Buyer 1 is the person in the household who does the most paid work. If it’s a joint purchase and the buyers do the same amount of paid work, buyer 1 is whoever is the oldest." question_text: "Do you know buyer 1’s age?" age1: check_answer_label: "Buyer 1’s age" - check_answer_prompt: "Enter buyer 1's age" + check_answer_prompt: "Enter buyer 1’s age" hint_text: "" question_text: "Age" @@ -78,10 +78,10 @@ en: ecstat1: page_header: "" - check_answer_label: "Buyer 1's working situation" + check_answer_label: "Buyer 1’s working situation" check_answer_prompt: "" hint_text: "" - question_text: "Which of these best describes buyer 1's working situation?" + question_text: "Which of these best describes buyer 1’s working situation?" buy1livein: page_header: "" @@ -109,24 +109,24 @@ en: page_header: "" age2_known: check_answer_label: "Buyer 2’s age" - check_answer_prompt: "Enter buyer 2's age if known" + check_answer_prompt: "Enter buyer 2’s age if known" hint_text: "" question_text: "Do you know buyer 2’s age?" age2: check_answer_label: "Buyer 2’s age" - check_answer_prompt: "Enter buyer 2's age" + check_answer_prompt: "Enter buyer 2’s age" hint_text: "" question_text: "Age" person: page_header: "" age2_known: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age if known" + check_answer_prompt: "Enter person 2’s age if known" hint_text: "" question_text: "Do you know person 2’s age?" age2: check_answer_label: "Person 2’s age" - check_answer_prompt: "Enter person 2's age" + check_answer_prompt: "Enter person 2’s age" hint_text: "" question_text: "Age" @@ -200,10 +200,10 @@ en: ecstat2: buyer: page_header: "" - check_answer_label: "Buyer 2's working situation" + check_answer_label: "Buyer 2’s working situation" check_answer_prompt: "" hint_text: "" - question_text: "Which of these best describes buyer 2's working situation?" + question_text: "Which of these best describes buyer 2’s working situation?" person: page_header: "" check_answer_label: "Person 2’s working situation" @@ -235,14 +235,14 @@ en: details_known_2: page_header: "" check_answer_label: "Details known for person 2?" - check_answer_prompt: "Tell us if you know person 2's details" + check_answer_prompt: "Tell us if you know person 2’s details" hint_text: "" question_text: "Do you know the details for person 2?" details_known_3: page_header: "" check_answer_label: "Details known for person 3?" - check_answer_prompt: "Tell us if you know person 3's details" + check_answer_prompt: "Tell us if you know person 3’s details" hint_text: "" question_text: "Do you know the details for person 3?" @@ -257,12 +257,12 @@ en: page_header: "" age3_known: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age if known" + check_answer_prompt: "Enter person 3’s age if known" hint_text: "" question_text: "Do you know person 3’s age?" age3: check_answer_label: "Person 3’s age" - check_answer_prompt: "Enter person 3's age" + check_answer_prompt: "Enter person 3’s age" hint_text: "" question_text: "Age" @@ -283,7 +283,7 @@ en: details_known_4: page_header: "" check_answer_label: "Details known for person 4?" - check_answer_prompt: "Tell us if you know person 4's details" + check_answer_prompt: "Tell us if you know person 4’s details" hint_text: "" question_text: "Do you know the details for person 4?" @@ -298,12 +298,12 @@ en: page_header: "" age4_known: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age if known" + check_answer_prompt: "Enter person 4’s age if known" hint_text: "" question_text: "Do you know person 4’s age?" age4: check_answer_label: "Person 4’s age" - check_answer_prompt: "Enter person 4's age" + check_answer_prompt: "Enter person 4’s age" hint_text: "" question_text: "Age" @@ -324,7 +324,7 @@ en: details_known_5: page_header: "" check_answer_label: "Details known for person 5?" - check_answer_prompt: "Tell us if you know person 5's details" + check_answer_prompt: "Tell us if you know person 5’s details" hint_text: "" question_text: "Do you know the details for person 5?" @@ -339,12 +339,12 @@ en: page_header: "" age5_known: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age if known" + check_answer_prompt: "Enter person 5’s age if known" hint_text: "" question_text: "Do you know person 5’s age?" age5: check_answer_label: "Person 5’s age" - check_answer_prompt: "Enter person 5's age" + check_answer_prompt: "Enter person 5’s age" hint_text: "" question_text: "Age" @@ -365,7 +365,7 @@ en: details_known_6: page_header: "" check_answer_label: "Details known for person 6?" - check_answer_prompt: "Tell us if you know person 6's details" + check_answer_prompt: "Tell us if you know person 6’s details" hint_text: "" question_text: "Do you know the details for person 6?" @@ -380,12 +380,12 @@ en: page_header: "" age6_known: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age if known" + check_answer_prompt: "Enter person 6’s age if known" hint_text: "" question_text: "Do you know person 6’s age?" age6: check_answer_label: "Person 6’s age" - check_answer_prompt: "Enter person 6's age" + check_answer_prompt: "Enter person 6’s age" hint_text: "" question_text: "Age" diff --git a/config/locales/forms/2025/sales/household_situation.en.yml b/config/locales/forms/2025/sales/household_situation.en.yml index 0888fc84c..1b2f066e8 100644 --- a/config/locales/forms/2025/sales/household_situation.en.yml +++ b/config/locales/forms/2025/sales/household_situation.en.yml @@ -27,7 +27,7 @@ en: page_header: "" previous_la_known: check_answer_label: "Local authority of buyer 1’s last settled accommodation" - check_answer_prompt: "Enter the local authority of the buyer's last settled accommodation if known" + check_answer_prompt: "Enter the local authority of the buyer’s last settled accommodation if known" hint_text: "This is also known as the household’s 'last settled home'" question_text: "Do you know the local authority of buyer 1’s last settled accommodation?" prevloc: diff --git a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml index eacbd1b33..d81f44fbb 100644 --- a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml @@ -7,7 +7,7 @@ en: page_header: "" income1nk: check_answer_label: "Buyer 1’s gross annual income known" - check_answer_prompt: "Enter buyer 1's gross annual income if known" + check_answer_prompt: "Enter buyer 1’s gross annual income if known" hint_text: "" question_text: "Do you know buyer 1’s annual income?" income1: @@ -27,7 +27,7 @@ en: page_header: "" income2nk: check_answer_label: "Buyer 2’s gross annual income known" - check_answer_prompt: "Enter buyer 2's gross annual income if known" + check_answer_prompt: "Enter buyer 2’s gross annual income if known" hint_text: "" question_text: "Do you know buyer 2’s annual income?" income2: @@ -62,7 +62,7 @@ en: page_header: "" savingsnk: check_answer_label: "Buyers’ total savings" - check_answer_prompt: "Enter buyers' total savings if known" + check_answer_prompt: "Enter buyers’ total savings if known" hint_text: "" question_text: "Do you know how much the buyers had in savings before they paid any deposit for the property?" savings: @@ -74,7 +74,7 @@ en: page_header: "" savingsnk: check_answer_label: "Buyer’s total savings" - check_answer_prompt: "Enter buyer's total savings if known" + check_answer_prompt: "Enter buyer’s total savings if known" hint_text: "" question_text: "Do you know how much the buyer had in savings before they paid any deposit for the property?" savings: diff --git a/config/locales/forms/2025/sales/other_household_information.en.yml b/config/locales/forms/2025/sales/other_household_information.en.yml index b9f88ce7b..a36becd8a 100644 --- a/config/locales/forms/2025/sales/other_household_information.en.yml +++ b/config/locales/forms/2025/sales/other_household_information.en.yml @@ -28,7 +28,7 @@ en: page_header: "" check_answer_label: "Household member has a disability" check_answer_prompt: "Tell us if someone has a disability" - hint_text: "This includes any long-term health condition that has an impact on the person's day-to-day life" + hint_text: "This includes any long-term health condition that has an impact on the person’s day-to-day life" question_text: "Does anyone in the household consider themselves to have a disability?" wheel: diff --git a/config/locales/forms/2025/sales/property_information.en.yml b/config/locales/forms/2025/sales/property_information.en.yml index e91089bc5..d85fbb4f8 100644 --- a/config/locales/forms/2025/sales/property_information.en.yml +++ b/config/locales/forms/2025/sales/property_information.en.yml @@ -4,14 +4,14 @@ en: sales: property_information: address_search: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" check_answer_label: "Address" check_answer_prompt: "Enter address or UPRN" hint_text: "For example, '1 Victoria Road' or '10010457355'" question_text: "Enter address or UPRN" address: - page_header: "What is the property's address?" + page_header: "What is the property’s address?" address_line1: check_answer_label: "Address lines 1 and 2" check_answer_prompt: "Enter address lines 1 and 2" diff --git a/config/locales/forms/2025/sales/sale_information.en.yml b/config/locales/forms/2025/sales/sale_information.en.yml index ba38c3540..e81e82940 100644 --- a/config/locales/forms/2025/sales/sale_information.en.yml +++ b/config/locales/forms/2025/sales/sale_information.en.yml @@ -212,11 +212,18 @@ en: question_text: "Does this include any extra borrowing?" deposit: - page_header: "About the deposit" - check_answer_label: "Deposit amount" - check_answer_prompt: "" - hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan." - question_text: "How much cash deposit was paid on the property?" + discounted_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan." + question_text: "How much cash deposit was paid on the property?" + shared_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" cashdis: page_header: "About the deposit" diff --git a/config/locales/forms/2025/sales/setup.en.yml b/config/locales/forms/2025/sales/setup.en.yml index 3f29f9a18..66027825f 100644 --- a/config/locales/forms/2025/sales/setup.en.yml +++ b/config/locales/forms/2025/sales/setup.en.yml @@ -48,7 +48,7 @@ en: staircasing: page_header: "" check_answer_label: "Staircasing transaction" - check_answer_prompt: "Tell us if it's a staircasing transaction" + check_answer_prompt: "Tell us if it’s a staircasing transaction" hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property." question_text: "Is this a staircasing transaction?" diff --git a/config/locales/forms/2025/sales/soft_validations.en.yml b/config/locales/forms/2025/sales/soft_validations.en.yml index 0e0afeb99..c6c3bf460 100644 --- a/config/locales/forms/2025/sales/soft_validations.en.yml +++ b/config/locales/forms/2025/sales/soft_validations.en.yml @@ -7,9 +7,9 @@ en: max: page_header: "" check_answer_label: "Retirement confirmation" - check_answer_prompt: "Confirm person isn't retired" + check_answer_prompt: "Confirm person isn’t retired" hint_text: "" - question_text: "Are you sure this person isn't retired?" + question_text: "Are you sure this person isn’t retired?" title_text: "You told us this person is over 66 and not retired." informative_text: "The minimum expected retirement age in England is 66." min: @@ -144,7 +144,7 @@ en: check_answer_label: "Deposit confirmation" check_answer_prompt: "Confirm deposit amount" hint_text: "" - question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" + question_text: "Are you sure that the deposit is this much higher than the buyer’s savings?" title_text: "You told us the buyers’ deposit was %{deposit} and their savings were %{savings}." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." not_joint_purchase: @@ -152,7 +152,7 @@ en: check_answer_label: "Deposit confirmation" check_answer_prompt: "Confirm deposit amount" hint_text: "" - question_text: "Are you sure that the deposit is this much higher than the buyer's savings?" + question_text: "Are you sure that the deposit is this much higher than the buyer’s savings?" title_text: "You told us the buyer’s deposit was %{deposit} and their savings were %{savings}." informative_text: "The deposit amount is higher than we would expect for the amount of savings they have." @@ -194,7 +194,7 @@ en: partner_under_16_value_check: page_header: "" check_answer_label: "Partner under 16 confirmation" - check_answer_prompt: "Confirm partner's age" + check_answer_prompt: "Confirm partner’s age" hint_text: "" question_text: "Are you sure this is correct?" title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1." diff --git a/config/locales/validations/lettings/2024/bulk_upload.en.yml b/config/locales/validations/lettings/2024/bulk_upload.en.yml index 0413972f7..857ce7f57 100644 --- a/config/locales/validations/lettings/2024/bulk_upload.en.yml +++ b/config/locales/validations/lettings/2024/bulk_upload.en.yml @@ -38,7 +38,7 @@ en: condition_effects: no_choices: "You cannot answer this question as you told us nobody in the household has a physical or mental health condition (or other illness) expected to last 12 months or more." reason: - renewal_reason_needed: "You said this letting is a renewal to the same tenant in the same property in the set up section. This means the tenant's main reason for the household leaving their last settled home must be \"End of social or private sector tenancy - no fault\", \"End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)\", \"End of social or private sector tenancy - evicted due to rent arrears\" or \"End of social or private sector tenancy - evicted for any other reason\"." + renewal_reason_needed: "You said this letting is a renewal to the same tenant in the same property in the set up section. This means the tenant’s main reason for the household leaving their last settled home must be \"End of social or private sector tenancy - no fault\", \"End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)\", \"End of social or private sector tenancy - evicted due to rent arrears\" or \"End of social or private sector tenancy - evicted for any other reason\"." referral: general_needs_prp_referred_by_la: "The source of the referral cannot be referred by local authority housing department for a general needs log." nominated_by_local_ha_but_la: "The source of the referral cannot be Nominated by local housing authority as your organisation is a local authority." @@ -63,3 +63,5 @@ en: conflict: dont_know: "You cannot select 'Don't know' if any of the other reasonable preference reasons are also selected." other: "You cannot select this reasonable preference reason as you've also selected 'Don't know' as a reason." + prevten: + invalid: "You said this letting is a renewal to the same tenant in the same property in the set up section. This means where the household was immediately before this letting must be \"Fixed-term local authority general needs tenancy\", \"Fixed-term private registered provider (PRP) general needs tenancy\", \"Lifetime local authority general needs tenancy\", \"Lifetime private registered provider (PRP) general needs tenancy\", \"Extra care housing\", \"Specialist retirement housing\", \"Sheltered housing for adults under 55 years\" or \"Other supported housing.\"" diff --git a/config/locales/validations/lettings/2025/bulk_upload.en.yml b/config/locales/validations/lettings/2025/bulk_upload.en.yml index 500dbdaa9..5612750f7 100644 --- a/config/locales/validations/lettings/2025/bulk_upload.en.yml +++ b/config/locales/validations/lettings/2025/bulk_upload.en.yml @@ -63,3 +63,5 @@ en: conflict: dont_know: "You cannot select 'Don't know' if any of the other reasonable preference reasons are also selected." other: "You cannot select this reasonable preference reason as you've also selected 'Don't know' as a reason." + prevten: + invalid: "You said this letting is a renewal to the same tenant in the same property in the set up section. This means where the household was immediately before this letting must be \"Fixed-term local authority general needs tenancy\", \"Fixed-term private registered provider (PRP) general needs tenancy\", \"Lifetime local authority general needs tenancy\", \"Lifetime private registered provider (PRP) general needs tenancy\", \"Extra care housing\", \"Older people's housing for tenants with low support needs\" or \"Other supported housing.\"" diff --git a/config/locales/validations/lettings/household.en.yml b/config/locales/validations/lettings/household.en.yml index ed27bcca6..0040e1374 100644 --- a/config/locales/validations/lettings/household.en.yml +++ b/config/locales/validations/lettings/household.en.yml @@ -67,7 +67,7 @@ en: same_la_just_moved_to_area: "You told us the tenant had just moved into the local authority, but this location is in the same local authority. Check your answers are correct" age: - child_under_16_relat: "Answer cannot be under 16 as person %{person_num}'s relationship to the lead tenant is ‘partner’." + child_under_16_relat: "Answer cannot be under 16 as person %{person_num}’s relationship to the lead tenant is ‘partner’." child_under_16_ecstat: "Answer cannot be under 16 as person %{person_num}’s working situation is not ‘child under 16’, ‘other’ or ‘prefers not to say’." child_over_16: "Answer cannot be over 16 as person’s %{person_num} working situation is ‘child under 16‘." student_16_19: @@ -87,7 +87,7 @@ en: relat: one_partner: "Number of partners cannot be greater than 1." - child_under_16: "Answer cannot be ‘partner’ as you told us person %{person_num}'s age is under 16." + child_under_16: "Answer cannot be ‘partner’ as you told us person %{person_num}’s age is under 16." student_16_19: cannot_be_child: student_not_16_19: "Answer cannot be ‘child’ if the person is a student but not aged 16-19." @@ -107,3 +107,6 @@ en: la_general_needs: internal_transfer: "Answer cannot be internal transfer as it’s the same landlord on the tenancy agreement and the household had either a fixed-term or lifetime local authority general needs tenancy immediately before this letting." + referral_type: + leaving_last_settled_home: + reason_permanently_decanted: "Answer must be from a PRP-only housing register or waiting list (no local authority involvement) as the tenant was permanently decanted from another property owned by this landlord." diff --git a/config/locales/validations/lettings/tenancy.en.yml b/config/locales/validations/lettings/tenancy.en.yml index 4c053e9ae..c196f5ef6 100644 --- a/config/locales/validations/lettings/tenancy.en.yml +++ b/config/locales/validations/lettings/tenancy.en.yml @@ -9,17 +9,17 @@ en: tenancylength: invalid_fixed_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type." invalid_periodic_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type." - fixed_term_not_required: "You must only answer the length of the tenancy if it's fixed-term." + fixed_term_not_required: "You must only answer the length of the tenancy if it’s fixed-term." tenancy: invalid_fixed_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type." invalid_periodic_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type." - fixed_term_not_required: "You must only answer the length of the tenancy if it's fixed-term." + fixed_term_not_required: "You must only answer the length of the tenancy if it’s fixed-term." rent_type: invalid_fixed_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years for a tenancy of this type." invalid_periodic_tenancylength: "Enter a tenancy length between %{min_tenancy_length} and 99 years (or don't specify the length) for a tenancy of this type." joint: - sole_tenancy: "This cannot be a joint tenancy as you've told us there's only one person in the household." + sole_tenancy: "This cannot be a joint tenancy as you've told us there’s only one person in the household." multiple_members_required: "There must be more than one person in the household as you've told us this is a joint tenancy." diff --git a/config/locales/validations/sales/2024/bulk_upload.en.yml b/config/locales/validations/sales/2024/bulk_upload.en.yml index 31daa09f7..a0f390d4c 100644 --- a/config/locales/validations/sales/2024/bulk_upload.en.yml +++ b/config/locales/validations/sales/2024/bulk_upload.en.yml @@ -29,15 +29,15 @@ en: outside_collection_window: "Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}." year_not_two_or_four_digits: "Sale completion year must be 2 or 4 digits." ecstat1: - buyer_cannot_be_over_16_and_child: "Buyer 1's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 1’s age cannot be 16 or over if their working situation is child under 16." buyer_cannot_be_child: "Buyer 1 cannot have a working situation of child under 16." age1: - buyer_cannot_be_over_16_and_child: "Buyer 1's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 1’s age cannot be 16 or over if their working situation is child under 16." ecstat2: - buyer_cannot_be_over_16_and_child: "Buyer 2's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 2’s age cannot be 16 or over if their working situation is child under 16." buyer_cannot_be_child: "Buyer 2 cannot have a working situation of child under 16." age2: - buyer_cannot_be_over_16_and_child: "Buyer 2's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 2’s age cannot be 16 or over if their working situation is child under 16." address: not_found: "We could not find this address. Check the address data in your CSV file is correct and complete, or find the correct address in the service." not_determined: diff --git a/config/locales/validations/sales/2025/bulk_upload.en.yml b/config/locales/validations/sales/2025/bulk_upload.en.yml index c9d194fd0..48448c665 100644 --- a/config/locales/validations/sales/2025/bulk_upload.en.yml +++ b/config/locales/validations/sales/2025/bulk_upload.en.yml @@ -29,15 +29,15 @@ en: outside_collection_window: "Enter a date within the %{year_combo} collection year, which is between 1st April %{start_year} and 31st March %{end_year}." year_not_two_or_four_digits: "Sale completion year must be 2 or 4 digits." ecstat1: - buyer_cannot_be_over_16_and_child: "Buyer 1's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 1’s age cannot be 16 or over if their working situation is child under 16." buyer_cannot_be_child: "Buyer 1 cannot have a working situation of child under 16." age1: - buyer_cannot_be_over_16_and_child: "Buyer 1's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 1’s age cannot be 16 or over if their working situation is child under 16." ecstat2: - buyer_cannot_be_over_16_and_child: "Buyer 2's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 2’s age cannot be 16 or over if their working situation is child under 16." buyer_cannot_be_child: "Buyer 2 cannot have a working situation of child under 16." age2: - buyer_cannot_be_over_16_and_child: "Buyer 2's age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer 2’s age cannot be 16 or over if their working situation is child under 16." address: not_found: "We could not find this address. Check the address data in your CSV file is correct and complete, or select the correct address using the CORE site." not_determined: "There are multiple matches for this address. Either select the correct address manually or correct the UPRN in the CSV file." diff --git a/config/locales/validations/sales/financial.en.yml b/config/locales/validations/sales/financial.en.yml index c8a962079..6e248e6e0 100644 --- a/config/locales/validations/sales/financial.en.yml +++ b/config/locales/validations/sales/financial.en.yml @@ -37,10 +37,10 @@ en: outside_non_london_income_range: "Income must be between £0 and £80,000 for properties in a non-London local authority." combined_over_hard_max_for_london: "Combined income must be £90,000 or lower for properties within a London local authority." combined_over_hard_max_for_outside_london: "Combined income must be £80,000 or lower for properties outside London local authorities." - child_has_income: "Child's income must be £0." + child_has_income: "Child’s income must be £0." ecstat2: - child_has_income: "Child's income must be £0." + child_has_income: "Child’s income must be £0." mortgage: mortgage_zero: "Mortgage value cannot be £0 if a mortgage was used for the purchase of this property." diff --git a/config/locales/validations/sales/household.en.yml b/config/locales/validations/sales/household.en.yml index c1f90971c..b1cb21b39 100644 --- a/config/locales/validations/sales/household.en.yml +++ b/config/locales/validations/sales/household.en.yml @@ -20,7 +20,7 @@ en: buyer_cannot_be_child: "Buyer 2 cannot have a working situation of child under 16." age: child_12_years_younger: "A child must be at least 12 years younger than their parent." - child_under_16: "Answer cannot be under 16 as person %{person_num}'s relationship to buyer 1 is ‘partner’." + child_under_16: "Answer cannot be under 16 as person %{person_num}’s relationship to buyer 1 is ‘partner’." child_under_16_ecstat: "Answer cannot be under 16 as person %{person_num}’s working situation is not ‘child under 16’, ‘other’ or ‘prefers not to say’." child_over_16: "Answer cannot be over 16 as person’s %{person_num} working situation is ‘child under 16‘." child_over_20: "Answer cannot be 20 or over as the relationship is ‘child’." @@ -31,8 +31,8 @@ en: relat: one_partner: "Number of partners cannot be greater than 1." child_12_years_younger: "A child must be at least 12 years younger than their parent." - child_under_16: "Answer cannot be ‘partner’ as you told us person %{person_num}'s age is under 16." - child_over_20: "Answer cannot be ‘child’ if the person's age is 20 or over." + child_under_16: "Answer cannot be ‘partner’ as you told us person %{person_num}’s age is under 16." + child_over_20: "Answer cannot be ‘child’ if the person’s age is 20 or over." student_16_19: cannot_be_child: student_not_16_19: "Answer cannot be ‘child’ if the person is a student but not aged 16-19." @@ -44,4 +44,4 @@ en: must_be_student: "Person must be a student if they are aged 16-19 and have relationship ‘child’." cannot_be_student: child_not_16_19: "Person cannot be a student if they are not aged 16-19 but have relationship ‘child’." - buyer_cannot_be_over_16_and_child: "Buyer %{buyer_index}'s age cannot be 16 or over if their working situation is child under 16." + buyer_cannot_be_over_16_and_child: "Buyer %{buyer_index}’s age cannot be 16 or over if their working situation is child under 16." diff --git a/lib/tasks/generate_lettings_documentation.rake b/lib/tasks/generate_lettings_documentation.rake index e87fd8dca..5c2ff6f20 100644 --- a/lib/tasks/generate_lettings_documentation.rake +++ b/lib/tasks/generate_lettings_documentation.rake @@ -1,57 +1,68 @@ namespace :generate_lettings_documentation do desc "Generate documentation for hard lettings validations" - task describe_lettings_validations: :environment do + task :describe_lettings_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_lettings_documentation:describe_lettings_validations['year']" if form_year.blank? + + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "lettings")] + raise "No form found for given year" if form.blank? + client = OpenAI::Client.new(access_token: ENV["OPENAI_API_KEY"]) - include Validations::SetupValidations - include Validations::HouseholdValidations - include Validations::PropertyValidations - include Validations::FinancialValidations - include Validations::TenancyValidations - include Validations::DateValidations - include Validations::LocalAuthorityValidations - all_validation_methods = public_methods.select { |method| method.starts_with?("validate_") } - all_methods = [Validations::SetupValidations, - Validations::HouseholdValidations, - Validations::PropertyValidations, - Validations::FinancialValidations, - Validations::TenancyValidations, - Validations::DateValidations, - Validations::LocalAuthorityValidations].map { |x| x.instance_methods + x.private_instance_methods }.flatten - all_helper_methods = all_methods - all_validation_methods - - DocumentationGenerator.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, "lettings") + + documentation_generator = DocumentationGenerator.new + validation_classes = [Validations::SetupValidations, + Validations::HouseholdValidations, + Validations::PropertyValidations, + Validations::FinancialValidations, + Validations::TenancyValidations, + Validations::DateValidations, + Validations::LocalAuthorityValidations] + all_validation_methods, all_helper_methods = documentation_generator.validation_and_helper_methods(validation_classes) + + documentation_generator.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, "lettings") end desc "Generate documentation for soft lettings validations" - task describe_soft_lettings_validations: :environment do - include Validations::SoftValidations + task :describe_soft_lettings_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_lettings_documentation:describe_soft_lettings_validations['year']" if form_year.blank? - client = OpenAI::Client.new(access_token: ENV["OPENAI_API_KEY"]) + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "lettings")] + raise "No form found for given year" if form.blank? - all_helper_methods = Validations::SoftValidations.private_instance_methods - all_validation_methods = Validations::SoftValidations.instance_methods + client = OpenAI::Client.new(access_token: ENV["OPENAI_API_KEY"]) + documentation_generator = DocumentationGenerator.new + all_helper_methods, all_validation_methods = documentation_generator.get_soft_lettings_methods - DocumentationGenerator.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, "lettings") + documentation_generator.describe_soft_validations(client, form, all_validation_methods, all_helper_methods, "lettings") end desc "Generate documentation for hard bu lettings validations" - task describe_bu_lettings_validations: :environment do + task :describe_bu_lettings_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_lettings_documentation:describe_bu_lettings_validations['year']" if form_year.blank? + + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "lettings")] + raise "No form found for given year" if form.blank? + + row_parser_class = "BulkUpload::Lettings::Year#{form_year}::RowParser".constantize client = OpenAI::Client.new(access_token: ENV["OPENAI_API_KEY"]) - [[FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(2023, "lettings")], BulkUpload::Lettings::Year2023::RowParser], - [FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(2024, "lettings")], BulkUpload::Lettings::Year2024::RowParser]].each do |form, row_parser_class| - all_validation_methods = row_parser_class.private_instance_methods.select { |method| method.starts_with?("validate_") } + all_validation_methods = row_parser_class.private_instance_methods.select { |method| method.starts_with?("validate_") } - all_helper_methods = row_parser_class.private_instance_methods(false) + row_parser_class.instance_methods(false) - all_validation_methods + all_helper_methods = row_parser_class.private_instance_methods(false) + row_parser_class.instance_methods(false) - all_validation_methods - field_mapping_for_errors = row_parser_class.new.send("field_mapping_for_errors") - DocumentationGenerator.new.describe_bu_validations(client, form, row_parser_class, all_validation_methods, all_helper_methods, field_mapping_for_errors, "lettings") - end + field_mapping_for_errors = row_parser_class.new.send("field_mapping_for_errors") + DocumentationGenerator.new.describe_bu_validations(client, form, row_parser_class, all_validation_methods, all_helper_methods, field_mapping_for_errors, "lettings") end desc "Generate documentation for lettings numeric validations" - task add_numeric_lettings_validations: :environment do - form = FormHandler.instance.forms["current_lettings"] + task :add_numeric_lettings_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_lettings_documentation:add_numeric_lettings_validations['year']" if form_year.blank? + + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "lettings")] + raise "No form found for given year" if form.blank? form.numeric_questions.each do |question| next unless question.min || question.max diff --git a/lib/tasks/generate_sales_documentation.rake b/lib/tasks/generate_sales_documentation.rake index c595c4f18..4a7ff7568 100644 --- a/lib/tasks/generate_sales_documentation.rake +++ b/lib/tasks/generate_sales_documentation.rake @@ -1,56 +1,65 @@ namespace :generate_sales_documentation do desc "Generate documentation for hard sales validations" - task describe_sales_validations: :environment do + task :describe_sales_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_sales_documentation:describe_sales_validations['year']" if form_year.blank? + + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "sales")] + raise "No form found for given year" if form.blank? + client = OpenAI::Client.new(access_token: ENV["OPENAI_API_KEY"]) - include Validations::Sales::SetupValidations - include Validations::Sales::HouseholdValidations - include Validations::Sales::PropertyValidations - include Validations::Sales::FinancialValidations - include Validations::Sales::SaleInformationValidations - include Validations::SharedValidations - include Validations::LocalAuthorityValidations - all_validation_methods = public_methods.select { |method| method.starts_with?("validate_") } - all_methods = [Validations::Sales::SetupValidations, - Validations::Sales::HouseholdValidations, - Validations::Sales::PropertyValidations, - Validations::Sales::FinancialValidations, - Validations::Sales::SaleInformationValidations, - Validations::SharedValidations, - Validations::LocalAuthorityValidations].map { |x| x.instance_methods + x.private_instance_methods }.flatten - - all_helper_methods = all_methods - all_validation_methods - - DocumentationGenerator.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, "sales") + + documentation_generator = DocumentationGenerator.new + validation_classes = [Validations::Sales::SetupValidations, + Validations::Sales::HouseholdValidations, + Validations::Sales::PropertyValidations, + Validations::Sales::FinancialValidations, + Validations::Sales::SaleInformationValidations, + Validations::SharedValidations, + Validations::LocalAuthorityValidations] + all_validation_methods, all_helper_methods = documentation_generator.validation_and_helper_methods(validation_classes) + documentation_generator.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, "sales") end desc "Generate documentation for soft sales validations" - task describe_soft_sales_validations: :environment do - include Validations::SoftValidations - include Validations::Sales::SoftValidations + task :describe_soft_sales_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_sales_documentation:describe_soft_sales_validations['year']" if form_year.blank? + + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "sales")] + raise "No form found for given year" if form.blank? client = OpenAI::Client.new(access_token: ENV["OPENAI_API_KEY"]) - all_helper_methods = Validations::SoftValidations.private_instance_methods + Validations::Sales::SoftValidations.private_instance_methods - all_validation_methods = Validations::SoftValidations.instance_methods + Validations::Sales::SoftValidations.instance_methods + documentation_generator = DocumentationGenerator.new + all_helper_methods, all_validation_methods = documentation_generator.get_soft_sales_methods - DocumentationGenerator.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, "sales") + documentation_generator.describe_soft_validations(client, form, all_validation_methods, all_helper_methods, "sales") end desc "Generate documentation for hard bu sales validations" - task describe_bu_sales_validations: :environment do + task :describe_bu_sales_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_sales_documentation:describe_bu_sales_validations['year']" if form_year.blank? + + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "sales")] + raise "No form found for given year" if form.blank? + + row_parser_class = "BulkUpload::Sales::Year#{form_year}::RowParser".constantize client = OpenAI::Client.new(access_token: ENV["OPENAI_API_KEY"]) - [[FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(2023, "sales")], BulkUpload::Sales::Year2023::RowParser], - [FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(2024, "sales")], BulkUpload::Sales::Year2024::RowParser]].each do |form, row_parser_class| - all_validation_methods = row_parser_class.private_instance_methods.select { |method| method.starts_with?("validate_") } - all_helper_methods = row_parser_class.private_instance_methods(false) + row_parser_class.instance_methods(false) - all_validation_methods - field_mapping_for_errors = row_parser_class.new.send("field_mapping_for_errors") + all_validation_methods = row_parser_class.private_instance_methods.select { |method| method.starts_with?("validate_") } + all_helper_methods = row_parser_class.private_instance_methods(false) + row_parser_class.instance_methods(false) - all_validation_methods + field_mapping_for_errors = row_parser_class.new.send("field_mapping_for_errors") - DocumentationGenerator.new.describe_bu_validations(client, form, row_parser_class, all_validation_methods, all_helper_methods, field_mapping_for_errors, "sales") - end + DocumentationGenerator.new.describe_bu_validations(client, form, row_parser_class, all_validation_methods, all_helper_methods, field_mapping_for_errors, "sales") end desc "Generate documentation for sales numeric validations" - task add_numeric_sales_validations: :environment do - form = FormHandler.instance.forms["current_sales"] + task :add_numeric_sales_validations, %i[year] => :environment do |_task, args| + form_year = args[:year]&.to_i + raise "Usage: rake generate_sales_documentation:add_numeric_sales_validations['year']" if form_year.blank? + + form = FormHandler.instance.forms[FormHandler.instance.form_name_from_start_year(form_year, "sales")] + raise "No form found for given year" if form.blank? form.numeric_questions.each do |question| next unless question.min || question.max diff --git a/lib/tasks/recalculate_nocharges.rake b/lib/tasks/recalculate_nocharges.rake new file mode 100644 index 000000000..abf4d2c73 --- /dev/null +++ b/lib/tasks/recalculate_nocharges.rake @@ -0,0 +1,56 @@ +namespace :bulk_update do + desc "Update nocharge with household_charge for current logs" + task update_current_logs_nocharges: :environment do + updated_logs_count = 0 + status_changed_logs = [] + + logs = LettingsLog.where(startdate: Time.zone.local(2024, 4, 1)...Time.zone.local(2026, 4, 1)).where.not("nocharge = household_charge") + puts "Updating logs with startdate between 2024-04-01 and 2026-04-01" + puts "Total logs to update: #{logs.count}" + + logs.find_each do |log| + status_pre_change = log.status + + log.nocharge = log.household_charge + if log.save(validate: false) + updated_logs_count += 1 + Rails.logger.info "Updated nocharge for log #{log.id}" + else + Rails.logger.error "Failed to update log #{log.id}: #{log.errors.full_messages.join(', ')}" + end + + status_post_change = log.status + status_changed_logs << log.id if status_pre_change != status_post_change + end + + puts "#{updated_logs_count} logs were updated." + puts "Logs with changed status: [#{status_changed_logs.join(', ')}]" + end + + desc "Update nocharge with household_charge for older logs" + task update_older_logs_nocharges: :environment do + updated_logs_count = 0 + status_changed_logs = [] + + logs = LettingsLog.where("startdate < ?", Time.zone.local(2024, 4, 1)).where.not("nocharge = household_charge") + + logs.find_each do |log| + status_pre_change = log.status + + log.skip_update_status = true + log.nocharge = log.household_charge + if log.save + updated_logs_count += 1 + Rails.logger.info "Updated nocharge for log #{log.id}" + else + Rails.logger.error "Failed to update log #{log.id}: #{log.errors.full_messages.join(', ')}" + end + + status_post_change = log.status + status_changed_logs << log.id if status_pre_change != status_post_change + end + + puts "#{updated_logs_count} logs were updated." + puts "Logs with changed status: [#{status_changed_logs.join(', ')}]" + end +end diff --git a/lib/tasks/update_manual_address_entry_selected_prexisting_logs.rake b/lib/tasks/update_manual_address_entry_selected_prexisting_logs.rake new file mode 100644 index 000000000..d11dc3219 --- /dev/null +++ b/lib/tasks/update_manual_address_entry_selected_prexisting_logs.rake @@ -0,0 +1,207 @@ +namespace :bulk_update do + desc "Update logs with specific criteria and set manual_address_entry_selected to true" + task update_manual_address_entry_selected: :environment do + updated_lettings_logs_count = 0 + lettings_postcode_fixed_count = 0 + lettings_postcode_fixed_status_changed_count = 0 + lettings_postcode_not_fixed_status_changed_count = 0 + lettings_postcode_fixed_status_changed_ids = [] + lettings_postcode_not_fixed_status_changed_ids = [] + lettings_updated_without_issue = 0 + + updated_sales_logs_count = 0 + sales_postcode_fixed_count = 0 + sales_postcode_fixed_status_changed_count = 0 + sales_postcode_not_fixed_status_changed_count = 0 + sales_postcode_fixed_status_changed_ids = [] + sales_postcode_not_fixed_status_changed_ids = [] + sales_updated_without_issue = 0 + + lettings_logs = LettingsLog.filter_by_year(2024) + .where(status: %w[in_progress completed]) + .where(needstype: 1, manual_address_entry_selected: false, uprn: nil) + .where("(address_line1 IS NOT NULL AND address_line1 != '') OR (address_line2 IS NOT NULL AND address_line2 != '') OR (town_or_city IS NOT NULL AND town_or_city != '') OR (county IS NOT NULL AND county != '') OR (postcode_full IS NOT NULL AND postcode_full != '')") + + lettings_logs.find_each do |log| + status_pre_change = log.status + log.manual_address_entry_selected = true + if log.save + updated_lettings_logs_count += 1 + Rails.logger.info "manual_address_entry_selected updated for lettings log #{log.id}" + else + Rails.logger.info "Could not save manual_address_entry_selected changes to lettings log #{log.id} : #{log.errors.full_messages.join(', ')}" + end + + postcode_fixed = false + if log.postcode_full.nil? && log.address_line1 == log.address_line1_input + log.postcode_full = log.postcode_full_input + if log.save + lettings_postcode_fixed_count += 1 + Rails.logger.info "postcode_full updated by address_line1_input for lettings log #{log.id}" + postcode_fixed = true + else + Rails.logger.info "Could not save postcode_full changes to lettings log #{log.id} : #{log.errors.full_messages.join(', ')}" + end + end + + if log.postcode_full.nil? && log.creation_method == "bulk upload" && log.address_line1 == log.address_line1_as_entered + log.postcode_full = log.postcode_full_as_entered + if log.save + lettings_postcode_fixed_count += 1 + Rails.logger.info "postcode_full updated by address_line1_as_entered for lettings log #{log.id}" + postcode_fixed = true + else + Rails.logger.info "Could not save postcode_full changes to lettings log #{log.id} : #{log.errors.full_messages.join(', ')}" + end + end + + status_post_change = log.status + if status_pre_change != status_post_change + if postcode_fixed + lettings_postcode_fixed_status_changed_count += 1 + lettings_postcode_fixed_status_changed_ids << log.id + else + lettings_postcode_not_fixed_status_changed_count += 1 + lettings_postcode_not_fixed_status_changed_ids << log.id + end + else + lettings_updated_without_issue += 1 + end + end + + sales_logs = SalesLog.filter_by_year(2024) + .where(status: %w[in_progress completed]) + .where(manual_address_entry_selected: false, uprn: nil) + .where("(address_line1 IS NOT NULL AND address_line1 != '') OR (address_line2 IS NOT NULL AND address_line2 != '') OR (town_or_city IS NOT NULL AND town_or_city != '') OR (county IS NOT NULL AND county != '') OR (postcode_full IS NOT NULL AND postcode_full != '')") + + sales_logs.find_each do |log| + status_pre_change = log.status + log.manual_address_entry_selected = true + if log.save + updated_sales_logs_count += 1 + Rails.logger.info "manual_address_entry_selected updated for sales log #{log.id}" + else + Rails.logger.info "Could not save manual_address_entry_selected changes to sales log #{log.id} : #{log.errors.full_messages.join(', ')}" + end + + postcode_fixed = false + if log.postcode_full.nil? && log.address_line1 == log.address_line1_input + log.postcode_full = log.postcode_full_input + if log.save + sales_postcode_fixed_count += 1 + Rails.logger.info "postcode_full updated by address_line1_input for sales log #{log.id}" + postcode_fixed = true + else + Rails.logger.info "Could not save postcode_full changes to sales log #{log.id} : #{log.errors.full_messages.join(', ')}" + end + end + + if log.postcode_full.nil? && log.creation_method == "bulk upload" && log.address_line1 == log.address_line1_as_entered + log.postcode_full = log.postcode_full_as_entered + if log.save + sales_postcode_fixed_count += 1 + Rails.logger.info "postcode_full updated by address_line1_as_entered for sales log #{log.id}" + postcode_fixed = true + else + Rails.logger.info "Could not save postcode_full changes to sales log #{log.id} : #{log.errors.full_messages.join(', ')}" + end + end + + status_post_change = log.status + if status_pre_change != status_post_change + if postcode_fixed + sales_postcode_fixed_status_changed_count += 1 + sales_postcode_fixed_status_changed_ids << log.id + else + sales_postcode_not_fixed_status_changed_count += 1 + sales_postcode_not_fixed_status_changed_ids << log.id + end + else + sales_updated_without_issue += 1 + end + end + + puts "#{updated_lettings_logs_count} lettings logs were updated." + puts "#{lettings_updated_without_issue} lettings logs were updated without issue." + puts "#{lettings_postcode_fixed_count} lettings logs where postcode fix was applied." + puts "#{lettings_postcode_fixed_status_changed_count} lettings logs with postcode fix and status changed." + puts "#{lettings_postcode_not_fixed_status_changed_count} lettings logs without postcode fix and status changed." + puts "IDs of lettings logs with postcode fix and status changed: [#{lettings_postcode_fixed_status_changed_ids.join(', ')}]" + puts "IDs of lettings logs without postcode fix and status changed: [#{lettings_postcode_not_fixed_status_changed_ids.join(', ')}]" + + lettings_postcode_fixed_org_counts = LettingsLog.where(id: lettings_postcode_fixed_status_changed_ids).group(:owning_organisation_id).count + lettings_postcode_fixed_org_counts.each do |org_id, count| + puts "Org #{org_id}: #{count} logs with postcode fix and status changed." + end + + lettings_postcode_not_fixed_org_counts = LettingsLog.where(id: lettings_postcode_not_fixed_status_changed_ids).group(:owning_organisation_id).count + lettings_postcode_not_fixed_org_counts.each do |org_id, count| + puts "Org #{org_id}: #{count} logs without postcode fix and status changed." + end + + puts "#{updated_sales_logs_count} sales logs were updated." + puts "#{sales_updated_without_issue} sales logs were updated without issue." + puts "#{sales_postcode_fixed_count} sales logs where postcode fix was applied." + puts "#{sales_postcode_fixed_status_changed_count} sales logs with postcode fix and status changed." + puts "#{sales_postcode_not_fixed_status_changed_count} sales logs without postcode fix and status changed." + puts "IDs of sales logs with postcode fix and status changed: [#{sales_postcode_fixed_status_changed_ids.join(', ')}]" + puts "IDs of sales logs without postcode fix and status changed: [#{sales_postcode_not_fixed_status_changed_ids.join(', ')}]" + + sales_postcode_fixed_org_counts = SalesLog.where(id: sales_postcode_fixed_status_changed_ids).group(:owning_organisation_id).count + sales_postcode_fixed_org_counts.each do |org_id, count| + puts "Org #{org_id}: #{count} logs with postcode fix and status changed." + end + + sales_postcode_not_fixed_org_counts = SalesLog.where(id: sales_postcode_not_fixed_status_changed_ids).group(:owning_organisation_id).count + sales_postcode_not_fixed_org_counts.each do |org_id, count| + puts "Org #{org_id}: #{count} logs without postcode fix and status changed." + end + end + + desc "Find logs to fix and update postcode_full if conditions are met" + task update_postcode_full_preexisting_manual_entry_logs: :environment do + updated_count = 0 + fixed_count = 0 + not_updated_count = 0 + not_updated_ids = [] + updated_but_not_fixed_ids = [] + + logs_to_fix = LettingsLog.filter_by_year(2024).where(manual_address_entry_selected: true, uprn: nil, status: "in_progress", postcode_full: nil, updated_at: Time.zone.parse("2025-03-19 16:00:00")..Time.zone.parse("2025-03-19 17:00:00")) + + logs_to_fix.find_each do |log| + previous_version = log.versions[-2] + previous_status = previous_version&.reify&.status + + if log.address_line1 == log.address_line1_input + log.postcode_full = log.postcode_full_input + elsif log.creation_method == "bulk upload" && log.address_line1 == log.address_line1_as_entered + log.postcode_full = log.postcode_full_as_entered + end + + if log.postcode_full.present? + if log.save + Rails.logger.info "Updated postcode_full for lettings log #{log.id}" + updated_count += 1 + if log.status == previous_status + fixed_count += 1 + else + updated_but_not_fixed_ids << log.id + end + else + Rails.logger.info "Could not save changes to lettings log #{log.id}: #{log.errors.full_messages.join(', ')}" + not_updated_count += 1 + not_updated_ids << log.id + end + else + not_updated_count += 1 + not_updated_ids << log.id + end + end + + puts "#{updated_count} logs updated." + puts "#{fixed_count} logs fixed." + puts "#{not_updated_count} logs not updated." + puts "IDs of logs not updated: [#{not_updated_ids.join(', ')}]" + puts "IDs of logs updated but not fixed: [#{updated_but_not_fixed_ids.join(', ')}]" + end +end diff --git a/spec/fixtures/exports/general_needs_log.xml b/spec/fixtures/exports/general_needs_log.xml index 9f3e95dbd..100877566 100644 --- a/spec/fixtures/exports/general_needs_log.xml +++ b/spec/fixtures/exports/general_needs_log.xml @@ -100,7 +100,7 @@ 0 0 2 - 0 + 2 200.0 50.0 diff --git a/spec/fixtures/exports/general_needs_log_23_24.xml b/spec/fixtures/exports/general_needs_log_23_24.xml index 34634ae73..cf6d7ce1a 100644 --- a/spec/fixtures/exports/general_needs_log_23_24.xml +++ b/spec/fixtures/exports/general_needs_log_23_24.xml @@ -100,7 +100,7 @@ 0 0 2 - 0 + 2 200.0 50.0 diff --git a/spec/fixtures/exports/general_needs_log_24_25.xml b/spec/fixtures/exports/general_needs_log_24_25.xml index e5ff208a1..9757d5aea 100644 --- a/spec/fixtures/exports/general_needs_log_24_25.xml +++ b/spec/fixtures/exports/general_needs_log_24_25.xml @@ -99,7 +99,7 @@ 0 0 2 - 0 + 2 200.0 50.0 diff --git a/spec/fixtures/exports/general_needs_log_25_26.xml b/spec/fixtures/exports/general_needs_log_25_26.xml index 57caaad28..f0feb552d 100644 --- a/spec/fixtures/exports/general_needs_log_25_26.xml +++ b/spec/fixtures/exports/general_needs_log_25_26.xml @@ -99,7 +99,7 @@ 0 0 2 - 0 + 2 200.0 50.0 diff --git a/spec/fixtures/files/2022_23_sales_bulk_upload.csv b/spec/fixtures/files/2022_23_sales_bulk_upload.csv index cf263ad1f..0d8bbbf8c 100644 --- a/spec/fixtures/files/2022_23_sales_bulk_upload.csv +++ b/spec/fixtures/files/2022_23_sales_bulk_upload.csv @@ -50,7 +50,7 @@ Discounted ownership","How much was the cash deposit paid on the property? Discounted ownership","What are the total monthly leasehold charges for the property? -Discounted ownership",What is the type of outright sale?,"What is the 'other' type of outright sale? +Discounted ownership",What is the type of outright sale?,"What is the 'Other' type of outright sale? Outright sale",[BLANK],"What is the full purchase price? @@ -66,15 +66,15 @@ Outright sale","Which organisation owned this property before the sale? Organisation's CORE ID",Username,BLANK,Has the buyer ever served in the UK Armed Forces and for how long?,[BLANK],Are any of the buyers a spouse or civil partner of a UK Armed Forces regular who died in service within the last 2 years?,"What is the name of the mortgage lender? -Shared ownership","What is the name of the 'other' mortgage lender? +Shared ownership","What is the name of the 'Other' mortgage lender? Shared ownership","What is the name of the mortgage lender? -Discounted ownership","What is the name of the 'other' mortgage lender? +Discounted ownership","What is the name of the 'Other' mortgage lender? Discounted ownership","What is the name of the mortgage lender? -Outright sale","What is the name of the 'other' mortgage lender? +Outright sale","What is the name of the 'Other' mortgage lender? Outright sale",Were the buyers receiving any of these housing-related benefits immediately before buying this property?,"What is the length of the mortgage in years? diff --git a/spec/fixtures/files/blank_bulk_upload_sales.csv b/spec/fixtures/files/blank_bulk_upload_sales.csv index d7245840c..249b966b1 100644 --- a/spec/fixtures/files/blank_bulk_upload_sales.csv +++ b/spec/fixtures/files/blank_bulk_upload_sales.csv @@ -50,7 +50,7 @@ Discounted ownership","How much was the cash deposit paid on the property? Discounted ownership","What are the total monthly leasehold charges for the property? -Discounted ownership",What is the type of outright sale?,"What is the 'other' type of outright sale? +Discounted ownership",What is the type of outright sale?,"What is the 'Other' type of outright sale? Outright sale",[BLANK],"What is the full purchase price? @@ -66,15 +66,15 @@ Outright sale","Which organisation owned this property before the sale? Organisation's CORE ID",Username,BLANK,Has the buyer ever served in the UK Armed Forces and for how long?,[BLANK],Are any of the buyers a spouse or civil partner of a UK Armed Forces regular who died in service within the last 2 years?,"What is the name of the mortgage lender? -Shared ownership","What is the name of the 'other' mortgage lender? +Shared ownership","What is the name of the 'Other' mortgage lender? Shared ownership","What is the name of the mortgage lender? -Discounted ownership","What is the name of the 'other' mortgage lender? +Discounted ownership","What is the name of the 'Other' mortgage lender? Discounted ownership","What is the name of the mortgage lender? -Outright sale","What is the name of the 'other' mortgage lender? +Outright sale","What is the name of the 'Other' mortgage lender? Outright sale",Were the buyers receiving any of these housing-related benefits immediately before buying this property?,"What is the length of the mortgage in years? diff --git a/spec/fixtures/files/lettings_log_csv_export_codes_23.csv b/spec/fixtures/files/lettings_log_csv_export_codes_23.csv index 6d9da8872..4997e4cca 100644 --- a/spec/fixtures/files/lettings_log_csv_export_codes_23.csv +++ b/spec/fixtures/files/lettings_log_csv_export_codes_23.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is created by,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,The (internal) ID on the old service,The ID the users saw on the old service,Year collection period opened,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Is the UPRN known?,"If known, property's UPRN",We found an address that might be this property. Is this the property address?,Address line 1,Address line 2,Town or City,County,Postcode,The internal value to indicate if the LA was inferred from the postcode,What is the property's local authority?,Local authority code,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,How many times was the property offered between becoming vacant and this letting?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,The following soft validation was confirmed: You told us that the property has been vacant for more than 2 years. This is higher than we would expect.,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,The following soft validation was confirmed: You told us the property has been vacant for 2 years. This is higher than we would expect.,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,Has the tenant seen the MHCLG privacy notice?,How many people live in the household at this letting?,The following soft validation was confirmed: You told us somebody in the household is pregnant. You also told us there are no female tenants living at the property.,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8","Type of household 1 = 1 elder; 2 = 2 adults, including elder(s); 3 = 1 adult; 4 = 2 adults; 5 = 1 adult & 1+ children; 6 = 2+ adults & 1+ children; 9 = Other",Total number of dependent children in the household (Sum of when RELAT2-8 = C),Total number of elders in household (Sum of when AGE1-8 >= 60),Total number of adults in household,What is the lead tenant's age?,The following soft validation was confirmed: You told us this person is aged %{age} years and retired. The minimum expected retirement age for %{gender} in England is %{age}.,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,Are the details of tenant 2 known?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,Are the details of tenant 3 known?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,Are the details of tenant 4 known?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,Are the details of tenant 5 known?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,Are the details of tenant 6 known?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,Are the details of tenant 7 known?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,Are the details of tenant 8 known?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Was the local authority of the household's last settled home known?,The internal value to indicate if the previous LA was inferred from the postcode,Previous location LA name,Previous location's ONS LA Code,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,"The following soft validation was confirmed: Are you sure? This is a general needs log, and this referral type is for supported housing.",Do you know the household's combined income after tax?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Populated when someone hits the soft validation and confirmed in the service,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,Populated when the soft validation and confirmed in the service,What is the basic rent?,Weekly rent,Populated when the soft validation and confirmed in the service,What is the service charge?,Weekly service charge,What is the personal service charge?,Weekly personal service charge,What is the support charge?,Weekly support charge,Total charge to the tenant,Weekly total charge to the tenant,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Can you estimate the outstanding amount?,Estimated outstanding amount,Weekly total rent shortfall charge for tenant receiving housing benefit,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,created_by,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,old_id,old_form_id,collection_start_year,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,uprn_known,uprn,uprn_confirmed,address_line1,address_line2,town_or_city,county,postcode_full,is_la_inferred,la_label,la,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,offered,unittype_gn,builtype,wchair,beds,voiddate,vacdays,void_date_value_check,majorrepairs,mrcdate,major_repairs_date_value_check,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,declaration,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,national,ecstat1,details_known_2,relat2,age2,sex2,ecstat2,details_known_3,relat3,age3,sex3,ecstat3,details_known_4,relat4,age4,sex4,ecstat4,details_known_5,relat5,age5,sex5,ecstat5,details_known_6,relat6,age6,sex6,ecstat6,details_known_7,relat7,age7,sex7,ecstat7,details_known_8,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,previous_la_known,is_previous_la_inferred,prevloc_label,prevloc,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,letting_allocation_none,referral,referral_value_check,net_income_known,incref,incfreq,earnings,net_income_value_check,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,wrent,rent_value_check,scharge,wscharge,pscharge,wpschrge,supcharg,wsupchrg,tcharge,wtcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall_known,tshortfall,wtshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,completed,,s.port@jeemayle.com,s.port@jeemayle.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,1,,,2023,MHCLG,MHCLG,1,7,0,2023-11-26,2,2,,,2,HIJKLMN,ABCDEFG,0,,,Address line 1,,London,,NW9 5LL,false,Barnet,E09000003,0,2,6,2,2,7,1,1,3,2023-11-24,1,,1,2023-11-25,,3,1,4,,2,,1,4,,1,4,0,0,2,35,,F,0,2,13,0,0,P,32,M,6,1,R,-9,R,10,0,R,-9,R,10,,,,,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,0,2,,0,0,1,268,,6,1,1,,0,2,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,1,0,12.0,6.0,,,,,,,,,,,,,,,,,,,, +,completed,,s.port@jeemayle.com,s.port@jeemayle.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,1,,,2023,MHCLG,MHCLG,1,7,0,2023-11-26,2,2,,,2,HIJKLMN,ABCDEFG,0,,,Address line 1,,London,,NW9 5LL,false,Barnet,E09000003,0,2,6,2,2,7,1,1,3,2023-11-24,1,,1,2023-11-25,,3,1,4,,2,,1,4,,1,4,0,0,2,35,,F,0,2,13,0,0,P,32,M,6,1,R,-9,R,10,0,R,-9,R,10,,,,,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,0,2,,0,0,1,268,,6,1,1,,,2,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,1,0,12.0,6.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_codes_24.csv b/spec/fixtures/files/lettings_log_csv_export_codes_24.csv index 6a84b7568..084318abe 100644 --- a/spec/fixtures/files/lettings_log_csv_export_codes_24.csv +++ b/spec/fixtures/files/lettings_log_csv_export_codes_24.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is created by,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,The internal value to indicate if the LA was inferred from the postcode,What is the property's local authority?,Local authority code,Is the UPRN known?,UPRN of the address selected,Was the 'No address found' page seen?,Address line 1 input from address matching feature,Postcode input from address matching feature,Address line 1 entered in bulk upload file,Address line 2 entered in bulk upload file,Town or city entered in bulk upload file,County entered in bulk upload file,Postcode entered in bulk upload file,Local authority entered in bulk upload file,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,The following soft validation was confirmed: You told us that the property has been vacant for more than 2 years. This is higher than we would expect.,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,The following soft validation was confirmed: You told us the property has been vacant for 2 years. This is higher than we would expect.,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,How many people live in the household at this letting?,The following soft validation was confirmed: You told us somebody in the household is pregnant. You also told us there are no female tenants living at the property.,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8","Type of household 1 = 1 elder; 2 = 2 adults, including elder(s); 3 = 1 adult; 4 = 2 adults; 5 = 1 adult & 1+ children; 6 = 2+ adults & 1+ children; 9 = Other",Total number of dependent children in the household (Sum of when RELAT2-8 = C),Total number of elders in household (Sum of when AGE1-8 >= 60),Total number of adults in household,What is the lead tenant's age?,The following soft validation was confirmed: You told us this person is aged %{age} years and retired. The minimum expected retirement age for %{gender} in England is %{age}.,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,Are the details of tenant 2 known?,What is person 2's relationship to the lead tenant?,"The following soft validation was confirmed: You said that [person X]'s relationship to lead tenant is partner, and that their age is [AGEX]. Are you sure this is correct?",The following soft validation was confirmed: You said that more than one person in the household is the partner of the lead tenant. Are you sure this is correct?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,Are the details of tenant 3 known?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,Are the details of tenant 4 known?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,Are the details of tenant 5 known?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,Are the details of tenant 6 known?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,Are the details of tenant 7 known?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,Are the details of tenant 8 known?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",The soft validation was confirmed,Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Was the local authority of the household's last settled home known?,The internal value to indicate if the previous LA was inferred from the postcode,Previous location LA name,Previous location's ONS LA Code,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,"The following soft validation was confirmed: Are you sure? This is a general needs log, and this referral type is for supported housing.",Do you know the household's combined income after tax?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Populated when someone hits the soft validation and confirmed in the service,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,Populated when the soft validation and confirmed in the service,What is the basic rent?,Weekly rent,Populated when the soft validation and confirmed in the service,What is the service charge?,Weekly service charge,What is the personal service charge?,Weekly personal service charge,What is the support charge?,Weekly support charge,Total charge to the tenant,Weekly total charge to the tenant,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Can you estimate the outstanding amount?,Estimated outstanding amount,Weekly total rent shortfall charge for tenant receiving housing benefit,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,created_by,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,uprn,address_line1,address_line2,town_or_city,county,postcode_full,is_la_inferred,la_label,la,uprn_known,uprn_selection,address_search_value_check,address_line1_input,postcode_full_input,address_line1_as_entered,address_line2_as_entered,town_or_city_as_entered,county_as_entered,postcode_full_as_entered,la_as_entered,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,unittype_gn,builtype,wchair,beds,voiddate,vacdays,void_date_value_check,majorrepairs,mrcdate,major_repairs_date_value_check,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,nationality_all,ecstat1,details_known_2,relat2,partner_under_16_value_check,multiple_partners_value_check,age2,sex2,ecstat2,details_known_3,relat3,age3,sex3,ecstat3,details_known_4,relat4,age4,sex4,ecstat4,details_known_5,relat5,age5,sex5,ecstat5,details_known_6,relat6,age6,sex6,ecstat6,details_known_7,relat7,age7,sex7,ecstat7,details_known_8,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,reasonother_value_check,prevten,homeless,ppcodenk,ppostcode_full,previous_la_known,is_previous_la_inferred,prevloc_label,prevloc,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral,referral_value_check,net_income_known,incref,incfreq,earnings,net_income_value_check,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,wrent,rent_value_check,scharge,wscharge,pscharge,wpschrge,supcharg,wsupchrg,tcharge,wtcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall_known,tshortfall,wtshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,1,2024,,MHCLG,MHCLG,1,7,0,2024-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,,Address line 1,,London,,NW9 5LL,false,Barnet,E09000003,0,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,0,2,6,2,7,1,1,3,2024-03-30,1,,1,2024-03-31,,3,1,4,,2,,4,,1,4,0,0,2,35,,F,0,2,36,0,0,P,,,32,M,6,1,R,-9,R,10,0,R,-9,R,10,,,,,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,,6,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,0,0,2,,0,0,1,268,,6,1,1,,0,2,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,1,0,12.0,6.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,1,2024,,MHCLG,MHCLG,1,7,0,2024-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,,Address line 1,,London,,NW9 5LL,false,Barnet,E09000003,0,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,0,2,6,2,7,1,1,3,2024-03-30,1,,1,2024-03-31,,3,1,4,,2,,4,,1,4,0,0,2,35,,F,0,2,36,0,0,P,,,32,M,6,1,R,-9,R,10,0,R,-9,R,10,,,,,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,,6,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,0,0,2,,0,0,1,268,,6,1,1,,,2,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,1,0,12.0,6.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_codes_25.csv b/spec/fixtures/files/lettings_log_csv_export_codes_25.csv index 8ef206ca0..001b342eb 100644 --- a/spec/fixtures/files/lettings_log_csv_export_codes_25.csv +++ b/spec/fixtures/files/lettings_log_csv_export_codes_25.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is created by,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,The internal value to indicate if the LA was inferred from the postcode,What is the property's local authority?,Local authority code,Is the UPRN known?,UPRN of the address selected,Was the 'No address found' page seen?,Address line 1 input from address matching feature,Postcode input from address matching feature,Address line 1 entered in bulk upload file,Address line 2 entered in bulk upload file,Town or city entered in bulk upload file,County entered in bulk upload file,Postcode entered in bulk upload file,Local authority entered in bulk upload file,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,The following soft validation was confirmed: You told us that the property has been vacant for more than 2 years. This is higher than we would expect.,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,The following soft validation was confirmed: You told us the property has been vacant for 2 years. This is higher than we would expect.,Is this letting in sheltered accommodation?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,How many people live in the household at this letting?,The following soft validation was confirmed: You told us somebody in the household is pregnant. You also told us there are no female tenants living at the property.,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8","Type of household 1 = 1 elder; 2 = 2 adults, including elder(s); 3 = 1 adult; 4 = 2 adults; 5 = 1 adult & 1+ children; 6 = 2+ adults & 1+ children; 9 = Other",Total number of dependent children in the household (Sum of when RELAT2-8 = C),Total number of elders in household (Sum of when AGE1-8 >= 60),Total number of adults in household,What is the lead tenant's age?,The following soft validation was confirmed: You told us this person is aged %{age} years and retired. The minimum expected retirement age for %{gender} in England is %{age}.,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,Are the details of tenant 2 known?,What is person 2's relationship to the lead tenant?,"The following soft validation was confirmed: You said that [person X]'s relationship to lead tenant is partner, and that their age is [AGEX]. Are you sure this is correct?",The following soft validation was confirmed: You said that more than one person in the household is the partner of the lead tenant. Are you sure this is correct?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,Are the details of tenant 3 known?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,Are the details of tenant 4 known?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,Are the details of tenant 5 known?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,Are the details of tenant 6 known?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,Are the details of tenant 7 known?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,Are the details of tenant 8 known?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",The soft validation was confirmed,Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Was the local authority of the household's last settled home known?,The internal value to indicate if the previous LA was inferred from the postcode,Previous location LA name,Previous location's ONS LA Code,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",,What was the source of referral for this letting?,"The following soft validation was confirmed: Are you sure? This is a general needs log, and this referral type is for supported housing.",Do you know the household's combined income after tax?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Populated when someone hits the soft validation and confirmed in the service,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,What is the basic rent?,Weekly rent,Populated when the soft validation and confirmed in the service,What is the service charge?,Weekly service charge,What is the personal service charge?,Weekly personal service charge,What is the support charge?,Weekly support charge,Total charge to the tenant,Weekly total charge to the tenant,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Can you estimate the outstanding amount?,Estimated outstanding amount,Weekly total rent shortfall charge for tenant receiving housing benefit,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,created_by,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,uprn,address_line1,address_line2,town_or_city,county,postcode_full,is_la_inferred,la_label,la,uprn_known,uprn_selection,address_search_value_check,address_line1_input,postcode_full_input,address_line1_as_entered,address_line2_as_entered,town_or_city_as_entered,county_as_entered,postcode_full_as_entered,la_as_entered,unittype_gn,builtype,wchair,beds,voiddate,vacdays,void_date_value_check,majorrepairs,mrcdate,major_repairs_date_value_check,sheltered,joint,startertenancy,tenancy,tenancyother,tenancylength,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,nationality_all,ecstat1,details_known_2,relat2,partner_under_16_value_check,multiple_partners_value_check,age2,sex2,ecstat2,details_known_3,relat3,age3,sex3,ecstat3,details_known_4,relat4,age4,sex4,ecstat4,details_known_5,relat5,age5,sex5,ecstat5,details_known_6,relat6,age6,sex6,ecstat6,details_known_7,relat7,age7,sex7,ecstat7,details_known_8,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,reasonother_value_check,prevten,homeless,ppcodenk,ppostcode_full,previous_la_known,is_previous_la_inferred,prevloc_label,prevloc,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral_type,referral,referral_value_check,net_income_known,incref,incfreq,earnings,net_income_value_check,hb,has_benefits,benefits,household_charge,nocharge,period,brent,wrent,rent_value_check,scharge,wscharge,pscharge,wpschrge,supcharg,wsupchrg,tcharge,wtcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall_known,tshortfall,wtshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,1,2025,,MHCLG,MHCLG,1,7,0,2025-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,0,2,6,2,,Address line 1,,London,,NW9 5LL,false,Barnet,E09000003,0,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,7,1,1,3,2025-03-30,1,,1,2025-03-31,,,3,1,4,,2,4,,1,4,0,0,2,35,,F,0,2,36,0,0,P,,,32,M,6,1,R,-9,R,10,0,R,-9,R,10,,,,,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,,6,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,0,0,,,,0,0,1,268,,6,1,1,,0,2,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,1,0,12.0,6.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,1,2025,,MHCLG,MHCLG,1,7,0,2025-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,0,2,6,2,,Address line 1,,London,,NW9 5LL,false,Barnet,E09000003,0,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,7,1,1,3,2025-03-30,1,,1,2025-03-31,,,3,1,4,,2,4,,1,4,0,0,2,35,,F,0,2,36,0,0,P,,,32,M,6,1,R,-9,R,10,0,R,-9,R,10,,,,,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,,6,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,0,0,,,,0,0,1,268,,6,1,1,,,2,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,1,0,12.0,6.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_labels_23.csv b/spec/fixtures/files/lettings_log_csv_export_labels_23.csv index 96db80bbd..62dc32c91 100644 --- a/spec/fixtures/files/lettings_log_csv_export_labels_23.csv +++ b/spec/fixtures/files/lettings_log_csv_export_labels_23.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is created by,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,The (internal) ID on the old service,The ID the users saw on the old service,Year collection period opened,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Is the UPRN known?,"If known, property's UPRN",We found an address that might be this property. Is this the property address?,Address line 1,Address line 2,Town or City,County,Postcode,The internal value to indicate if the LA was inferred from the postcode,What is the property's local authority?,Local authority code,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,How many times was the property offered between becoming vacant and this letting?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,The following soft validation was confirmed: You told us that the property has been vacant for more than 2 years. This is higher than we would expect.,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,The following soft validation was confirmed: You told us the property has been vacant for 2 years. This is higher than we would expect.,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,Has the tenant seen the MHCLG privacy notice?,How many people live in the household at this letting?,The following soft validation was confirmed: You told us somebody in the household is pregnant. You also told us there are no female tenants living at the property.,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8","Type of household 1 = 1 elder; 2 = 2 adults, including elder(s); 3 = 1 adult; 4 = 2 adults; 5 = 1 adult & 1+ children; 6 = 2+ adults & 1+ children; 9 = Other",Total number of dependent children in the household (Sum of when RELAT2-8 = C),Total number of elders in household (Sum of when AGE1-8 >= 60),Total number of adults in household,What is the lead tenant's age?,The following soft validation was confirmed: You told us this person is aged %{age} years and retired. The minimum expected retirement age for %{gender} in England is %{age}.,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,Are the details of tenant 2 known?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,Are the details of tenant 3 known?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,Are the details of tenant 4 known?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,Are the details of tenant 5 known?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,Are the details of tenant 6 known?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,Are the details of tenant 7 known?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,Are the details of tenant 8 known?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Was the local authority of the household's last settled home known?,The internal value to indicate if the previous LA was inferred from the postcode,Previous location LA name,Previous location's ONS LA Code,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,"The following soft validation was confirmed: Are you sure? This is a general needs log, and this referral type is for supported housing.",Do you know the household's combined income after tax?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Populated when someone hits the soft validation and confirmed in the service,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,Populated when the soft validation and confirmed in the service,What is the basic rent?,Weekly rent,Populated when the soft validation and confirmed in the service,What is the service charge?,Weekly service charge,What is the personal service charge?,Weekly personal service charge,What is the support charge?,Weekly support charge,Total charge to the tenant,Weekly total charge to the tenant,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Can you estimate the outstanding amount?,Estimated outstanding amount,Weekly total rent shortfall charge for tenant receiving housing benefit,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,created_by,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,old_id,old_form_id,collection_start_year,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,uprn_known,uprn,uprn_confirmed,address_line1,address_line2,town_or_city,county,postcode_full,is_la_inferred,la_label,la,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,offered,unittype_gn,builtype,wchair,beds,voiddate,vacdays,void_date_value_check,majorrepairs,mrcdate,major_repairs_date_value_check,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,declaration,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,national,ecstat1,details_known_2,relat2,age2,sex2,ecstat2,details_known_3,relat3,age3,sex3,ecstat3,details_known_4,relat4,age4,sex4,ecstat4,details_known_5,relat5,age5,sex5,ecstat5,details_known_6,relat6,age6,sex6,ecstat6,details_known_7,relat7,age7,sex7,ecstat7,details_known_8,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,previous_la_known,is_previous_la_inferred,prevloc_label,prevloc,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,letting_allocation_none,referral,referral_value_check,net_income_known,incref,incfreq,earnings,net_income_value_check,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,wrent,rent_value_check,scharge,wscharge,pscharge,wpschrge,supcharg,wsupchrg,tcharge,wtcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall_known,tshortfall,wtshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,completed,,s.port@jeemayle.com,s.port@jeemayle.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,single log,,,2023,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,No,,,Address line 1,,London,,NW9 5LL,No,Barnet,E09000003,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,1,,Yes,2023-11-25,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,Yes,4,,Yes,4,0,0,2,35,,Female,White,Irish,Tenant prefers not to say,Other,Yes,Partner,32,Male,Not seeking work,No,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Yes,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,No,Tenant applied directly (no referral or nomination),,Yes,No,Weekly,268,,Universal Credit housing element,Yes,All,,No,Every 2 weeks,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,Yes,Yes,12.0,6.0,,,,,,,,,,,,,,,,,,,, +,completed,,s.port@jeemayle.com,s.port@jeemayle.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,single log,,,2023,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,No,,,Address line 1,,London,,NW9 5LL,No,Barnet,E09000003,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,1,,Yes,2023-11-25,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,Yes,4,,Yes,4,0,0,2,35,,Female,White,Irish,Tenant prefers not to say,Other,Yes,Partner,32,Male,Not seeking work,No,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Yes,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,No,Tenant applied directly (no referral or nomination),,Yes,No,Weekly,268,,Universal Credit housing element,Yes,All,,,Every 2 weeks,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,Yes,Yes,12.0,6.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_labels_24.csv b/spec/fixtures/files/lettings_log_csv_export_labels_24.csv index ce1bbb6de..8a538b0d8 100644 --- a/spec/fixtures/files/lettings_log_csv_export_labels_24.csv +++ b/spec/fixtures/files/lettings_log_csv_export_labels_24.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is created by,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,The internal value to indicate if the LA was inferred from the postcode,What is the property's local authority?,Local authority code,Is the UPRN known?,UPRN of the address selected,Was the 'No address found' page seen?,Address line 1 input from address matching feature,Postcode input from address matching feature,Address line 1 entered in bulk upload file,Address line 2 entered in bulk upload file,Town or city entered in bulk upload file,County entered in bulk upload file,Postcode entered in bulk upload file,Local authority entered in bulk upload file,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,The following soft validation was confirmed: You told us that the property has been vacant for more than 2 years. This is higher than we would expect.,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,The following soft validation was confirmed: You told us the property has been vacant for 2 years. This is higher than we would expect.,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,How many people live in the household at this letting?,The following soft validation was confirmed: You told us somebody in the household is pregnant. You also told us there are no female tenants living at the property.,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8","Type of household 1 = 1 elder; 2 = 2 adults, including elder(s); 3 = 1 adult; 4 = 2 adults; 5 = 1 adult & 1+ children; 6 = 2+ adults & 1+ children; 9 = Other",Total number of dependent children in the household (Sum of when RELAT2-8 = C),Total number of elders in household (Sum of when AGE1-8 >= 60),Total number of adults in household,What is the lead tenant's age?,The following soft validation was confirmed: You told us this person is aged %{age} years and retired. The minimum expected retirement age for %{gender} in England is %{age}.,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,Are the details of tenant 2 known?,What is person 2's relationship to the lead tenant?,"The following soft validation was confirmed: You said that [person X]'s relationship to lead tenant is partner, and that their age is [AGEX]. Are you sure this is correct?",The following soft validation was confirmed: You said that more than one person in the household is the partner of the lead tenant. Are you sure this is correct?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,Are the details of tenant 3 known?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,Are the details of tenant 4 known?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,Are the details of tenant 5 known?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,Are the details of tenant 6 known?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,Are the details of tenant 7 known?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,Are the details of tenant 8 known?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",The soft validation was confirmed,Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Was the local authority of the household's last settled home known?,The internal value to indicate if the previous LA was inferred from the postcode,Previous location LA name,Previous location's ONS LA Code,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,"The following soft validation was confirmed: Are you sure? This is a general needs log, and this referral type is for supported housing.",Do you know the household's combined income after tax?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Populated when someone hits the soft validation and confirmed in the service,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,Populated when the soft validation and confirmed in the service,What is the basic rent?,Weekly rent,Populated when the soft validation and confirmed in the service,What is the service charge?,Weekly service charge,What is the personal service charge?,Weekly personal service charge,What is the support charge?,Weekly support charge,Total charge to the tenant,Weekly total charge to the tenant,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Can you estimate the outstanding amount?,Estimated outstanding amount,Weekly total rent shortfall charge for tenant receiving housing benefit,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,created_by,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,uprn,address_line1,address_line2,town_or_city,county,postcode_full,is_la_inferred,la_label,la,uprn_known,uprn_selection,address_search_value_check,address_line1_input,postcode_full_input,address_line1_as_entered,address_line2_as_entered,town_or_city_as_entered,county_as_entered,postcode_full_as_entered,la_as_entered,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,unittype_gn,builtype,wchair,beds,voiddate,vacdays,void_date_value_check,majorrepairs,mrcdate,major_repairs_date_value_check,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,nationality_all,ecstat1,details_known_2,relat2,partner_under_16_value_check,multiple_partners_value_check,age2,sex2,ecstat2,details_known_3,relat3,age3,sex3,ecstat3,details_known_4,relat4,age4,sex4,ecstat4,details_known_5,relat5,age5,sex5,ecstat5,details_known_6,relat6,age6,sex6,ecstat6,details_known_7,relat7,age7,sex7,ecstat7,details_known_8,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,reasonother_value_check,prevten,homeless,ppcodenk,ppostcode_full,previous_la_known,is_previous_la_inferred,prevloc_label,prevloc,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral,referral_value_check,net_income_known,incref,incfreq,earnings,net_income_value_check,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,wrent,rent_value_check,scharge,wscharge,pscharge,wpschrge,supcharg,wsupchrg,tcharge,wtcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall_known,tshortfall,wtshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,single log,2024,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2024-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,,Address line 1,,London,,NW9 5LL,No,Barnet,E09000003,No,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,No,Affordable rent basis,Tenant abandoned property,No,House,Purpose built,Yes,3,2024-03-30,1,,Yes,2024-03-31,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,4,,Yes,4,0,0,2,35,,Female,White,Irish,Australia,Other,Yes,Partner,,,32,Male,Not seeking work,No,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Yes,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,,Other supported housing,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,No,No,Tenant applied directly (no referral or nomination),,Yes,No,Weekly,268,,Universal Credit housing element,Yes,All,,No,Every 2 weeks,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,Yes,Yes,12.0,6.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,single log,2024,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2024-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,,Address line 1,,London,,NW9 5LL,No,Barnet,E09000003,No,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,No,Affordable rent basis,Tenant abandoned property,No,House,Purpose built,Yes,3,2024-03-30,1,,Yes,2024-03-31,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,4,,Yes,4,0,0,2,35,,Female,White,Irish,Australia,Other,Yes,Partner,,,32,Male,Not seeking work,No,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Yes,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,,Other supported housing,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,No,No,Tenant applied directly (no referral or nomination),,Yes,No,Weekly,268,,Universal Credit housing element,Yes,All,,,Every 2 weeks,,,,,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,Yes,Yes,12.0,6.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_labels_25.csv b/spec/fixtures/files/lettings_log_csv_export_labels_25.csv index f5390d27f..4139ae5b0 100644 --- a/spec/fixtures/files/lettings_log_csv_export_labels_25.csv +++ b/spec/fixtures/files/lettings_log_csv_export_labels_25.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is created by,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,The internal value to indicate if the LA was inferred from the postcode,What is the property's local authority?,Local authority code,Is the UPRN known?,UPRN of the address selected,Was the 'No address found' page seen?,Address line 1 input from address matching feature,Postcode input from address matching feature,Address line 1 entered in bulk upload file,Address line 2 entered in bulk upload file,Town or city entered in bulk upload file,County entered in bulk upload file,Postcode entered in bulk upload file,Local authority entered in bulk upload file,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,The following soft validation was confirmed: You told us that the property has been vacant for more than 2 years. This is higher than we would expect.,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,The following soft validation was confirmed: You told us the property has been vacant for 2 years. This is higher than we would expect.,Is this letting in sheltered accommodation?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,How many people live in the household at this letting?,The following soft validation was confirmed: You told us somebody in the household is pregnant. You also told us there are no female tenants living at the property.,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8","Type of household 1 = 1 elder; 2 = 2 adults, including elder(s); 3 = 1 adult; 4 = 2 adults; 5 = 1 adult & 1+ children; 6 = 2+ adults & 1+ children; 9 = Other",Total number of dependent children in the household (Sum of when RELAT2-8 = C),Total number of elders in household (Sum of when AGE1-8 >= 60),Total number of adults in household,What is the lead tenant's age?,The following soft validation was confirmed: You told us this person is aged %{age} years and retired. The minimum expected retirement age for %{gender} in England is %{age}.,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,Are the details of tenant 2 known?,What is person 2's relationship to the lead tenant?,"The following soft validation was confirmed: You said that [person X]'s relationship to lead tenant is partner, and that their age is [AGEX]. Are you sure this is correct?",The following soft validation was confirmed: You said that more than one person in the household is the partner of the lead tenant. Are you sure this is correct?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,Are the details of tenant 3 known?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,Are the details of tenant 4 known?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,Are the details of tenant 5 known?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,Are the details of tenant 6 known?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,Are the details of tenant 7 known?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,Are the details of tenant 8 known?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",The soft validation was confirmed,Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Was the local authority of the household's last settled home known?,The internal value to indicate if the previous LA was inferred from the postcode,Previous location LA name,Previous location's ONS LA Code,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",,What was the source of referral for this letting?,"The following soft validation was confirmed: Are you sure? This is a general needs log, and this referral type is for supported housing.",Do you know the household's combined income after tax?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Populated when someone hits the soft validation and confirmed in the service,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,What is the basic rent?,Weekly rent,Populated when the soft validation and confirmed in the service,What is the service charge?,Weekly service charge,What is the personal service charge?,Weekly personal service charge,What is the support charge?,Weekly support charge,Total charge to the tenant,Weekly total charge to the tenant,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,Populated when the soft validation and confirmed in the service,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Can you estimate the outstanding amount?,Estimated outstanding amount,Weekly total rent shortfall charge for tenant receiving housing benefit,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,created_by,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,uprn,address_line1,address_line2,town_or_city,county,postcode_full,is_la_inferred,la_label,la,uprn_known,uprn_selection,address_search_value_check,address_line1_input,postcode_full_input,address_line1_as_entered,address_line2_as_entered,town_or_city_as_entered,county_as_entered,postcode_full_as_entered,la_as_entered,unittype_gn,builtype,wchair,beds,voiddate,vacdays,void_date_value_check,majorrepairs,mrcdate,major_repairs_date_value_check,sheltered,joint,startertenancy,tenancy,tenancyother,tenancylength,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,nationality_all,ecstat1,details_known_2,relat2,partner_under_16_value_check,multiple_partners_value_check,age2,sex2,ecstat2,details_known_3,relat3,age3,sex3,ecstat3,details_known_4,relat4,age4,sex4,ecstat4,details_known_5,relat5,age5,sex5,ecstat5,details_known_6,relat6,age6,sex6,ecstat6,details_known_7,relat7,age7,sex7,ecstat7,details_known_8,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,reasonother_value_check,prevten,homeless,ppcodenk,ppostcode_full,previous_la_known,is_previous_la_inferred,prevloc_label,prevloc,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral_type,referral,referral_value_check,net_income_known,incref,incfreq,earnings,net_income_value_check,hb,has_benefits,benefits,household_charge,nocharge,period,brent,wrent,rent_value_check,scharge,wscharge,pscharge,wpschrge,supcharg,wsupchrg,tcharge,wtcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall_known,tshortfall,wtshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,single log,2025,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2025-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,No,Affordable rent basis,Tenant abandoned property,No,,Address line 1,,London,,NW9 5LL,No,Barnet,E09000003,No,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,House,Purpose built,Yes,3,2025-03-30,1,,Yes,2025-03-31,,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,4,,Yes,4,0,0,2,35,,Female,White,Irish,Australia,Other,Yes,Yes,,,32,Male,Not seeking work,No,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Yes,Tenant prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,,Other supported housing,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,No,No,,,,Yes,No,Weekly,268,,Universal Credit housing element,Yes,All,,No,Every 2 weeks,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,Yes,Yes,12.0,6.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,s.port@jeemayle.com,s.port@jeemayle.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,single log,2025,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2025-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,No,Affordable rent basis,Tenant abandoned property,No,,Address line 1,,London,,NW9 5LL,No,Barnet,E09000003,No,,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,House,Purpose built,Yes,3,2025-03-30,1,,Yes,2025-03-31,,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,4,,Yes,4,0,0,2,35,,Female,White,Irish,Australia,Other,Yes,Yes,,,32,Male,Not seeking work,No,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Yes,Tenant prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,,Other supported housing,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,No,No,,,,Yes,No,Weekly,268,,Universal Credit housing element,Yes,All,,,Every 2 weeks,200.0,100.0,,50.0,25.0,40.0,20.0,35.0,17.5,325.0,162.5,,,,Yes,Yes,12.0,6.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_non_support_codes_23.csv b/spec/fixtures/files/lettings_log_csv_export_non_support_codes_23.csv index 67afa0aa4..5234aa52b 100644 --- a/spec/fixtures/files/lettings_log_csv_export_non_support_codes_23.csv +++ b/spec/fixtures/files/lettings_log_csv_export_non_support_codes_23.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Is the UPRN known?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,What is the property's local authority?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,How many times was the property offered between becoming vacant and this letting?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,Has the tenant seen the MHCLG privacy notice?,How many people live in the household at this letting?,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8",What is the lead tenant's age?,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Previous location LA name,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,What is the basic rent?,What is the service charge?,What is the personal service charge?,What is the support charge?,Total charge to the tenant,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Estimated outstanding amount,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,offered,unittype_gn,builtype,wchair,beds,voiddate,vacdays,majorrepairs,mrcdate,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,declaration,hhmemb,refused,age1,sex1,ethnic_group,ethnic,national,ecstat1,relat2,age2,sex2,ecstat2,relat3,age3,sex3,ecstat3,relat4,age4,sex4,ecstat4,relat5,age5,sex5,ecstat5,relat6,age6,sex6,ecstat6,relat7,age7,sex7,ecstat7,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,prevloc_label,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,letting_allocation_none,referral,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,brent,scharge,pscharge,supcharg,tcharge,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,completed,,choreographer@owtluk.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,1,2023,MHCLG,MHCLG,1,7,0,2023-11-26,2,2,,,2,HIJKLMN,ABCDEFG,0,,Address line 1,,London,,NW9 5LL,Barnet,0,2,6,2,2,7,1,1,3,2023-11-24,1,1,2023-11-25,3,1,4,,2,,1,4,1,35,F,0,2,13,0,P,32,M,6,R,-9,R,10,R,-9,R,10,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,Ashford,1,0,1,0,0,0,0,0,1,0,2,0,1,268,6,1,1,,0,2,,,,200.0,50.0,40.0,35.0,325.0,1,12.0,,,,,,,,,,,,,,,,,,,, +,completed,,choreographer@owtluk.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,1,2023,MHCLG,MHCLG,1,7,0,2023-11-26,2,2,,,2,HIJKLMN,ABCDEFG,0,,Address line 1,,London,,NW9 5LL,Barnet,0,2,6,2,2,7,1,1,3,2023-11-24,1,1,2023-11-25,3,1,4,,2,,1,4,1,35,F,0,2,13,0,P,32,M,6,R,-9,R,10,R,-9,R,10,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,Ashford,1,0,1,0,0,0,0,0,1,0,2,0,1,268,6,1,1,,,2,,,,200.0,50.0,40.0,35.0,325.0,1,12.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_non_support_codes_24.csv b/spec/fixtures/files/lettings_log_csv_export_non_support_codes_24.csv index 894d69470..407e983f2 100644 --- a/spec/fixtures/files/lettings_log_csv_export_non_support_codes_24.csv +++ b/spec/fixtures/files/lettings_log_csv_export_non_support_codes_24.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,Is the UPRN known?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,What is the property's local authority?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,How many people live in the household at this letting?,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8",What is the lead tenant's age?,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Previous location LA name,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,What is the basic rent?,What is the service charge?,What is the personal service charge?,What is the support charge?,Total charge to the tenant,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Estimated outstanding amount,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,unittype_gn,builtype,wchair,beds,voiddate,vacdays,majorrepairs,mrcdate,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,hhmemb,refused,age1,sex1,ethnic_group,ethnic,nationality_all,ecstat1,relat2,age2,sex2,ecstat2,relat3,age3,sex3,ecstat3,relat4,age4,sex4,ecstat4,relat5,age5,sex5,ecstat5,relat6,age6,sex6,ecstat6,relat7,age7,sex7,ecstat7,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,prevloc_label,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,brent,scharge,pscharge,supcharg,tcharge,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,choreographer@owtluk.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,1,2024,,MHCLG,MHCLG,1,7,0,2024-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,0,,Address line 1,,London,,NW9 5LL,Barnet,0,2,6,2,7,1,1,3,2024-03-30,1,1,2024-03-31,3,1,4,,2,,4,1,35,F,0,2,36,0,P,32,M,6,R,-9,R,10,R,-9,R,10,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,Ashford,1,0,1,0,0,0,0,0,1,0,0,2,0,1,268,6,1,1,,0,2,,,,200.0,50.0,40.0,35.0,325.0,1,12.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,choreographer@owtluk.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,1,2024,,MHCLG,MHCLG,1,7,0,2024-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,0,,Address line 1,,London,,NW9 5LL,Barnet,0,2,6,2,7,1,1,3,2024-03-30,1,1,2024-03-31,3,1,4,,2,,4,1,35,F,0,2,36,0,P,32,M,6,R,-9,R,10,R,-9,R,10,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,Ashford,1,0,1,0,0,0,0,0,1,0,0,2,0,1,268,6,1,1,,,2,,,,200.0,50.0,40.0,35.0,325.0,1,12.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_non_support_codes_25.csv b/spec/fixtures/files/lettings_log_csv_export_non_support_codes_25.csv index 71588b16c..bff5edfef 100644 --- a/spec/fixtures/files/lettings_log_csv_export_non_support_codes_25.csv +++ b/spec/fixtures/files/lettings_log_csv_export_non_support_codes_25.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,Is the UPRN known?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,What is the property's local authority?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,Is this letting in sheltered accommodation?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,How many people live in the household at this letting?,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8",What is the lead tenant's age?,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Previous location LA name,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",,What was the source of referral for this letting?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,What is the basic rent?,What is the service charge?,What is the personal service charge?,What is the support charge?,Total charge to the tenant,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Estimated outstanding amount,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,unittype_gn,builtype,wchair,beds,voiddate,vacdays,majorrepairs,mrcdate,sheltered,joint,startertenancy,tenancy,tenancyother,tenancylength,hhmemb,refused,age1,sex1,ethnic_group,ethnic,nationality_all,ecstat1,relat2,age2,sex2,ecstat2,relat3,age3,sex3,ecstat3,relat4,age4,sex4,ecstat4,relat5,age5,sex5,ecstat5,relat6,age6,sex6,ecstat6,relat7,age7,sex7,ecstat7,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,prevloc_label,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral_type,referral,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,brent,scharge,pscharge,supcharg,tcharge,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,choreographer@owtluk.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,1,2025,,MHCLG,MHCLG,1,7,0,2025-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,0,2,6,2,0,,Address line 1,,London,,NW9 5LL,Barnet,7,1,1,3,2025-03-30,1,1,2025-03-31,,3,1,4,,2,4,1,35,F,0,2,36,0,P,32,M,6,R,-9,R,10,R,-9,R,10,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,Ashford,1,0,1,0,0,0,0,0,1,0,0,,,0,1,268,6,1,1,,0,2,200.0,50.0,40.0,35.0,325.0,1,12.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,choreographer@owtluk.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,1,2025,,MHCLG,MHCLG,1,7,0,2025-04-01,2,2,,,2,HIJKLMN,ABCDEFG,1,0,2,6,2,0,,Address line 1,,London,,NW9 5LL,Barnet,7,1,1,3,2025-03-30,1,1,2025-03-31,,3,1,4,,2,4,1,35,F,0,2,36,0,P,32,M,6,R,-9,R,10,R,-9,R,10,,,,,,,,,,,,,,,,,1,4,1,2,1,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,7,4,,6,1,0,TN23 6LZ,Ashford,1,0,1,0,0,0,0,0,1,0,0,,,0,1,268,6,1,1,,,2,200.0,50.0,40.0,35.0,325.0,1,12.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_non_support_labels_23.csv b/spec/fixtures/files/lettings_log_csv_export_non_support_labels_23.csv index d17aa47a6..296073a12 100644 --- a/spec/fixtures/files/lettings_log_csv_export_non_support_labels_23.csv +++ b/spec/fixtures/files/lettings_log_csv_export_non_support_labels_23.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Is the UPRN known?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,What is the property's local authority?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,How many times was the property offered between becoming vacant and this letting?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,Has the tenant seen the MHCLG privacy notice?,How many people live in the household at this letting?,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8",What is the lead tenant's age?,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Previous location LA name,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,What is the basic rent?,What is the service charge?,What is the personal service charge?,What is the support charge?,Total charge to the tenant,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Estimated outstanding amount,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,offered,unittype_gn,builtype,wchair,beds,voiddate,vacdays,majorrepairs,mrcdate,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,declaration,hhmemb,refused,age1,sex1,ethnic_group,ethnic,national,ecstat1,relat2,age2,sex2,ecstat2,relat3,age3,sex3,ecstat3,relat4,age4,sex4,ecstat4,relat5,age5,sex5,ecstat5,relat6,age6,sex6,ecstat6,relat7,age7,sex7,ecstat7,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,prevloc_label,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,letting_allocation_none,referral,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,brent,scharge,pscharge,supcharg,tcharge,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,completed,,choreographer@owtluk.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,single log,2023,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,No,,Address line 1,,London,,NW9 5LL,Barnet,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,1,Yes,2023-11-25,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,Yes,4,Yes,35,Female,White,Irish,Tenant prefers not to say,Other,Partner,32,Male,Not seeking work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Ashford,Yes,,Yes,,,,No,No,Yes,No,Tenant applied directly (no referral or nomination),No,Weekly,268,Universal Credit housing element,Yes,All,,No,Every 2 weeks,,,,200.0,50.0,40.0,35.0,325.0,Yes,12.0,,,,,,,,,,,,,,,,,,,, +,completed,,choreographer@owtluk.com,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,single log,2023,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,No,,Address line 1,,London,,NW9 5LL,Barnet,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,1,Yes,2023-11-25,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,Yes,4,Yes,35,Female,White,Irish,Tenant prefers not to say,Other,Partner,32,Male,Not seeking work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Ashford,Yes,,Yes,,,,No,No,Yes,No,Tenant applied directly (no referral or nomination),No,Weekly,268,Universal Credit housing element,Yes,All,,,Every 2 weeks,,,,200.0,50.0,40.0,35.0,325.0,Yes,12.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_non_support_labels_24.csv b/spec/fixtures/files/lettings_log_csv_export_non_support_labels_24.csv index caf21819b..4184b90c7 100644 --- a/spec/fixtures/files/lettings_log_csv_export_non_support_labels_24.csv +++ b/spec/fixtures/files/lettings_log_csv_export_non_support_labels_24.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,Is the UPRN known?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,What is the property's local authority?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,Is this letting in sheltered accommodation?,How many people live in the household at this letting?,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8",What is the lead tenant's age?,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Previous location LA name,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",What was the source of referral for this letting?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,Is this accommodation a care home?,"If this is a care home, how much does the household pay every [time period]?",Weekly care home charge,What is the basic rent?,What is the service charge?,What is the personal service charge?,What is the support charge?,Total charge to the tenant,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Estimated outstanding amount,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,unittype_gn,builtype,wchair,beds,voiddate,vacdays,majorrepairs,mrcdate,joint,startertenancy,tenancy,tenancyother,tenancylength,sheltered,hhmemb,refused,age1,sex1,ethnic_group,ethnic,nationality_all,ecstat1,relat2,age2,sex2,ecstat2,relat3,age3,sex3,ecstat3,relat4,age4,sex4,ecstat4,relat5,age5,sex5,ecstat5,relat6,age6,sex6,ecstat6,relat7,age7,sex7,ecstat7,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,prevloc_label,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,brent,scharge,pscharge,supcharg,tcharge,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,choreographer@owtluk.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,single log,2024,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2024-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,No,,Address line 1,,London,,NW9 5LL,Barnet,No,Affordable rent basis,Tenant abandoned property,No,House,Purpose built,Yes,3,2024-03-30,1,Yes,2024-03-31,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,4,Yes,35,Female,White,Irish,Australia,Other,Partner,32,Male,Not seeking work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Ashford,Yes,,Yes,,,,No,No,Yes,No,No,Tenant applied directly (no referral or nomination),No,Weekly,268,Universal Credit housing element,Yes,All,,No,Every 2 weeks,,,,200.0,50.0,40.0,35.0,325.0,Yes,12.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,choreographer@owtluk.com,false,2024-04-01T00:00:00+01:00,,2024-04-01T00:00:00+01:00,single log,2024,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2024-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,No,,Address line 1,,London,,NW9 5LL,Barnet,No,Affordable rent basis,Tenant abandoned property,No,House,Purpose built,Yes,3,2024-03-30,1,Yes,2024-03-31,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,4,Yes,35,Female,White,Irish,Australia,Other,Partner,32,Male,Not seeking work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Person prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Ashford,Yes,,Yes,,,,No,No,Yes,No,No,Tenant applied directly (no referral or nomination),No,Weekly,268,Universal Credit housing element,Yes,All,,,Every 2 weeks,,,,200.0,50.0,40.0,35.0,325.0,Yes,12.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/lettings_log_csv_export_non_support_labels_25.csv b/spec/fixtures/files/lettings_log_csv_export_non_support_labels_25.csv index 7244e286c..57f4aabdd 100644 --- a/spec/fixtures/files/lettings_log_csv_export_non_support_labels_25.csv +++ b/spec/fixtures/files/lettings_log_csv_export_non_support_labels_25.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,User the log is assigned to,Is the user in the assigned_to column the data protection officer?,Time and date the log was created,User who last updated the log,Time and date the log was last updated,Was the log submitted in-service or via bulk upload?,Year collection period opened,ID of a set of bulk uploaded logs,Which organisation owns this property?,Which organisation manages this letting?,What is the needs type?,What is the letting type?,Is this letting a renewal?,What is the tenancy start date?,"What is the rent type? (grouped into SR, IR or AR)",What is the rent type?,Which type of Intermediate Rent is this letting?,Which 'Other' type of Intermediate Rent is this letting?,Is this a London Affordable Rent letting?,What is the tenant code?,What is the property reference?,Has the tenant seen the MHCLG privacy notice?,Is this the first time the property has been let as social housing?,What rent product was the property most recently let as?,What is the reason for the property being vacant?,Is this property new to the social rented sector?,Is the UPRN known?,"If known, property's UPRN",Address line 1,Address line 2,Town or City,County,Postcode,What is the property's local authority?,What type of unit is the property?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,How many bedrooms does the property have?,What is the void date?,Number of days the property was vacant,Were any major repairs carried out during the void period?,What date were any major repairs completed on?,Is this letting in sheltered accommodation?,Is this a joint tenancy?,Is this a starter tenancy?,What is the type of tenancy?,"If 'Other', what is the type of tenancy?",What is the length of the fixed-term tenancy to the nearest year?,How many people live in the household at this letting?,"Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8",What is the lead tenant's age?,Which of these best describes the lead tenant's gender identity?,What is the lead tenant's ethnic group?,Which of these best describes the lead tenant's ethnic background?,What is the lead tenant's nationality?,Which of these best describes the lead tenant's working situation?,What is person 2's relationship to the lead tenant?,What is person 2's age?,Which of these best describes person 2's gender identity?,Which of these best describes person 2's working situation?,What is person 3's relationship to the lead tenant?,What is person 3's age?,Which of these best describes person 3's gender identity?,Which of these best describes person 3's working situation?,What is person 4's relationship to the lead tenant?,What is person 4's age?,Which of these best describes person 4's gender identity?,Which of these best describes person 4's working situation?,What is person 5's relationship to the lead tenant?,What is person 5's age?,Which of these best describes person 5's gender identity?,Which of these best describes person 5's working situation?,What is person 6's relationship to the lead tenant?,What is person 6's age?,Which of these best describes person 6's gender identity?,Which of these best describes person 6's working situation?,What is person 7's relationship to the lead tenant?,What is person 7's age?,Which of these best describes person 7's gender identity?,Which of these best describes person 7's working situation?,What is person 8's relationship to the lead tenant?,What is person 8's age?,Which of these best describes person 8's gender identity?,Which of these best describes person 8's working situation?,Does anybody in the household have links to the UK armed forces?,Is this person still serving in the UK armed forces?,Was this person seriously injured or ill as a result of serving in the UK armed forces?,Is anybody in the household pregnant?,Does anybody in the household have any disabled access needs?,"What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms)",Disabled access needs a) Fully wheelchair-accessible housing,Disabled access needs b) Wheelchair access to essential rooms,Disabled access needs c) Level access housing,Disabled access needs f) Other disabled access needs,Disabled access needs g) No disabled access needs,Disabled access needs h) Don't know,Do they have any other disabled access needs?,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more?,Does this person's condition affect their dexterity?,Does this person's condition affect their learning or understanding or concentrating?,Does this person's condition affect their hearing?,Does this person's condition affect their memory?,Does this person's condition affect their mental health?,Does this person's condition affect their mobility?,Does this person's condition affect them socially or behaviourally?,Does this person's condition affect their stamina or breathing or fatigue?,Does this person's condition affect their vision?,Does this person's condition affect them in another way?,How long has the household continuously lived in the local authority area of the new letting?,How long has the household been on the local authority waiting list for the new letting?,What is the tenant's main reason for the household leaving their last settled home?,"If 'Other', what was the main reason for leaving their last settled home?",Where was the household immediately before this letting?,Did the household experience homelessness immediately before this letting?,Previous postcode unknown or previous accommodation was temporary,What is the postcode of the household's last settled home?,Previous location LA name,Was the household given reasonable preference by the local authority?,Reasonable preference reason - They were homeless or about to lose their home (within 56 days),"Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing",Reasonable preference reason - They needed to move on medical and welfare reasons (including disability),Reasonable preference reason - They needed to move to avoid hardship to themselves or others,Reasonable preference reason - Don't Know,Was the letting made under Choice-Based Lettings (CBL)?,Was the letting made under the Common Allocation Policy (CAP)?,Was the letting made under the Common Housing Register (CHR)?,Was the letting made under the Accessible Register?,"The letting was not allocated under CBL, CAP, CHR or Accessible Register.",,What was the source of referral for this letting?,Was the household income refused?,How often does the household receive income?,How much income does the household have in total?,Is the tenant likely to be receiving any of these housing-related benefits?,"Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank","How much of the household's income is from Universal Credit, state pensions or benefits?",Does the household pay rent or other charges for the accommodation?,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no,How often does the household pay rent and other charges?,What is the basic rent?,What is the service charge?,What is the personal service charge?,What is the support charge?,Total charge to the tenant,"After the household has received any housing-related benefits, will they still need to pay for rent and charges?",Estimated outstanding amount,What scheme does this letting belong to?,"From scheme code, we map to the scheme name",Does the scheme contain confidential information?,"What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing",Is this scheme registered under the Care Standards Act 2000?,Which organisation owns the housing stock for this scheme?,What client group is this scheme intended for?,Does this scheme provide for another client group?,What is the other client group?,What support does this scheme provide?,Intended length of stay,Date scheme was created,Which location is this letting for?,What is the postcode for this location?,What is the name of this location?,How many units are at this location?,What is the most common type of unit at this location?,What are the mobility standards for the majority of the units in this location?,What is the local authority of this postcode?,When did the first property in this location become available under this scheme? id,status,duplicate_set_id,assigned_to,is_dpo,created_at,updated_by,updated_at,creation_method,collection_start_year,bulk_upload_id,owning_organisation_name,managing_organisation_name,needstype,lettype,renewal,startdate,renttype,renttype_detail,irproduct,irproduct_other,lar,tenancycode,propcode,declaration,first_time_property_let_as_social_housing,unitletas,rsnvac,newprop,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,unittype_gn,builtype,wchair,beds,voiddate,vacdays,majorrepairs,mrcdate,sheltered,joint,startertenancy,tenancy,tenancyother,tenancylength,hhmemb,refused,age1,sex1,ethnic_group,ethnic,nationality_all,ecstat1,relat2,age2,sex2,ecstat2,relat3,age3,sex3,ecstat3,relat4,age4,sex4,ecstat4,relat5,age5,sex5,ecstat5,relat6,age6,sex6,ecstat6,relat7,age7,sex7,ecstat7,relat8,age8,sex8,ecstat8,armedforces,leftreg,reservist,preg_occ,housingneeds,housingneeds_type,housingneeds_a,housingneeds_b,housingneeds_c,housingneeds_f,housingneeds_g,housingneeds_h,housingneeds_other,illness,illness_type_4,illness_type_5,illness_type_2,illness_type_6,illness_type_7,illness_type_3,illness_type_9,illness_type_8,illness_type_1,illness_type_10,layear,waityear,reason,reasonother,prevten,homeless,ppcodenk,ppostcode_full,prevloc_label,reasonpref,rp_homeless,rp_insan_unsat,rp_medwel,rp_hardship,rp_dontknow,cbl,cap,chr,accessible_register,letting_allocation_none,referral_type,referral,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,brent,scharge,pscharge,supcharg,tcharge,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_confidential,SCHTYPE,scheme_registered_under_care_act,scheme_owning_organisation_name,scheme_primary_client_group,scheme_has_other_client_group,scheme_secondary_client_group,scheme_support_type,scheme_intended_stay,scheme_created_at,location_code,location_postcode,location_name,location_units,location_type_of_unit,location_mobility_type,location_local_authority,location_startdate -,in_progress,,choreographer@owtluk.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,single log,2025,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2025-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,No,Affordable rent basis,Tenant abandoned property,No,No,,Address line 1,,London,,NW9 5LL,Barnet,House,Purpose built,Yes,3,2025-03-30,1,Yes,2025-03-31,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,4,Yes,35,Female,White,Irish,Australia,Other,Yes,32,Male,Not seeking work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Tenant prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Ashford,Yes,,Yes,,,,No,No,Yes,No,No,,,No,Weekly,268,Universal Credit housing element,Yes,All,,No,Every 2 weeks,200.0,50.0,40.0,35.0,325.0,Yes,12.0,,,,,,,,,,,,,,,,,,,, +,in_progress,,choreographer@owtluk.com,false,2025-04-01T00:00:00+01:00,,2025-04-01T00:00:00+01:00,single log,2025,,MHCLG,MHCLG,General needs,Affordable rent general needs local authority,No,2025-04-01,Affordable Rent,Affordable Rent,,,No,HIJKLMN,ABCDEFG,Yes,No,Affordable rent basis,Tenant abandoned property,No,No,,Address line 1,,London,,NW9 5LL,Barnet,House,Purpose built,Yes,3,2025-03-30,1,Yes,2025-03-31,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,4,Yes,35,Female,White,Irish,Australia,Other,Yes,32,Male,Not seeking work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,Tenant prefers not to say,Not known,Person prefers not to say,Person prefers not to say,,,,,,,,,,,,,,,,,Yes – the person is a current or former regular,No – they left up to and including 5 years ago,Yes,No,Yes,Fully wheelchair accessible housing,Yes,No,No,No,No,No,No,Yes,No,No,Yes,No,No,No,No,No,No,No,Less than 1 year,1 year but under 2 years,Loss of tied accommodation,,Other supported housing,No,Yes,TN23 6LZ,Ashford,Yes,,Yes,,,,No,No,Yes,No,No,,,No,Weekly,268,Universal Credit housing element,Yes,All,,,Every 2 weeks,200.0,50.0,40.0,35.0,325.0,Yes,12.0,,,,,,,,,,,,,,,,,,,, diff --git a/spec/fixtures/files/sales_logs_csv_export_labels_25.csv b/spec/fixtures/files/sales_logs_csv_export_labels_25.csv index 42d225d61..c581e1baa 100644 --- a/spec/fixtures/files/sales_logs_csv_export_labels_25.csv +++ b/spec/fixtures/files/sales_logs_csv_export_labels_25.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,Which organisation owned this property before the sale?,Which organisation owned this property before the sale? (ID),Which organisation reported the sale?,Which organisation reported the sale? (ID),Time and date the log was created,User that created the log (email),User that created the log (ID),User the log is assigned to (email),User the log is assigned to (ID),Time and date the log was last updated,User that last amended the log (email),User that last amended the log (ID),Was the log submitted in-service or via bulk upload?,ID of a set of bulk uploaded logs,Year collection period opened,Day of sale completion date,Month of sale completion date,Year of sale completion date,What is the purchaser code?,Shared or discounted ownership,Type of ownership,Is this a staircasing transaction?,Is this a joint purchase?,Are there more than 2 joint buyers of this property?,Did you interview the buyer to answer these questions?,Has the buyer seen the MHCLG privacy notice?,What is the UPRN of the property?,Address line 1,Address line 2,Town/City,County,Postcode,The internal value to indicate if the LA was inferred from the postcode,LA name,LA code,UPRN of the address selected,Was the 'No address found' page seen?,Address line 1 input from address matching feature,Postcode input from address matching feature,Address line 1 entered in bulk upload file,Address line 2 entered in bulk upload file,Town or city entered in bulk upload file,County entered in bulk upload file,Postcode entered in bulk upload file,Local authority entered in bulk upload file,What type of unit is the property?,How many bedrooms does the property have?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,What is buyer 1's age?,Which of these best describes buyer 1's gender identity?,What is buyer 1's ethnic group?,Which of the following best describes buyer 1's ethnic background?,What is buyer 1's nationality?,Which of these best describes buyer 1's working situation?,Will buyer 1 live in the property?,Is buyer 2 or person 2 the partner of buyer 1?,What is buyer 2 or person 2's age?,Which of these best describes buyer 2 or person 2's gender identity?,What is buyer 2's ethnic group?,Which of the following best describes buyer 2's ethnic background?,What is buyer 2's nationality?,What is buyer 2 or person 2's working situation?,Will buyer 2 live in the property?,"Besides the buyer(s), how many other people live or will live in the property?",Is person 3 the partner of buyer 1?,What is person 3's age?,What is person 3's gender identity?,What is person 3's working situation?,Is person 4 the partner of buyer 1?,What is person 4's age?,What is person 4's gender identity?,What is person 4's working situation?,Is person 5 the partner of buyer 1?,What is person 5's age?,What is person 5's gender identity?,What is person 5's working situation?,Is person 6 the partner of buyer 1?,What is person 6's age?,What is person 6's gender identity?,What is person 6's working situation?,Household type,What was buyer 1's previous tenure?,Do you know the postcode of buyer 1's last settled accommodation?,Part 1 of postcode of buyer 1's last settled accommodation,Part 2 of postcode of buyer 1's last settled accommodation,Do you know the local authority of buyer 1's last settled accommodation?,The local authority code of buyer 1's last settled accommodation,The local authority name of buyer 1's last settled accommodation,"At the time of purchase, was buyer 2 living at the same address as buyer 1?",What was buyer 2's previous tenure?,Have any of the buyers ever served as a regular in the UK armed forces?,Is the buyer still serving in the UK armed forces?,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?,Does anyone in the household consider themselves to have a disability?,Does anyone in the household use a wheelchair?,Is buyer 1's annual income known?,What is buyer 1's annual income?,Was buyer 1's income used for a mortgage application?,Is buyer 1's annual income known?,What is buyer 2's annual income?,Was buyer 2's income used for a mortgage application?,Were the buyers receiving any of these housing-related benefits immediately before buying this property?,Is the the total amount the buyers had in savings known?,What is the total amount the buyers had in savings before they paid any deposit for the property?,Have any of the buyers previously owned a property?,Was the previous property under shared ownership?,Is this a resale?,How long did the buyer(s) live in the property before purchasing it?,Day of the practical completion or handover date,Month of the practical completion or handover date,Year of the practical completion or handover date,How many bedrooms did the buyer's previous property have?,What was the previous property type?,What was the rent type of buyer's previous tenure?,What is the full purchase price?,Populated if a soft validation is confirmed.,What was the initial percentage equity stake purchased?,Was a mortgage used to buy this property?,What is the mortgage amount?,What is the length of the mortgage in years?,How much was the cash deposit paid on the property?,How much cash discount was given through Social Homebuy?,What is the basic monthly rent?,Does the property have any service charges?,Monthly service charges amount,Does the property have an estate management fee?,Monthly estate management fee amount,What percentage of the property has been bought in this staircasing transaction?,What percentage of the property do the buyers now own in total?,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market?,Is this the first time the shared owner has engaged in staircasing in the home?,"Including this time, how many times has the shared owner engaged in staircasing in the home?",Day of last staircasing transaction,Month of last staircasing transaction,Year of last staircasing transaction,Day of initial staircasing transaction,Month of initial staircasing transaction,Year of initial staircasing transaction,What was the basic monthly rent prior to staircasing?,"What was the amount of any loan, grant, discount or subsidy given?",What was the percentage discount?,Does this include any extra borrowing?,Does the property have any monthly leasehold charges?,What are the total monthly leasehold charges for the property?,Populated if a soft validation is confirmed ID,STATUS,DUPLICATESET,OWNINGORGNAME,OWNINGORGID,MANINGORGNAME,MANINGORGID,CREATEDDATE,CREATEDBY,CREATEDBYID,USERNAME,USERNAMEID,UPLOADDATE,AMENDEDBY,AMENDEDBYID,CREATIONMETHOD,BULKUPLOADID,COLLECTIONYEAR,DAY,MONTH,YEAR,PURCHID,OWNERSHIP,TYPE,STAIRCASE,JOINT,JOINTMORE,NOINT,PRIVACYNOTICE,UPRN,ADDRESS1,ADDRESS2,TOWNCITY,COUNTY,POSTCODE,ISLAINFERRED,LANAME,LA,UPRNSELECTED,ADDRESS_SEARCH_VALUE_CHECK,ADDRESS1INPUT,POSTCODEINPUT,BULKADDRESS1,BULKADDRESS2,BULKTOWNCITY,BULKCOUNTY,BULKPOSTCODE,BULKLA,PROPTYPE,BEDS,BUILTYPE,WCHAIR,AGE1,SEX1,ETHNICGROUP1,ETHNIC,NATIONALITYALL1,ECSTAT1,LIVEINBUYER1,RELAT2,AGE2,SEX2,ETHNICGROUP2,ETHNIC2,NATIONALITYALL2,ECSTAT2,LIVEINBUYER2,HHOLDCOUNT,RELAT3,AGE3,SEX3,ECSTAT3,RELAT4,AGE4,SEX4,ECSTAT4,RELAT5,AGE5,SEX5,ECSTAT5,RELAT6,AGE6,SEX6,ECSTAT6,HHTYPE,PREVTEN,PPCODENK,PPOSTC1,PPOSTC2,PREVIOUSLAKNOWN,PREVLOC,PREVLOCNAME,BUY2LIVING,PREVTEN2,HHREGRES,HHREGRESSTILL,ARMEDFORCESSPOUSE,DISABLED,WHEEL,INC1NK,INCOME1,INC1MORT,INC2NK,INCOME2,INC2MORT,HB,SAVINGSNK,SAVINGS,PREVOWN,PREVSHARED,RESALE,PROPLEN,HODAY,HOMONTH,HOYEAR,FROMBEDS,FROMPROP,SOCPREVTEN,VALUE,VALUE_VALUE_CHECK,EQUITY,MORTGAGEUSED,MORTGAGE,MORTLEN1,DEPOSIT,CASHDIS,MRENT,HASSERVICECHARGES,SERVICECHARGES,HASESTATEFEE,ESTATEFEE,STAIRBOUGHT,STAIROWNED,STAIRCASETOSALE,FIRSTSTAIR,NUMSTAIR,STAIRLASTDAY,STAIRLASTMONTH,STAIRLASTYEAR,STAIRINITIALDAY,STAIRINITIALMONTH,STAIRINITIALYEAR,MRENTPRESTAIRCASING,GRANT,DISCOUNT,EXTRABOR,HASMSCHARGE,MSCHARGE,MSCHARGE_VALUE_CHECK -,completed,,MHCLG,,MHCLG,,2025-05-01T00:00:00+01:00,billyboy@eyeklaud.com,,billyboy@eyeklaud.com,,2025-05-01T00:00:00+01:00,,,single log,,2025,1,5,2025,,Discounted Ownership,Right to Acquire (RTA),,Yes,Yes,Yes,1,1,"1, Test Street",,Test Town,,AA1 1AA,Yes,Westminster,E09000033,1,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,Flat or maisonette,2,Purpose built,Yes,30,Non-binary,Buyer prefers not to say,17,United Kingdom,Full-time - 30 hours or more,Yes,Yes,35,Non-binary,Buyer prefers not to say,,United Kingdom,Full-time - 30 hours or more,Yes,3,No,14,Non-binary,Child under 16,No,Not known,Non-binary,In government training into work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,,,,,6,Local authority tenant,Yes,SW1A,1AA,Yes,E09000033,Westminster,Don’t know,,Yes,Yes,No,Yes,Yes,Yes,13400,Yes,Yes,13400,Yes,Don’t know ,No,,Yes,No,,10,,,,,,,110000.0,,,Yes,20000.0,10,80000.0,,,,,,,,,,,,,,,,,,,10000.0,,Yes,Yes,100.0, \ No newline at end of file +,completed,,MHCLG,,MHCLG,,2025-05-01T00:00:00+01:00,billyboy@eyeklaud.com,,billyboy@eyeklaud.com,,2025-05-01T00:00:00+01:00,,,single log,,2025,1,5,2025,,Discounted Ownership,Right to Acquire (RTA),,Yes,Yes,Yes,1,1,"1, Test Street",,Test Town,,AA1 1AA,Yes,Westminster,E09000033,1,,,,address line 1 as entered,address line 2 as entered,town or city as entered,county as entered,AB1 2CD,la as entered,Flat or maisonette,2,Purpose built,Yes,30,Non-binary,Buyer prefers not to say,17,United Kingdom,Full-time – 30 hours or more per week,Yes,Yes,35,Non-binary,Buyer prefers not to say,,United Kingdom,Full-time – 30 hours or more per week,Yes,3,No,14,Non-binary,Child under 16,No,Not known,Non-binary,In government training into work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,,,,,6,Local authority tenant,Yes,SW1A,1AA,Yes,E09000033,Westminster,Don’t know,,Yes,Yes,No,Yes,Yes,Yes,13400,Yes,Yes,13400,Yes,Don’t know ,No,,Yes,No,,10,,,,,,,110000.0,,,Yes,20000.0,10,80000.0,,,,,,,,,,,,,,,,,,,10000.0,,Yes,Yes,100.0, diff --git a/spec/fixtures/files/sales_logs_csv_export_non_support_labels_25.csv b/spec/fixtures/files/sales_logs_csv_export_non_support_labels_25.csv index 30ea53b5c..45e7819ef 100644 --- a/spec/fixtures/files/sales_logs_csv_export_non_support_labels_25.csv +++ b/spec/fixtures/files/sales_logs_csv_export_non_support_labels_25.csv @@ -1,3 +1,3 @@ Log ID,Status of log,ID of a set of duplicate logs,Which organisation owned this property before the sale?,Which organisation owned this property before the sale? (ID),Which organisation reported the sale?,Which organisation reported the sale? (ID),Time and date the log was created,User the log is assigned to (email),User the log is assigned to (ID),Time and date the log was last updated,User that last amended the log (email),User that last amended the log (ID),Was the log submitted in-service or via bulk upload?,ID of a set of bulk uploaded logs,Year collection period opened,Day of sale completion date,Month of sale completion date,Year of sale completion date,What is the purchaser code?,Shared or discounted ownership,Type of ownership,Is this a staircasing transaction?,Is this a joint purchase?,Are there more than 2 joint buyers of this property?,Did you interview the buyer to answer these questions?,Has the buyer seen the MHCLG privacy notice?,What is the UPRN of the property?,We found an address that might be this property. Is this the property address?,Address line 1 input from address matching feature,Postcode input from address matching feature,UPRN of the address selected,Address line 1,Address line 2,Town/City,County,Part 1 of the property's postcode,Part 2 of the property's postcode,LA code,LA name,What type of unit is the property?,How many bedrooms does the property have?,Which type of building is the property?,Is the property built or adapted to wheelchair-user standards?,What is buyer 1's age?,Which of these best describes buyer 1's gender identity?,What is buyer 1's ethnic group?,Which of the following best describes buyer 1's ethnic background?,What is buyer 1's nationality?,Which of these best describes buyer 1's working situation?,Will buyer 1 live in the property?,Is buyer 2 or person 2 the partner of buyer 1?,What is buyer 2 or person 2's age?,Which of these best describes buyer 2 or person 2's gender identity?,What is buyer 2's ethnic group?,Which of the following best describes buyer 2's ethnic background?,What is buyer 2's nationality?,What is buyer 2 or person 2's working situation?,Will buyer 2 live in the property?,"Besides the buyer(s), how many other people live or will live in the property?",Is person 3 the partner of buyer 1?,What is person 3's age?,What is person 3's gender identity?,What is person 3's working situation?,Is person 4 the partner of buyer 1?,What is person 4's age?,What is person 4's gender identity?,What is person 4's working situation?,Is person 5 the partner of buyer 1?,What is person 5's age?,What is person 5's gender identity?,What is person 5's working situation?,Is person 6 the partner of buyer 1?,What is person 6's age?,What is person 6's gender identity?,What is person 6's working situation?,Household type,What was buyer 1's previous tenure?,Do you know the postcode of buyer 1's last settled accommodation?,Part 1 of postcode of buyer 1's last settled accommodation,Part 2 of postcode of buyer 1's last settled accommodation,Do you know the local authority of buyer 1's last settled accommodation?,The local authority code of buyer 1's last settled accommodation,The local authority name of buyer 1's last settled accommodation,"At the time of purchase, was buyer 2 living at the same address as buyer 1?",What was buyer 2's previous tenure?,Have any of the buyers ever served as a regular in the UK armed forces?,Is the buyer still serving in the UK armed forces?,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years?,Does anyone in the household consider themselves to have a disability?,Does anyone in the household use a wheelchair?,Is buyer 1's annual income known?,What is buyer 1's annual income?,Was buyer 1's income used for a mortgage application?,Is buyer 1's annual income known?,What is buyer 2's annual income?,Was buyer 2's income used for a mortgage application?,Were the buyers receiving any of these housing-related benefits immediately before buying this property?,Is the the total amount the buyers had in savings known?,What is the total amount the buyers had in savings before they paid any deposit for the property?,Have any of the buyers previously owned a property?,Was the previous property under shared ownership?,Is this a resale?,How long did the buyer(s) live in the property before purchasing it?,Day of the practical completion or handover date,Month of the practical completion or handover date,Year of the practical completion or handover date,How many bedrooms did the buyer's previous property have?,What was the previous property type?,What was the rent type of buyer's previous tenure?,What is the full purchase price?,What was the initial percentage equity stake purchased?,Was a mortgage used to buy this property?,What is the mortgage amount?,What is the length of the mortgage in years?,How much was the cash deposit paid on the property?,How much cash discount was given through Social Homebuy?,What is the basic monthly rent?,Does the property have any service charges?,Monthly service charges amount,Does the property have an estate management fee?,Monthly estate management fee amount,What percentage of the property has been bought in this staircasing transaction?,What percentage of the property do the buyers now own in total?,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market?,Is this the first time the shared owner has engaged in staircasing in the home?,"Including this time, how many times has the shared owner engaged in staircasing in the home?",Day of last staircasing transaction,Month of last staircasing transaction,Year of last staircasing transaction,Day of initial staircasing transaction,Month of initial staircasing transaction,Year of initial staircasing transaction,What was the basic monthly rent prior to staircasing?,"What was the amount of any loan, grant, discount or subsidy given?",What was the percentage discount?,Does this include any extra borrowing?,Does the property have any monthly leasehold charges?,What are the total monthly leasehold charges for the property? id,status,duplicate_set_id,owning_organisation_name,owning_organisation_id,managing_organisation_name,managing_organisation_id,created_at,assigned_to,assigned_to_id,updated_at,updated_by,updated_by_id,creation_method,bulk_upload_id,collection_start_year,day,month,year,purchid,ownershipsch,type,staircase,jointpur,jointmore,noint,privacynotice,uprn,uprn_confirmed,address_line1_input,postcode_full_input,uprn_selection,address_line1,address_line2,town_or_city,county,pcode1,pcode2,la,la_label,proptype,beds,builtype,wchair,age1,sex1,ethnic_group,ethnic,nationality_all,ecstat1,buy1livein,relat2,age2,sex2,ethnic_group2,ethnicbuy2,nationality_all_buyer2,ecstat2,buy2livein,hholdcount,relat3,age3,sex3,ecstat3,relat4,age4,sex4,ecstat4,relat5,age5,sex5,ecstat5,relat6,age6,sex6,ecstat6,hhtype,prevten,ppcodenk,ppostc1,ppostc2,previous_la_known,prevloc,prevloc_label,buy2living,prevtenbuy2,hhregres,hhregresstill,armedforcesspouse,disabled,wheel,income1nk,income1,inc1mort,income2nk,income2,inc2mort,hb,savingsnk,savings,prevown,prevshared,resale,proplen,hoday,homonth,hoyear,frombeds,fromprop,socprevten,value,equity,mortgageused,mortgage,mortlen,deposit,cashdis,mrent,has_servicecharges,servicecharges,has_management_fee,management_fee,stairbought,stairowned,staircasesale,firststair,numstair,stairlastday,stairlastmonth,stairlastyear,stairinitialday,stairinitialmonth,stairinitialyear,mrentprestaircasing,grant,discount,extrabor,has_mscharge,mscharge -,completed,,MHCLG,,MHCLG,,2025-05-01T00:00:00+01:00,billyboy@eyeklaud.com,,2025-05-01T00:00:00+01:00,,,single log,,2025,1,5,2025,,Discounted Ownership,Right to Acquire (RTA),,Yes,Yes,Yes,1,1,Yes,,,1,"1, Test Street",,Test Town,,SW1A,1AA,E09000033,Westminster,Flat or maisonette,2,Purpose built,Yes,30,Non-binary,Buyer prefers not to say,17,United Kingdom,Full-time - 30 hours or more,Yes,Yes,35,Non-binary,Buyer prefers not to say,,United Kingdom,Full-time - 30 hours or more,Yes,3,No,14,Non-binary,Child under 16,No,Not known,Non-binary,In government training into work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,,,,,6,Local authority tenant,Yes,SW1A,1AA,Yes,E09000033,Westminster,Don’t know,,Yes,Yes,No,Yes,Yes,Yes,13400,Yes,Yes,13400,Yes,Don’t know ,No,,Yes,No,,10,,,,,,,110000.0,,Yes,20000.0,10,80000.0,,,,,,,,,,,,,,,,,,,10000.0,,Yes,Yes,100.0 \ No newline at end of file +,completed,,MHCLG,,MHCLG,,2025-05-01T00:00:00+01:00,billyboy@eyeklaud.com,,2025-05-01T00:00:00+01:00,,,single log,,2025,1,5,2025,,Discounted Ownership,Right to Acquire (RTA),,Yes,Yes,Yes,1,1,Yes,,,1,"1, Test Street",,Test Town,,SW1A,1AA,E09000033,Westminster,Flat or maisonette,2,Purpose built,Yes,30,Non-binary,Buyer prefers not to say,17,United Kingdom,Full-time – 30 hours or more per week,Yes,Yes,35,Non-binary,Buyer prefers not to say,,United Kingdom,Full-time – 30 hours or more per week,Yes,3,No,14,Non-binary,Child under 16,No,Not known,Non-binary,In government training into work,Prefers not to say,Not known,Prefers not to say,Prefers not to say,,,,,6,Local authority tenant,Yes,SW1A,1AA,Yes,E09000033,Westminster,Don’t know,,Yes,Yes,No,Yes,Yes,Yes,13400,Yes,Yes,13400,Yes,Don’t know ,No,,Yes,No,,10,,,,,,,110000.0,,Yes,20000.0,10,80000.0,,,,,,,,,,,,,,,,,,,10000.0,,Yes,Yes,100.0 diff --git a/spec/jobs/process_merge_request_job_spec.rb b/spec/jobs/process_merge_request_job_spec.rb index 72ccbdf26..4e73b2913 100644 --- a/spec/jobs/process_merge_request_job_spec.rb +++ b/spec/jobs/process_merge_request_job_spec.rb @@ -31,7 +31,7 @@ describe ProcessMergeRequestJob do let(:merge_request) { MergeRequest.create!(requesting_organisation: organisation, absorbing_organisation: organisation, merge_date: Time.zone.local(2022, 3, 3), existing_absorbing_organisation: false) } it "calls the merge organisations service with correct arguments" do - expect(Merge::MergeOrganisationsService).to receive(:new).with(absorbing_organisation_id: organisation.id, merging_organisation_ids: [merging_organisation.id, other_merging_organisation.id], merge_date: Time.zone.local(2022, 3, 3), absorbing_organisation_active_from_merge_date: true) + expect(Merge::MergeOrganisationsService).to receive(:new).with(absorbing_organisation_id: organisation.id, merging_organisation_ids: match_array([merging_organisation.id, other_merging_organisation.id]), merge_date: Time.zone.local(2022, 3, 3), absorbing_organisation_active_from_merge_date: true) job.perform(merge_request:) expect(merge_request.reload.status).to eq("request_merged") diff --git a/spec/lib/tasks/generate_lettings_documentation_spec.rb b/spec/lib/tasks/generate_lettings_documentation_spec.rb index eca123b4e..d7c39496d 100644 --- a/spec/lib/tasks/generate_lettings_documentation_spec.rb +++ b/spec/lib/tasks/generate_lettings_documentation_spec.rb @@ -6,14 +6,24 @@ RSpec.describe "generate_lettings_documentation" do subject(:task) { Rake::Task["generate_lettings_documentation:add_numeric_lettings_validations"] } before do + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_lettings" => FormHandler.instance.forms["current_lettings"], "previous_lettings" => "2023_form", "next_lettings" => "2025_form" }) Rake.application.rake_require("tasks/generate_lettings_documentation") Rake::Task.define_task(:environment) task.reenable end + after do + Timecop.return + Singleton.__init__(FormHandler) + end + context "when the rake task is run" do it "creates new validation documentation records" do - expect { task.invoke }.to change(LogValidation, :count) + allow(FormHandler.instance.forms).to receive(:[]).with("current_lettings").and_return(FormHandler.instance.forms["current_lettings"]) + + expect { task.invoke(2024) }.to change(LogValidation, :count) expect(LogValidation.where(validation_name: "minimum").count).to be_positive expect(LogValidation.where(validation_name: "range").count).to be_positive any_min_validation = LogValidation.where(validation_name: "minimum").first @@ -30,8 +40,194 @@ RSpec.describe "generate_lettings_documentation" do end it "skips if the validation already exists in the database" do - task.invoke - expect { task.invoke }.not_to change(LogValidation, :count) + task.invoke(2024) + expect { task.invoke(2024) }.not_to change(LogValidation, :count) + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_lettings_documentation:add_numeric_lettings_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") + end + end + end + end + + describe ":describe_lettings_validations", type: :task do + subject(:task) { Rake::Task["generate_lettings_documentation:describe_lettings_validations"] } + + let(:documentation_generator) { instance_double(DocumentationGenerator, describe_bu_validations: nil, validation_and_helper_methods: []) } + let(:client) { instance_double(OpenAI::Client) } + + before do + allow(OpenAI::Client).to receive(:new).and_return(client) + allow(DocumentationGenerator).to receive(:new).and_return(documentation_generator) + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_lettings" => "2024_form", "previous_lettings" => "2023_form", "next_lettings" => "2025_form" }) + Rake.application.rake_require("tasks/generate_lettings_documentation") + Rake::Task.define_task(:environment) + task.reenable + end + + after do + Timecop.return + Singleton.__init__(FormHandler) + end + + context "with a year given" do + it "gets the correct form for next year" do + allow(FormHandler.instance.forms).to receive(:[]).with("next_lettings").and_return("2025_form") + expect(documentation_generator).to receive(:describe_hard_validations).with(client, "2025_form", anything, anything, "lettings") + + task.invoke("2025") + end + + it "gets the correct form for current year" do + allow(FormHandler.instance.forms).to receive(:[]).with("current_lettings").and_return("2024_form") + expect(documentation_generator).to receive(:describe_hard_validations).with(client, "2024_form", anything, anything, "lettings") + task.invoke("2024") + end + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_lettings_documentation:describe_lettings_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") + end + end + end + + describe ":describe_bu_lettings_validations", type: :task do + subject(:task) { Rake::Task["generate_lettings_documentation:describe_bu_lettings_validations"] } + + let(:documentation_generator) { instance_double(DocumentationGenerator, describe_bu_validations: nil) } + let(:client) { instance_double(OpenAI::Client) } + + before do + allow(OpenAI::Client).to receive(:new).and_return(client) + allow(DocumentationGenerator).to receive(:new).and_return(documentation_generator) + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_lettings" => "2024_form", "previous_lettings" => "2023_form", "next_lettings" => "2025_form" }) + Rake.application.rake_require("tasks/generate_lettings_documentation") + Rake::Task.define_task(:environment) + task.reenable + end + + after do + Timecop.return + Singleton.__init__(FormHandler) + end + + context "with a year given" do + it "gets the correct form for next year" do + allow(FormHandler.instance.forms).to receive(:[]).with("next_lettings").and_return("2025_form") + expect(documentation_generator).to receive(:describe_bu_validations).with(client, "2025_form", anything, anything, anything, anything, "lettings") + + task.invoke("2025") + end + + it "gets the correct form for current year" do + allow(FormHandler.instance.forms).to receive(:[]).with("current_lettings").and_return("2024_form") + expect(documentation_generator).to receive(:describe_bu_validations).with(client, "2024_form", anything, anything, anything, anything, "lettings") + task.invoke("2024") + end + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_lettings_documentation:describe_bu_lettings_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") + end + end + end + + describe ":describe_soft_lettings_validations", type: :task do + subject(:task) { Rake::Task["generate_lettings_documentation:describe_soft_lettings_validations"] } + + let(:documentation_generator) { instance_double(DocumentationGenerator, describe_bu_validations: nil, get_soft_lettings_methods: []) } + let(:client) { instance_double(OpenAI::Client) } + + before do + allow(OpenAI::Client).to receive(:new).and_return(client) + allow(DocumentationGenerator).to receive(:new).and_return(documentation_generator) + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_lettings" => "2024_form", "previous_lettings" => "2023_form", "next_lettings" => "2025_form" }) + Rake.application.rake_require("tasks/generate_lettings_documentation") + Rake::Task.define_task(:environment) + task.reenable + end + + after do + Timecop.return + Singleton.__init__(FormHandler) + end + + context "with a year given" do + it "gets the correct form for next year" do + allow(FormHandler.instance.forms).to receive(:[]).with("next_lettings").and_return("2025_form") + expect(documentation_generator).to receive(:describe_soft_validations).with(client, "2025_form", anything, anything, "lettings") + + task.invoke("2025") + end + + it "gets the correct form for current year" do + allow(FormHandler.instance.forms).to receive(:[]).with("current_lettings").and_return("2024_form") + expect(documentation_generator).to receive(:describe_soft_validations).with(client, "2024_form", anything, anything, "lettings") + task.invoke("2024") + end + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_lettings_documentation:describe_soft_lettings_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") end end end diff --git a/spec/lib/tasks/generate_sales_documentation_spec.rb b/spec/lib/tasks/generate_sales_documentation_spec.rb index 4626f1a42..fb35203b1 100644 --- a/spec/lib/tasks/generate_sales_documentation_spec.rb +++ b/spec/lib/tasks/generate_sales_documentation_spec.rb @@ -6,14 +6,24 @@ RSpec.describe "generate_sales_documentation" do subject(:task) { Rake::Task["generate_sales_documentation:add_numeric_sales_validations"] } before do + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_sales" => FormHandler.instance.forms["current_sales"], "previous_sales" => "2023_form", "next_sales" => "2025_form" }) Rake.application.rake_require("tasks/generate_sales_documentation") Rake::Task.define_task(:environment) task.reenable end + after do + Timecop.return + Singleton.__init__(FormHandler) + end + context "when the rake task is run" do it "creates new validation documentation records" do - expect { task.invoke }.to change(LogValidation, :count) + allow(FormHandler.instance.forms).to receive(:[]).with("current_sales").and_return(FormHandler.instance.forms["current_sales"]) + + expect { task.invoke(2024) }.to change(LogValidation, :count) expect(LogValidation.where(validation_name: "minimum").count).to be_positive expect(LogValidation.where(validation_name: "range").count).to be_positive any_min_validation = LogValidation.where(validation_name: "minimum").first @@ -30,8 +40,194 @@ RSpec.describe "generate_sales_documentation" do end it "skips if the validation already exists in the database" do - task.invoke - expect { task.invoke }.not_to change(LogValidation, :count) + task.invoke(2024) + expect { task.invoke(2024) }.not_to change(LogValidation, :count) + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_sales_documentation:add_numeric_sales_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") + end + end + end + end + + describe ":describe_sales_validations", type: :task do + subject(:task) { Rake::Task["generate_sales_documentation:describe_sales_validations"] } + + let(:documentation_generator) { instance_double(DocumentationGenerator, describe_bu_validations: nil, validation_and_helper_methods: []) } + let(:client) { instance_double(OpenAI::Client) } + + before do + allow(OpenAI::Client).to receive(:new).and_return(client) + allow(DocumentationGenerator).to receive(:new).and_return(documentation_generator) + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_sales" => "2024_form", "previous_sales" => "2023_form", "next_sales" => "2025_form" }) + Rake.application.rake_require("tasks/generate_sales_documentation") + Rake::Task.define_task(:environment) + task.reenable + end + + after do + Timecop.return + Singleton.__init__(FormHandler) + end + + context "with a year given" do + it "gets the correct form for next year" do + allow(FormHandler.instance.forms).to receive(:[]).with("next_sales").and_return("2025_form") + expect(documentation_generator).to receive(:describe_hard_validations).with(client, "2025_form", anything, anything, "sales") + + task.invoke("2025") + end + + it "gets the correct form for current year" do + allow(FormHandler.instance.forms).to receive(:[]).with("current_sales").and_return("2024_form") + expect(documentation_generator).to receive(:describe_hard_validations).with(client, "2024_form", anything, anything, "sales") + task.invoke("2024") + end + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_sales_documentation:describe_sales_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") + end + end + end + + describe ":describe_bu_sales_validations", type: :task do + subject(:task) { Rake::Task["generate_sales_documentation:describe_bu_sales_validations"] } + + let(:documentation_generator) { instance_double(DocumentationGenerator, describe_bu_validations: nil) } + let(:client) { instance_double(OpenAI::Client) } + + before do + allow(OpenAI::Client).to receive(:new).and_return(client) + allow(DocumentationGenerator).to receive(:new).and_return(documentation_generator) + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_sales" => "2024_form", "previous_sales" => "2023_form", "next_sales" => "2025_form" }) + Rake.application.rake_require("tasks/generate_sales_documentation") + Rake::Task.define_task(:environment) + task.reenable + end + + after do + Timecop.return + Singleton.__init__(FormHandler) + end + + context "with a year given" do + it "gets the correct form for next year" do + allow(FormHandler.instance.forms).to receive(:[]).with("next_sales").and_return("2025_form") + expect(documentation_generator).to receive(:describe_bu_validations).with(client, "2025_form", anything, anything, anything, anything, "sales") + + task.invoke("2025") + end + + it "gets the correct form for current year" do + allow(FormHandler.instance.forms).to receive(:[]).with("current_sales").and_return("2024_form") + expect(documentation_generator).to receive(:describe_bu_validations).with(client, "2024_form", anything, anything, anything, anything, "sales") + task.invoke("2024") + end + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_sales_documentation:describe_bu_sales_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") + end + end + end + + describe ":describe_soft_sales_validations", type: :task do + subject(:task) { Rake::Task["generate_sales_documentation:describe_soft_sales_validations"] } + + let(:documentation_generator) { instance_double(DocumentationGenerator, describe_bu_validations: nil, get_soft_sales_methods: []) } + let(:client) { instance_double(OpenAI::Client) } + + before do + allow(OpenAI::Client).to receive(:new).and_return(client) + allow(DocumentationGenerator).to receive(:new).and_return(documentation_generator) + Timecop.freeze(Time.zone.local(2025, 1, 1)) + Singleton.__init__(FormHandler) + allow(FormHandler.instance).to receive(:forms).and_return({ "current_sales" => "2024_form", "previous_sales" => "2023_form", "next_sales" => "2025_form" }) + Rake.application.rake_require("tasks/generate_sales_documentation") + Rake::Task.define_task(:environment) + task.reenable + end + + after do + Timecop.return + Singleton.__init__(FormHandler) + end + + context "with a year given" do + it "gets the correct form for next year" do + allow(FormHandler.instance.forms).to receive(:[]).with("next_sales").and_return("2025_form") + expect(documentation_generator).to receive(:describe_soft_validations).with(client, "2025_form", anything, anything, "sales") + + task.invoke("2025") + end + + it "gets the correct form for current year" do + allow(FormHandler.instance.forms).to receive(:[]).with("current_sales").and_return("2024_form") + expect(documentation_generator).to receive(:describe_soft_validations).with(client, "2024_form", anything, anything, "sales") + task.invoke("2024") + end + end + + context "with no year given" do + it "raises an error" do + expect { task.invoke(nil) }.to raise_error(RuntimeError, "Usage: rake generate_sales_documentation:describe_soft_sales_validations['year']") + end + end + + context "with an invalid year given" do + it "raises an error" do + expect { task.invoke("abc") }.to raise_error(RuntimeError, "No form found for given year") + end + end + + context "with a year for non existing form" do + it "raises an error" do + expect { task.invoke("2022") }.to raise_error(RuntimeError, "No form found for given year") end end end diff --git a/spec/lib/tasks/recalculate_nocharges_spec.rb b/spec/lib/tasks/recalculate_nocharges_spec.rb new file mode 100644 index 000000000..c84460017 --- /dev/null +++ b/spec/lib/tasks/recalculate_nocharges_spec.rb @@ -0,0 +1,53 @@ +require "rails_helper" +require "rake" + +RSpec.describe "recalculate_nocharges", type: :task do + before do + Rake.application.rake_require("tasks/recalculate_nocharges") + Rake::Task.define_task(:environment) + task.reenable + end + + describe "bulk_update:update_current_logs_nocharges" do + let(:task) { Rake::Task["bulk_update:update_current_logs_nocharges"] } + let(:organisation) { FactoryBot.create(:organisation, name: "MHCLG", provider_type: "LA", housing_registration_no: 1234) } + let(:user) { FactoryBot.create(:user, organisation:, email: "fake@email.com") } + let(:scheme) { FactoryBot.create(:scheme, :export, owning_organisation: organisation) } + let(:location) { FactoryBot.create(:location, :export, scheme:, startdate: Time.zone.local(2021, 4, 1), old_id: "1a") } + + let(:log_to_update) do + build(:lettings_log, :completed, :sh, needstype: 2, scheme:, location:, assigned_to: user, startdate: Time.zone.local(2024, 6, 1), age1: 35, sex1: "F", age2: 32, sex2: "M", underoccupation_benefitcap: 4, sheltered: 1, household_charge: 0, nocharge: 1) + end + + let(:log_not_to_update) do + build(:lettings_log, :completed, needstype: 2, household_charge: 1, nocharge: 1) + end + + context "when running the task" do + before do + log_to_update.save!(validate: false) + log_not_to_update.save!(validate: false) + end + + it "updates logs where household_charge and nocharge are different" do + expect(log_to_update.nocharge).to eq(1) + expect(log_to_update.household_charge).to eq(0) + + task.invoke + + log_to_update.reload + expect(log_to_update.nocharge).to eq(0) + end + + it "does not update logs where household_charge and nocharge are the same" do + expect(log_not_to_update.nocharge).to eq(1) + expect(log_not_to_update.household_charge).to eq(1) + + task.invoke + + log_not_to_update.reload + expect(log_not_to_update.nocharge).to eq(1) + end + end + end +end diff --git a/spec/lib/tasks/update_manual_address_entry_selected_prexisting_logs_spec.rb b/spec/lib/tasks/update_manual_address_entry_selected_prexisting_logs_spec.rb new file mode 100644 index 000000000..cbcf6e0e8 --- /dev/null +++ b/spec/lib/tasks/update_manual_address_entry_selected_prexisting_logs_spec.rb @@ -0,0 +1,211 @@ +require "rails_helper" +require "rake" + +RSpec.describe "update_manual_address_entry_selected_preexisting_logs_spec", type: :task do + before do + Rake.application.rake_require("tasks/update_manual_address_entry_selected_prexisting_logs") + Rake::Task.define_task(:environment) + task.reenable + end + + describe "bulk_update:update_manual_address_entry_selected" do + let(:task) { Rake::Task["bulk_update:update_manual_address_entry_selected"] } + + let(:lettings_log_uprn_entered) do + build(:lettings_log, :completed, startdate: Time.zone.local(2024, 6, 1), needstype: 1, manual_address_entry_selected: false) + end + + let(:lettings_log_uprn_found) do + build(:lettings_log, :completed, startdate: Time.zone.local(2024, 9, 1), needstype: 1, manual_address_entry_selected: false, address_line1_input: "1 Test Street", postcode_full_input: "SW1 1AA") + end + + let(:lettings_log_address_fields_not_entered) do + build(:lettings_log, :inprogress_without_address_fields, startdate: Time.zone.local(2024, 9, 1), needstype: 1) + end + + let(:lettings_log_address_manually_entered) do + build(:lettings_log, :completed_without_uprn, startdate: Time.zone.local(2024, 12, 1), needstype: 1) + end + + let(:sales_log_uprn_entered) do + build(:sales_log, :completed, saledate: Time.zone.local(2024, 12, 1), manual_address_entry_selected: false) + end + + let(:sales_log_uprn_found) do + build(:sales_log, :completed, saledate: Time.zone.local(2024, 7, 1), manual_address_entry_selected: false, address_line1_input: "1 Test Street", postcode_full_input: "SW1 1AA") + end + + let(:sales_log_address_fields_not_entered) do + build(:sales_log, :inprogress_without_address_fields, saledate: Time.zone.local(2024, 12, 30)) + end + + let(:sales_log_address_manually_entered) do + build(:sales_log, :completed_without_uprn, saledate: Time.zone.local(2024, 12, 30)) + end + + context "when running the task" do + context "when logs do not meet the criteria" do + before do + lettings_log_uprn_found.save!(validate: false) + lettings_log_uprn_entered.save!(validate: false) + lettings_log_address_fields_not_entered.save!(validate: false) + + sales_log_uprn_found.save!(validate: false) + sales_log_uprn_entered.save!(validate: false) + sales_log_address_fields_not_entered.save!(validate: false) + end + + it "does not update logs with a UPRN entered" do + task.invoke + + lettings_log_uprn_entered.reload + sales_log_uprn_entered.reload + + expect(lettings_log_uprn_entered.manual_address_entry_selected).to be false + expect(lettings_log_uprn_entered.uprn).to eq("10033558653") + expect(sales_log_uprn_entered.manual_address_entry_selected).to be false + expect(sales_log_uprn_entered.uprn).to eq("10033558653") + end + + it "does not update logs with a UPRN found" do + task.invoke + + lettings_log_uprn_found.reload + sales_log_uprn_found.reload + + expect(lettings_log_uprn_found.manual_address_entry_selected).to be false + expect(lettings_log_uprn_found.uprn).to eq("10033558653") + expect(sales_log_uprn_found.manual_address_entry_selected).to be false + expect(sales_log_uprn_found.uprn).to eq("10033558653") + end + + it "does not update logs with no UPRN or address fields entered" do + task.invoke + + lettings_log_address_fields_not_entered.reload + sales_log_address_fields_not_entered.reload + + expect(lettings_log_address_fields_not_entered.manual_address_entry_selected).to be false + expect(sales_log_address_fields_not_entered.manual_address_entry_selected).to be false + end + end + + context "when logs do meet the criteria" do + before do + lettings_log_address_manually_entered.manual_address_entry_selected = false + lettings_log_address_manually_entered.save!(validate: false) + + sales_log_address_manually_entered.manual_address_entry_selected = false + sales_log_address_manually_entered.save!(validate: false) + end + + it "updates logs with an address manually entered" do + expect(lettings_log_address_manually_entered.manual_address_entry_selected).to be false + expect(lettings_log_address_manually_entered.address_line1).to eq("1 Test Street") + expect(lettings_log_address_manually_entered.address_line2).to eq("Testville") + expect(lettings_log_address_manually_entered.town_or_city).to eq("Testford") + expect(lettings_log_address_manually_entered.postcode_full).to eq("SW1 1AA") + + expect(sales_log_address_manually_entered.manual_address_entry_selected).to be false + expect(sales_log_address_manually_entered.address_line1).to eq("1 Test Street") + expect(sales_log_address_manually_entered.address_line2).to eq("Testville") + expect(sales_log_address_manually_entered.town_or_city).to eq("Testford") + expect(sales_log_address_manually_entered.postcode_full).to eq("SW1 1AA") + + task.invoke + + lettings_log_address_manually_entered.reload + sales_log_address_manually_entered.reload + + expect(lettings_log_address_manually_entered.manual_address_entry_selected).to be true + expect(lettings_log_address_manually_entered.address_line1).to eq("1 Test Street") + expect(lettings_log_address_manually_entered.address_line2).to eq("Testville") + expect(lettings_log_address_manually_entered.town_or_city).to eq("Testford") + expect(lettings_log_address_manually_entered.postcode_full).to eq("SW1 1AA") + + expect(sales_log_address_manually_entered.manual_address_entry_selected).to be true + expect(sales_log_address_manually_entered.address_line1).to eq("1 Test Street") + expect(sales_log_address_manually_entered.address_line2).to eq("Testville") + expect(sales_log_address_manually_entered.town_or_city).to eq("Testford") + expect(sales_log_address_manually_entered.postcode_full).to eq("SW1 1AA") + end + end + end + end + + describe "bulk_update:update_postcode_full_preexisting_manual_entry_logs" do + let(:task) { Rake::Task["bulk_update:update_postcode_full_preexisting_manual_entry_logs"] } + + let(:lettings_log_to_fix) do + build(:lettings_log, :inprogress_without_address_fields, startdate: Time.zone.local(2024, 6, 1), updated_at: Time.zone.parse("2025-03-19 16:30:00")) + end + + let(:bu_lettings_log_to_fix) do + build(:lettings_log, :inprogress_without_address_fields, startdate: Time.zone.local(2024, 6, 1), creation_method: "bulk upload", updated_at: Time.zone.parse("2025-03-19 16:30:00")) + end + + let(:lettings_log_not_to_fix) do + build(:lettings_log, :inprogress_without_address_fields, startdate: Time.zone.local(2024, 6, 1), updated_at: Time.zone.parse("2025-03-19 15:30:00")) + end + + before do + lettings_log_to_fix.manual_address_entry_selected = true + lettings_log_to_fix.address_line1 = "1 Test Street" + lettings_log_to_fix.address_line2 = "Testville" + lettings_log_to_fix.town_or_city = "Testford" + lettings_log_to_fix.postcode_full = nil + lettings_log_to_fix.address_line1_input = "1 Test Street" + lettings_log_to_fix.postcode_full_input = "SW1 2BB" + lettings_log_to_fix.save!(validate: false) + + bu_lettings_log_to_fix.manual_address_entry_selected = true + bu_lettings_log_to_fix.address_line1 = "1 Test Street" + bu_lettings_log_to_fix.address_line2 = "Testville" + bu_lettings_log_to_fix.town_or_city = "Testford" + bu_lettings_log_to_fix.postcode_full = nil + bu_lettings_log_to_fix.address_line1_as_entered = "1 Test Street" + bu_lettings_log_to_fix.postcode_full_as_entered = "SW1 2BB" + bu_lettings_log_to_fix.save!(validate: false) + + lettings_log_not_to_fix.postcode_full = nil + lettings_log_not_to_fix.save!(validate: false) + end + + context "when running the task" do + it "updates logs that meet the criteria" do + expect(lettings_log_to_fix.postcode_full).to be_nil + expect(lettings_log_to_fix.address_line1).to eq("1 Test Street") + expect(lettings_log_to_fix.address_line2).to eq("Testville") + expect(lettings_log_to_fix.town_or_city).to eq("Testford") + expect(lettings_log_to_fix.address_line1_input).to eq("1 Test Street") + expect(lettings_log_to_fix.postcode_full_input).to eq("SW1 2BB") + + expect(bu_lettings_log_to_fix.postcode_full).to be_nil + expect(bu_lettings_log_to_fix.address_line1_input).to be_nil + expect(bu_lettings_log_to_fix.address_line1).to eq("1 Test Street") + expect(bu_lettings_log_to_fix.address_line2).to eq("Testville") + expect(bu_lettings_log_to_fix.town_or_city).to eq("Testford") + expect(bu_lettings_log_to_fix.address_line1_as_entered).to eq("1 Test Street") + expect(bu_lettings_log_to_fix.postcode_full_as_entered).to eq("SW1 2BB") + + task.invoke + + lettings_log_to_fix.reload + bu_lettings_log_to_fix.reload + + expect(lettings_log_to_fix.postcode_full).to eq(lettings_log_to_fix.postcode_full_input) + expect(lettings_log_to_fix.postcode_full).to eq("SW1 2BB") + expect(bu_lettings_log_to_fix.postcode_full).to eq(bu_lettings_log_to_fix.postcode_full_as_entered) + expect(bu_lettings_log_to_fix.postcode_full).to eq("SW1 2BB") + end + + it "does not update logs that do not meet the criteria" do + task.invoke + + lettings_log_not_to_fix.reload + + expect(lettings_log_not_to_fix.postcode_full).to be_nil + end + end + end +end diff --git a/spec/models/form/lettings/pages/person_working_situation_spec.rb b/spec/models/form/lettings/pages/person_working_situation_spec.rb index 71ef0a8f2..a88cdcde0 100644 --- a/spec/models/form/lettings/pages/person_working_situation_spec.rb +++ b/spec/models/form/lettings/pages/person_working_situation_spec.rb @@ -7,6 +7,10 @@ RSpec.describe Form::Lettings::Pages::PersonWorkingSituation, type: :model do let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) } let(:person_index) { 2 } + before do + allow(subsection.form).to receive(:start_year_2025_or_later?).and_return(false) + end + it "has correct subsection" do expect(page.subsection).to eq(subsection) end diff --git a/spec/models/form/lettings/questions/nationality_all_spec.rb b/spec/models/form/lettings/questions/nationality_all_spec.rb index a4d187a16..e041f60a0 100644 --- a/spec/models/form/lettings/questions/nationality_all_spec.rb +++ b/spec/models/form/lettings/questions/nationality_all_spec.rb @@ -20,4 +20,8 @@ RSpec.describe Form::Lettings::Questions::NationalityAll, type: :model do it "has the correct answer_options" do expect(question.answer_options.count).to eq(203) end + + it "has the correct displayed_answer_options" do + expect(question.displayed_answer_options(nil, nil).count).to eq(202) + end end diff --git a/spec/models/form/lettings/questions/person_working_situation_spec.rb b/spec/models/form/lettings/questions/person_working_situation_spec.rb index 4dd6a0065..503c699b2 100644 --- a/spec/models/form/lettings/questions/person_working_situation_spec.rb +++ b/spec/models/form/lettings/questions/person_working_situation_spec.rb @@ -4,9 +4,13 @@ RSpec.describe Form::Lettings::Questions::PersonWorkingSituation, type: :model d subject(:question) { described_class.new(nil, question_definition, page, person_index:) } let(:question_definition) { nil } - let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) } + let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2025, 4, 4)))) } let(:person_index) { 2 } + before do + allow(page.subsection.form).to receive(:start_year_2025_or_later?).and_return(true) + end + it "has correct page" do expect(question.page).to eq(page) end @@ -21,15 +25,15 @@ RSpec.describe Form::Lettings::Questions::PersonWorkingSituation, type: :model d it "has the correct answer_options" do expect(question.answer_options).to eq("0" => { "value" => "Other" }, - "1" => { "value" => "Full-time – 30 hours or more" }, + "1" => { "value" => "Full-time – 30 hours or more per week" }, "10" => { "value" => "Person prefers not to say" }, - "2" => { "value" => "Part-time – Less than 30 hours" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, "3" => { "value" => "In government training into work" }, "4" => { "value" => "Jobseeker" }, "5" => { "value" => "Retired" }, "6" => { "value" => "Not seeking work" }, "7" => { "value" => "Full-time student" }, - "8" => { "value" => "Unable to work because of long term sick or disability" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, "9" => { "depends_on" => [ { "age2_known" => 1 }, diff --git a/spec/models/form/lettings/questions/previous_tenure_spec.rb b/spec/models/form/lettings/questions/previous_tenure_spec.rb index 1380d1b1f..4523848b2 100644 --- a/spec/models/form/lettings/questions/previous_tenure_spec.rb +++ b/spec/models/form/lettings/questions/previous_tenure_spec.rb @@ -70,8 +70,8 @@ RSpec.describe Form::Lettings::Questions::PreviousTenure, type: :model do "3" => { "value" => "Private sector tenancy" }, "27" => { "value" => "Owner occupation (low-cost home ownership)" }, "26" => { "value" => "Owner occupation (private)" }, - "28" => { "value" => "Living with friends and family (long-term)" }, - "39" => { "value" => "Sofa surfing (moving regularly between family and friends, no permanent bed)" }, + "28" => { "value" => "Living with friends or family (long-term)" }, + "39" => { "value" => "Sofa surfing (moving regularly between family or friends, no permanent bed)" }, "14" => { "value" => "Bed and breakfast" }, "7" => { "value" => "Direct access hostel" }, "10" => { "value" => "Hospital" }, diff --git a/spec/models/form/sales/questions/buyer1_working_situation_spec.rb b/spec/models/form/sales/questions/buyer1_working_situation_spec.rb index 0e1b02257..19de5e198 100644 --- a/spec/models/form/sales/questions/buyer1_working_situation_spec.rb +++ b/spec/models/form/sales/questions/buyer1_working_situation_spec.rb @@ -24,21 +24,6 @@ RSpec.describe Form::Sales::Questions::Buyer1WorkingSituation, type: :model do expect(question.derived?(nil)).to be false end - it "has the correct answer_options" do - expect(question.answer_options).to eq({ - "1" => { "value" => "Full-time - 30 hours or more" }, - "2" => { "value" => "Part-time - Less than 30 hours" }, - "3" => { "value" => "In government training into work" }, - "4" => { "value" => "Jobseeker" }, - "6" => { "value" => "Not seeking work" }, - "8" => { "value" => "Unable to work due to long term sick or disability" }, - "5" => { "value" => "Retired" }, - "0" => { "value" => "Other" }, - "10" => { "value" => "Buyer prefers not to say" }, - "7" => { "value" => "Full-time student" }, - }) - end - context "with start year before 2025" do let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_2025_or_later?: false) } @@ -53,6 +38,21 @@ RSpec.describe Form::Sales::Questions::Buyer1WorkingSituation, type: :model do it "uses the new ordering for answer options" do expect(question.answer_options.keys).to eq(%w[1 2 3 4 5 6 7 8 0 10]) end + + it "has the correct answer_options" do + expect(question.answer_options).to eq({ + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, + "5" => { "value" => "Retired" }, + "0" => { "value" => "Other" }, + "10" => { "value" => "Buyer prefers not to say" }, + "7" => { "value" => "Full-time student" }, + }) + end end it "has the correct check_answers_card_number" do diff --git a/spec/models/form/sales/questions/buyer2_working_situation_spec.rb b/spec/models/form/sales/questions/buyer2_working_situation_spec.rb index c8ee349b6..cec51bdc5 100644 --- a/spec/models/form/sales/questions/buyer2_working_situation_spec.rb +++ b/spec/models/form/sales/questions/buyer2_working_situation_spec.rb @@ -77,6 +77,37 @@ RSpec.describe Form::Sales::Questions::Buyer2WorkingSituation, type: :model do it "uses the new ordering for displayed answer options" do expect(question.displayed_answer_options(nil).keys).to eq(%w[1 2 3 4 5 6 7 8 0 10]) end + + it "has the correct answer_options" do + expect(question.answer_options).to eq({ + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, + "5" => { "value" => "Retired" }, + "0" => { "value" => "Other" }, + "10" => { "value" => "Buyer prefers not to say" }, + "7" => { "value" => "Full-time student" }, + "9" => { "value" => "Child under 16" }, + }) + end + + it "has the correct displayed_answer_options" do + expect(question.displayed_answer_options(nil)).to eq({ + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, + "5" => { "value" => "Retired" }, + "0" => { "value" => "Other" }, + "10" => { "value" => "Buyer prefers not to say" }, + "7" => { "value" => "Full-time student" }, + }) + end end it "has the correct check_answers_card_number" do diff --git a/spec/models/form/sales/questions/nationality_all_spec.rb b/spec/models/form/sales/questions/nationality_all_spec.rb index a83beb51d..4ed01cc70 100644 --- a/spec/models/form/sales/questions/nationality_all_spec.rb +++ b/spec/models/form/sales/questions/nationality_all_spec.rb @@ -23,6 +23,10 @@ RSpec.describe Form::Sales::Questions::NationalityAll, type: :model do expect(question.answer_options.count).to eq(203) end + it "has the correct displayed_answer_options" do + expect(question.displayed_answer_options(nil, nil).count).to eq(202) + end + it "has correct conditional for" do expect(question.conditional_for).to be_nil end diff --git a/spec/models/form/sales/questions/person_working_situation_spec.rb b/spec/models/form/sales/questions/person_working_situation_spec.rb index b09c0bf69..c6a215741 100644 --- a/spec/models/form/sales/questions/person_working_situation_spec.rb +++ b/spec/models/form/sales/questions/person_working_situation_spec.rb @@ -35,10 +35,10 @@ RSpec.describe Form::Sales::Questions::PersonWorkingSituation, type: :model do "7" => { "value" => "Full-time student" }, "9" => { "value" => "Child under 16", "depends_on" => - [{ "saledate" => { "operator" => "<", "operand" => Time.zone.local(2024, 4, 1) } }, - { "age2_known" => 1 }, - { "age2_known" => nil }, - { "age2" => { "operator" => "<", "operand" => 16 } }] }, + [{ "saledate" => { "operator" => "<", "operand" => Time.zone.local(2024, 4, 1) } }, + { "age2_known" => 1 }, + { "age2_known" => nil }, + { "age2" => { "operator" => "<", "operand" => 16 } }] }, }) end @@ -56,6 +56,27 @@ RSpec.describe Form::Sales::Questions::PersonWorkingSituation, type: :model do it "uses the new ordering for answer options" do expect(question.answer_options.keys).to eq(%w[1 2 3 4 5 6 7 8 9 0 10]) end + + it "has the correct answer_options" do + expect(question.answer_options).to eq({ + "1" => { "value" => "Full-time – 30 hours or more per week" }, + "2" => { "value" => "Part-time – Less than 30 hours per week" }, + "3" => { "value" => "In government training into work" }, + "4" => { "value" => "Jobseeker" }, + "6" => { "value" => "Not seeking work" }, + "8" => { "value" => "Unable to work because of long-term sickness or disability" }, + "5" => { "value" => "Retired" }, + "0" => { "value" => "Other" }, + "10" => { "value" => "Person prefers not to say" }, + "7" => { "value" => "Full-time student" }, + "9" => { "value" => "Child under 16", + "depends_on" => + [{ "saledate" => { "operator" => "<", "operand" => Time.zone.local(2024, 4, 1) } }, + { "age2_known" => 1 }, + { "age2_known" => nil }, + { "age2" => { "operator" => "<", "operand" => 16 } }] }, + }) + end end context "when person 2" do diff --git a/spec/models/validations/household_validations_spec.rb b/spec/models/validations/household_validations_spec.rb index 2086e55f1..3bad55f9b 100644 --- a/spec/models/validations/household_validations_spec.rb +++ b/spec/models/validations/household_validations_spec.rb @@ -137,7 +137,7 @@ RSpec.describe Validations::HouseholdValidations do expect(record.errors["referral"]) .to include(match(I18n.t("validations.lettings.household.referral.leaving_last_settled_home.reason_permanently_decanted"))) expect(record.errors["referral_type"]) - .to include(match(I18n.t("validations.lettings.household.referral.leaving_last_settled_home.reason_permanently_decanted"))) + .to include(match(I18n.t("validations.lettings.household.referral_type.leaving_last_settled_home.reason_permanently_decanted"))) end end @@ -163,8 +163,6 @@ RSpec.describe Validations::HouseholdValidations do household_validator.validate_referral(record) expect(record.errors["referral"]) .to include(match(I18n.t("validations.lettings.household.referral.la_general_needs.internal_transfer"))) - expect(record.errors["referral_type"]) - .to include(match(I18n.t("validations.lettings.household.referral.la_general_needs.internal_transfer"))) expect(record.errors["prevten"]) .to include(match(I18n.t("validations.lettings.household.prevten.la_general_needs.internal_transfer"))) @@ -172,8 +170,6 @@ RSpec.describe Validations::HouseholdValidations do household_validator.validate_referral(record) expect(record.errors["referral"]) .to include(match(I18n.t("validations.lettings.household.referral.la_general_needs.internal_transfer"))) - expect(record.errors["referral_type"]) - .to include(match(I18n.t("validations.lettings.household.referral.la_general_needs.internal_transfer"))) expect(record.errors["prevten"]) .to include(match(I18n.t("validations.lettings.household.prevten.la_general_needs.internal_transfer"))) end @@ -766,13 +762,11 @@ RSpec.describe Validations::HouseholdValidations do record.referral = 1 record.prevten = prevten[:code] household_validator.validate_previous_housing_situation(record) - label = record.form.start_year_2025_or_later? && prevten[:code] == 28 ? "Living with friends and family (long-term)" : prevten[:label] + label = record.form.start_year_2025_or_later? && prevten[:code] == 28 ? "Living with friends or family (long-term)" : prevten[:label] expect(record.errors["prevten"]) .to include(match I18n.t("validations.lettings.household.prevten.internal_transfer", prevten: label)) expect(record.errors["referral"]) .to include(match I18n.t("validations.lettings.household.referral.prevten_invalid", prevten: "")) - expect(record.errors["referral_type"]) - .to include(match I18n.t("validations.lettings.household.referral.prevten_invalid", prevten: "")) end end end diff --git a/spec/requests/duplicate_logs_controller_spec.rb b/spec/requests/duplicate_logs_controller_spec.rb index c2c05e748..1251a75a9 100644 --- a/spec/requests/duplicate_logs_controller_spec.rb +++ b/spec/requests/duplicate_logs_controller_spec.rb @@ -177,7 +177,7 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q2 - Purchaser code", count: 3) expect(page).to have_content("Q20 - Buyer 1’s age", count: 3) expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 3) - expect(page).to have_content("Q25 - Buyer 1's working situation", count: 3) + expect(page).to have_content("Q25 - Buyer 1’s working situation", count: 3) expect(page).to have_content("Q15 - Postcode", count: 3) expect(page).to have_link("Change", count: 21) expect(page).to have_link("Change", href: "/sales-logs/#{sales_log.id}/purchaser-code?first_remaining_duplicate_id=#{duplicate_logs[0].id}&organisation_id=#{sales_log.owning_organisation_id}&original_log_id=#{sales_log.id}&referrer=duplicate_logs") @@ -195,7 +195,7 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q2 - Purchaser code", count: 3) expect(page).to have_content("Q20 - Buyer 1’s age", count: 3) expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 3) - expect(page).to have_content("Q25 - Buyer 1's working situation", count: 3) + expect(page).to have_content("Q25 - Buyer 1’s working situation", count: 3) expect(page).to have_content("Postcode (from UPRN)", count: 3) expect(page).to have_link("Change", count: 21) expect(page).to have_link("Change", href: "/sales-logs/#{sales_log.id}/purchaser-code?first_remaining_duplicate_id=#{duplicate_logs[0].id}&original_log_id=#{sales_log.id}&referrer=duplicate_logs") @@ -223,7 +223,7 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q2 - Purchaser code", count: 1) expect(page).to have_content("Q20 - Buyer 1’s age", count: 1) expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1) - expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1) + expect(page).to have_content("Q25 - Buyer 1’s working situation", count: 1) expect(page).to have_content("Q15 - Postcode", count: 1) expect(page).to have_link("Change", count: 7) expect(page).to have_link("Change", href: "/sales-logs/#{sales_log.id}/purchaser-code?original_log_id=#{sales_log.id}&referrer=interruption_screen") @@ -249,7 +249,7 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q2 - Purchaser code", count: 1) expect(page).to have_content("Q20 - Buyer 1’s age", count: 1) expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1) - expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1) + expect(page).to have_content("Q25 - Buyer 1’s working situation", count: 1) expect(page).to have_content("Q15 - Postcode", count: 1) expect(page).to have_link("Change", count: 7) expect(page).to have_link("Change", href: "/sales-logs/#{sales_log.id}/purchaser-code?original_log_id=#{sales_log.id}&referrer=interruption_screen") @@ -384,7 +384,7 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q2 - Purchaser code", count: 3) expect(page).to have_content("Q20 - Buyer 1’s age", count: 3) expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 3) - expect(page).to have_content("Q25 - Buyer 1's working situation", count: 3) + expect(page).to have_content("Q25 - Buyer 1’s working situation", count: 3) expect(page).to have_content("Q15 - Postcode", count: 3) expect(page).to have_link("Change", count: 18) expect(page).to have_link("Change", href: "/sales-logs/#{sales_log.id}/purchaser-code?first_remaining_duplicate_id=#{duplicate_logs[0].id}&original_log_id=#{sales_log.id}&referrer=duplicate_logs") @@ -412,7 +412,7 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q2 - Purchaser code", count: 1) expect(page).to have_content("Q20 - Buyer 1’s age", count: 1) expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1) - expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1) + expect(page).to have_content("Q25 - Buyer 1’s working situation", count: 1) expect(page).to have_content("Q15 - Postcode", count: 1) expect(page).to have_link("Change", count: 6) expect(page).to have_link("Change", href: "/sales-logs/#{sales_log.id}/purchaser-code?original_log_id=#{sales_log.id}&referrer=interruption_screen") @@ -438,7 +438,7 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Q2 - Purchaser code", count: 1) expect(page).to have_content("Q20 - Buyer 1’s age", count: 1) expect(page).to have_content("Q21 - Buyer 1’s gender identity", count: 1) - expect(page).to have_content("Q25 - Buyer 1's working situation", count: 1) + expect(page).to have_content("Q25 - Buyer 1’s working situation", count: 1) expect(page).to have_content("Q15 - Postcode", count: 1) expect(page).to have_link("Change", count: 6) expect(page).to have_link("Change", href: "/sales-logs/#{sales_log.id}/purchaser-code?original_log_id=#{sales_log.id}&referrer=interruption_screen") diff --git a/spec/requests/form_controller_spec.rb b/spec/requests/form_controller_spec.rb index 4ae66e0d5..a6c80abc6 100644 --- a/spec/requests/form_controller_spec.rb +++ b/spec/requests/form_controller_spec.rb @@ -1196,7 +1196,7 @@ RSpec.describe FormController, type: :request do it "displays a success banner" do follow_redirect! - expect(response.body).to include("You have successfully updated Q31: lead tenant's age") + expect(response.body).to include("You have successfully updated Q31: lead tenant’s age") end end diff --git a/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb index fc3995766..1e3657dbe 100644 --- a/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb +++ b/spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb @@ -1216,6 +1216,27 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do end end + describe "#field_100" do + context "when log is a renewal and field 100 is an invalid value" do + let(:attributes) { { bulk_upload:, field_7: 1, field_100: 5 } } + + it "adds an error to field 100" do + parser.valid? + expect(parser.errors[:field_100]).to be_present + expect(parser.errors[:field_100]).to include(I18n.t("validations.lettings.2024.bulk_upload.prevten.invalid")) + end + end + + context "when log is a renewal and field 100 is a valid value" do + let(:attributes) { { bulk_upload:, field_7: 1, field_100: 32 } } + + it "does not add an error" do + parser.valid? + expect(parser.errors[:field_100]).to be_blank + end + end + end + describe "#field_112 - 115 (lettings allocation methods)" do %i[field_112 field_113 field_114 field_115].each do |field| context "when only #{field} is not given" do @@ -2603,7 +2624,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do end describe "#irproduct_other" do - let(:attributes) { { bulk_upload:, field_12: "some other product" } } + let(:attributes) { { bulk_upload:, field_11: 6, field_12: "some other product" } } it "sets value to given free text string" do expect(parser.log.irproduct_other).to eql("some other product") @@ -2635,7 +2656,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do end describe "#reasonother" do - context "when reason is 'other'" do + context "when reason is 'Other'" do let(:attributes) { { bulk_upload:, field_98: "20", field_99: "some other reason" } } it "is set to given free text string" do @@ -2643,7 +2664,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do end end - context "when reason is not 'other'" do + context "when reason is not 'Other'" do let(:attributes) { { bulk_upload:, field_98: "50", field_99: "some other reason" } } it "is set to nil" do diff --git a/spec/services/bulk_upload/lettings/year2025/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2025/row_parser_spec.rb index fa57ec801..902985943 100644 --- a/spec/services/bulk_upload/lettings/year2025/row_parser_spec.rb +++ b/spec/services/bulk_upload/lettings/year2025/row_parser_spec.rb @@ -1053,6 +1053,27 @@ RSpec.describe BulkUpload::Lettings::Year2025::RowParser do end end + describe "#field_100" do + context "when log is a renewal and field 100 is an invalid value" do + let(:attributes) { { bulk_upload:, field_7: 1, field_100: 4 } } + + it "adds an error to field 100" do + parser.valid? + expect(parser.errors[:field_100]).to be_present + expect(parser.errors[:field_100]).to include(I18n.t("validations.lettings.2025.bulk_upload.prevten.invalid")) + end + end + + context "when log is a renewal and field 100 is a valid value" do + let(:attributes) { { bulk_upload:, field_7: 1, field_100: 38 } } + + it "does not add an error" do + parser.valid? + expect(parser.errors[:field_100]).to be_blank + end + end + end + describe "#field_112 - 115 (lettings allocation methods)" do %i[field_112 field_113 field_114 field_115].each do |field| context "when only #{field} is not given" do @@ -2376,7 +2397,7 @@ RSpec.describe BulkUpload::Lettings::Year2025::RowParser do end describe "#irproduct_other" do - let(:attributes) { { bulk_upload:, field_12: "some other product" } } + let(:attributes) { { bulk_upload:, field_11: 6, field_12: "some other product" } } it "sets value to given free text string" do expect(parser.log.irproduct_other).to eql("some other product") @@ -2408,7 +2429,7 @@ RSpec.describe BulkUpload::Lettings::Year2025::RowParser do end describe "#reasonother" do - context "when reason is 'other'" do + context "when reason is 'Other'" do let(:attributes) { { bulk_upload:, field_98: "20", field_99: "some other reason" } } it "is set to given free text string" do @@ -2416,7 +2437,7 @@ RSpec.describe BulkUpload::Lettings::Year2025::RowParser do end end - context "when reason is not 'other'" do + context "when reason is not 'Other'" do let(:attributes) { { bulk_upload:, field_98: "50", field_99: "some other reason" } } it "is set to nil" do diff --git a/spec/services/documentation_generator_spec.rb b/spec/services/documentation_generator_spec.rb index 8c1d82726..5023c91f0 100644 --- a/spec/services/documentation_generator_spec.rb +++ b/spec/services/documentation_generator_spec.rb @@ -17,10 +17,11 @@ describe DocumentationGenerator do describe ":describe_hard_validations" do context "when the service is run with lettings type" do let(:log_type) { "lettings" } + let(:form) { FormHandler.instance.forms["current_lettings"] } it "creates new validation documentation records" do expect(Rails.logger).to receive(:info).with(/described/).at_least(:once) - expect { described_class.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) + expect { described_class.new.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) expect(LogValidation.where(validation_name: "validate_numeric_min_max").count).to eq(1) any_validation = LogValidation.first expect(any_validation.description).to eq("Validates the format.") @@ -37,12 +38,12 @@ describe DocumentationGenerator do it "calls the client" do expect(client).to receive(:chat) - described_class.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) + described_class.new.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) end it "skips if the validation already exists in the database" do - described_class.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) - expect { described_class.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) }.not_to change(LogValidation, :count) + described_class.new.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) + expect { described_class.new.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) }.not_to change(LogValidation, :count) end context "when the response is not a JSON" do @@ -51,7 +52,7 @@ describe DocumentationGenerator do it "raises an error" do expect(Rails.logger).to receive(:error).with(/Failed to save/).at_least(:once) expect(Rails.logger).to receive(:error).with(/Error/).at_least(:once) - described_class.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) + described_class.new.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) end end @@ -61,17 +62,18 @@ describe DocumentationGenerator do it "raises an error" do expect(Rails.logger).to receive(:error).with(/Failed to save/).at_least(:once) expect(Rails.logger).to receive(:error).with(/Error/).at_least(:once) - described_class.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) + described_class.new.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) end end end context "when the service is run with sales type" do let(:log_type) { "sales" } + let(:form) { FormHandler.instance.forms["current_sales"] } it "creates new validation documentation records" do expect(Rails.logger).to receive(:info).with(/described/).at_least(:once) - expect { described_class.new.describe_hard_validations(client, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) + expect { described_class.new.describe_hard_validations(client, form, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) expect(LogValidation.where(validation_name: "validate_numeric_min_max").count).to eq(1) any_validation = LogValidation.first expect(any_validation.description).to eq("Validates the format.") @@ -97,9 +99,10 @@ describe DocumentationGenerator do context "when the service is run for lettings" do let(:log_type) { "lettings" } + let(:form) { FormHandler.instance.forms["current_lettings"] } it "creates new validation documentation records" do - expect { described_class.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) + expect { described_class.new.describe_soft_validations(client, form, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) expect(LogValidation.where(validation_name: "rent_soft_validation_triggered?").count).to be_positive any_validation = LogValidation.first expect(any_validation.description).to eq("Validates the format.") @@ -115,21 +118,22 @@ describe DocumentationGenerator do it "calls the client" do expect(client).to receive(:chat) - described_class.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, log_type) + described_class.new.describe_soft_validations(client, form, all_validation_methods, all_helper_methods, log_type) end it "skips if the validation already exists in the database" do - described_class.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, log_type) - expect { described_class.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, log_type) }.not_to change(LogValidation, :count) + described_class.new.describe_soft_validations(client, form, all_validation_methods, all_helper_methods, log_type) + expect { described_class.new.describe_soft_validations(client, form, all_validation_methods, all_helper_methods, log_type) }.not_to change(LogValidation, :count) end end context "when the service is run for sales" do let(:log_type) { "sales" } + let(:form) { FormHandler.instance.forms["current_sales"] } let(:all_validation_methods) { ["income2_outside_soft_range_for_ecstat?"] } it "creates new validation documentation records" do - expect { described_class.new.describe_soft_validations(client, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) + expect { described_class.new.describe_soft_validations(client, form, all_validation_methods, all_helper_methods, log_type) }.to change(LogValidation, :count) expect(LogValidation.where(validation_name: "income2_outside_soft_range_for_ecstat?").count).to be_positive any_validation = LogValidation.first expect(any_validation.description).to eq("Validates the format.")