Browse Source

CLDC-4402: lettings questions

CLDC-4402-audit-start-year-2024-or-later-usage
samyou-softwire 6 days ago
parent
commit
81e1b1da06
  1. 4
      app/models/form/lettings/questions/age.rb
  2. 15
      app/models/form/lettings/questions/declaration.rb
  3. 23
      app/models/form/lettings/questions/ethnic_white.rb
  4. 4
      app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
  5. 19
      app/models/form/lettings/questions/housingneeds_other.rb
  6. 15
      app/models/form/lettings/questions/is_carehome.rb
  7. 14
      app/models/form/lettings/questions/layear.rb
  8. 26
      app/models/form/lettings/questions/letting_allocation.rb
  9. 27
      app/models/form/lettings/questions/person_relationship.rb
  10. 12
      app/models/form/lettings/questions/previous_let_type.rb
  11. 31
      app/models/form/lettings/questions/reason_renewal.rb
  12. 120
      app/models/form/lettings/questions/referral_general_needs.rb
  13. 132
      app/models/form/lettings/questions/referral_general_needs_prp.rb
  14. 120
      app/models/form/lettings/questions/referral_supported_housing.rb
  15. 138
      app/models/form/lettings/questions/referral_supported_housing_prp.rb
  16. 135
      app/models/form/lettings/questions/rsnvac.rb
  17. 80
      app/models/form/lettings/questions/starter_tenancy_type.rb
  18. 80
      app/models/form/lettings/questions/tenancy_type.rb
  19. 15
      app/models/form/lettings/questions/uprn_confirmation.rb
  20. 17
      app/models/form/lettings/questions/waityear.rb
  21. 7
      app/models/form/sales/questions/mortgage_lender.rb
  22. 4
      config/locales/en.yml

4
app/models/form/lettings/questions/age.rb

@ -33,8 +33,6 @@ class Form::Lettings::Questions::Age < ::Form::Question
end end
def hint_text def hint_text
if form.start_year_2024_or_later? "Answer 1 for children aged under 1 year old"
"Answer 1 for children aged under 1 year old"
end
end end
end end

15
app/models/form/lettings/questions/declaration.rb

@ -3,27 +3,16 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
super super
@id = "declaration" @id = "declaration"
@type = "checkbox" @type = "checkbox"
@check_answers_card_number = 0 unless form.start_year_2024_or_later?
@top_guidance_partial = "privacy_notice_tenant" @top_guidance_partial = "privacy_notice_tenant"
@question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR) @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options
declaration_text = if form.start_year_2024_or_later? { "declaration" => { "value" => "The tenant has seen or been given access to the MHCLG privacy notice" } }.freeze
"The tenant has seen or been given access to the MHCLG privacy notice"
else
"The tenant has seen the MHCLG privacy notice"
end
{ "declaration" => { "value" => declaration_text } }.freeze
end end
def unanswered_error_message def unanswered_error_message
if form.start_year_2024_or_later? I18n.t("validations.declaration.missing")
I18n.t("validations.declaration.missing.post_2024")
else
I18n.t("validations.declaration.missing.pre_2024")
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11, 2025 => 11, 2026 => 11 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11, 2025 => 11, 2026 => 11 }.freeze

23
app/models/form/lettings/questions/ethnic_white.rb

@ -9,22 +9,13 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" }, "2" => { "value" => "Irish" },
"2" => { "value" => "Irish" }, "18" => { "value" => "Gypsy or Irish Traveller" },
"18" => { "value" => "Gypsy or Irish Traveller" }, "20" => { "value" => "Roma" },
"20" => { "value" => "Roma" }, "3" => { "value" => "Any other White background" },
"3" => { "value" => "Any other White background" }, }.freeze
}.freeze
else
{
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"2" => { "value" => "Irish" },
"18" => { "value" => "Gypsy or Irish Traveller" },
"3" => { "value" => "Any other White background" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34, 2025 => 34, 2026 => 34 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34, 2025 => 34, 2026 => 34 }.freeze

4
app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb

@ -14,11 +14,11 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
end end
def yes_hint def yes_hint
form.start_year_2024_or_later? ? "This property was previously used for other purposes or is a new-build." : "This is a new let." "This property was previously used for other purposes or is a new-build."
end end
def no_hint def no_hint
form.start_year_2024_or_later? ? "This is a re-let of existing social housing stock." : "This is a re-let of existing social housing." "This is a re-let of existing social housing stock."
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15, 2025 => 12, 2026 => 12 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15, 2025 => 12, 2026 => 12 }.freeze

19
app/models/form/lettings/questions/housingneeds_other.rb

@ -9,19 +9,12 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => { "value" => "Yes" },
"1" => { "value" => "Yes" }, "0" => { "value" => "No" },
"0" => { "value" => "No" }, "divider" => { "value" => true },
"divider" => { "value" => true }, "2" => { "value" => "Don’t know" },
"2" => { "value" => "Don’t know" }, }.freeze
}.freeze
else
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 72, 2024 => 71, 2025 => 71, 2026 => 78 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 72, 2024 => 71, 2025 => 71, 2026 => 78 }.freeze

15
app/models/form/lettings/questions/is_carehome.rb

@ -10,17 +10,10 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => { "value" => "Yes" },
"1" => { "value" => "Yes" }, "0" => { "value" => "No" },
"0" => { "value" => "No" }, }.freeze
}.freeze
else
{
"0" => { "value" => "No" },
"1" => { "value" => "Yes" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 93, 2024 => 92, 2025 => 92, 2026 => 100 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 93, 2024 => 92, 2025 => 92, 2026 => 100 }.freeze

14
app/models/form/lettings/questions/layear.rb

@ -21,7 +21,7 @@ class Form::Lettings::Questions::Layear < ::Form::Question
"divider" => { "value" => true }, "divider" => { "value" => true },
"6" => { "value" => "Don’t know" }, "6" => { "value" => "Don’t know" },
} }
elsif form.start_year_2024_or_later? else
{ {
"1" => { "value" => "Just moved to local authority area with this new let" }, "1" => { "value" => "Just moved to local authority area with this new let" },
"2" => { "value" => "Less than 1 year" }, "2" => { "value" => "Less than 1 year" },
@ -34,18 +34,6 @@ class Form::Lettings::Questions::Layear < ::Form::Question
"divider" => { "value" => true }, "divider" => { "value" => true },
"6" => { "value" => "Don’t know" }, "6" => { "value" => "Don’t know" },
} }
else
{
"1" => { "value" => "Just moved to local authority area" },
"2" => { "value" => "Less than 1 year" },
"7" => { "value" => "1 year but under 2 years" },
"8" => { "value" => "2 years but under 3 years" },
"9" => { "value" => "3 years but under 4 years" },
"10" => { "value" => "4 years but under 5 years" },
"5" => { "value" => "5 years or more" },
"divider" => { "value" => true },
"6" => { "value" => "Don’t know" },
}
end end
end end

26
app/models/form/lettings/questions/letting_allocation.rb

@ -8,24 +8,14 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "cbl" => { "value" => "Choice-based lettings (CBL)", "hint" => "Where available vacant properties are advertised and applicants are able to bid for specific properties." },
"cbl" => { "value" => "Choice-based lettings (CBL)", "hint" => "Where available vacant properties are advertised and applicants are able to bid for specific properties." }, "cap" => { "value" => "Common Allocation Policy (CAP)", "hint" => "Where a common system agreed between a group of housing providers is used to determine applicant’s priority for housing." },
"cap" => { "value" => "Common Allocation Policy (CAP)", "hint" => "Where a common system agreed between a group of housing providers is used to determine applicant’s priority for housing." }, "chr" => { "value" => "Common housing register (CHR)", "hint" => "Where a single waiting list is used by a group of housing providers to receive and process housing applications. Providers may use different approaches to determine priority." },
"chr" => { "value" => "Common housing register (CHR)", "hint" => "Where a single waiting list is used by a group of housing providers to receive and process housing applications. Providers may use different approaches to determine priority." }, "accessible_register" => { "value" => "Accessible housing register", "hint" => "Where the ‘access category’ or another descriptor of whether an available vacant property meets a range of access needs is displayed to applicants during the allocations process." },
"accessible_register" => { "value" => "Accessible housing register", "hint" => "Where the ‘access category’ or another descriptor of whether an available vacant property meets a range of access needs is displayed to applicants during the allocations process." }, "divider" => { "value" => true },
"divider" => { "value" => true }, "letting_allocation_unknown" => { "value" => "None of these allocation systems" },
"letting_allocation_unknown" => { "value" => "None of these allocation systems" }, }.freeze
}.freeze
else
{
"cbl" => { "value" => "Choice-based lettings (CBL)" },
"cap" => { "value" => "Common Allocation Policy (CAP)" },
"chr" => { "value" => "Common housing register (CHR)" },
"divider" => { "value" => true },
"letting_allocation_unknown" => { "value" => "None of these allocation systems" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 84, 2024 => 83, 2025 => 83, 2026 => 90 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 84, 2024 => 83, 2025 => 83, 2026 => 90 }.freeze

27
app/models/form/lettings/questions/person_relationship.rb

@ -10,26 +10,13 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "P" => { "value" => "Partner" },
"P" => { "value" => "Partner" }, "C" => { "value" => "Child" },
"C" => { "value" => "Child" }, "X" => { "value" => "Other" },
"X" => { "value" => "Other" }, "divider" => { "value" => true },
"divider" => { "value" => true }, "R" => { "value" => "Person prefers not to say" },
"R" => { "value" => "Person prefers not to say" }, }
}
else
{
"P" => { "value" => "Partner" },
"C" => {
"value" => "Child",
"hint" => "Must be eligible for child benefit: under age 16 or under 20 if still in full-time education.",
},
"X" => { "value" => "Other" },
"divider" => { "value" => true },
"R" => { "value" => "Person prefers not to say" },
}
end
end end
def question_number def question_number

12
app/models/form/lettings/questions/previous_let_type.rb

@ -8,17 +8,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {
"1" => { "value" => "Social rent basis" },
"2" => { "value" => "Affordable rent basis" },
"5" => { "value" => "A London Affordable Rent basis" },
"6" => { "value" => "A Rent to Buy basis" },
"7" => { "value" => "A London Living Rent basis" },
"8" => { "value" => "Another Intermediate Rent basis" },
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
ANSWER_OPTIONS_AFTER_2024 = {
"1" => { "value" => "Social rent basis" }, "1" => { "value" => "Social rent basis" },
"2" => { "value" => "Affordable rent basis" }, "2" => { "value" => "Affordable rent basis" },
"5" => { "value" => "London Affordable Rent basis" }, "5" => { "value" => "London Affordable Rent basis" },
@ -45,7 +34,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
def answer_options def answer_options
return ANSWER_OPTIONS_AFTER_2025 if form.start_year_2025_or_later? return ANSWER_OPTIONS_AFTER_2025 if form.start_year_2025_or_later?
return ANSWER_OPTIONS_AFTER_2024 if form.start_year_2024_or_later?
ANSWER_OPTIONS ANSWER_OPTIONS
end end

31
app/models/form/lettings/questions/reason_renewal.rb

@ -14,27 +14,16 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "50" => { "value" => "End of social or private sector tenancy - no fault" },
"50" => { "value" => "End of social or private sector tenancy - no fault" }, "51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" }, "52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" },
"52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" }, "53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" },
"53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" }, "20" => { "value" => "Other" },
"20" => { "value" => "Other" }, "47" => { "value" => "Tenant prefers not to say" },
"47" => { "value" => "Tenant prefers not to say" }, "divider" => { "value" => true },
"divider" => { "value" => true }, "28" => { "value" => "Don’t know" },
"28" => { "value" => "Don’t know" }, }.freeze
}.freeze
else
{
"40" => { "value" => "End of assured shorthold tenancy (no fault)" },
"42" => { "value" => "End of fixed term tenancy (no fault)" },
"20" => { "value" => "Other" },
"47" => { "value" => "Tenant prefers not to say" },
"divider" => { "value" => true },
"28" => { "value" => "Don’t know" },
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76, 2025 => 76, 2026 => 83 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76, 2025 => 76, 2026 => 83 }.freeze

120
app/models/form/lettings/questions/referral_general_needs.rb

@ -10,87 +10,45 @@ class Form::Lettings::Questions::ReferralGeneralNeeds < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => {
"1" => { "value" => "Internal transfer",
"value" => "Internal transfer", "hint" => "Where the tenant has moved to another social property owned by the same landlord.",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.", },
}, "2" => {
"2" => { "value" => "Tenant applied directly (no referral or nomination)",
"value" => "Tenant applied directly (no referral or nomination)", },
}, "8" => {
"8" => { "value" => "Re-located through official housing mobility scheme",
"value" => "Re-located through official housing mobility scheme", },
}, "10" => {
"10" => { "value" => "Other social landlord",
"value" => "Other social landlord", },
}, "9" => {
"9" => { "value" => "Community learning disability team",
"value" => "Community learning disability team", },
}, "14" => {
"14" => { "value" => "Community mental health team",
"value" => "Community mental health team", },
}, "15" => {
"15" => { "value" => "Health service",
"value" => "Health service", },
}, "18" => {
"18" => { "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence",
"value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", },
}, "19" => {
"19" => { "value" => "Police, probation, prison or youth offending team – no custodial sentence",
"value" => "Police, probation, prison or youth offending team – no custodial sentence", },
}, "7" => {
"7" => { "value" => "Voluntary agency",
"value" => "Voluntary agency", },
}, "17" => {
"17" => { "value" => "Children’s Social Care",
"value" => "Children’s Social Care", },
}, "16" => {
"16" => { "value" => "Other",
"value" => "Other", },
}, }.freeze
}.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

132
app/models/form/lettings/questions/referral_general_needs_prp.rb

@ -10,96 +10,48 @@ class Form::Lettings::Questions::ReferralGeneralNeedsPrp < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => {
"1" => { "value" => "Internal transfer",
"value" => "Internal transfer", "hint" => "Where the tenant has moved to another social property owned by the same landlord.",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.", },
}, "2" => {
"2" => { "value" => "Tenant applied directly (no referral or nomination)",
"value" => "Tenant applied directly (no referral or nomination)", },
}, "3" => {
"3" => { "value" => "Nominated by a local housing authority",
"value" => "Nominated by a local housing authority", },
}, "8" => {
"8" => { "value" => "Re-located through official housing mobility scheme",
"value" => "Re-located through official housing mobility scheme", },
}, "10" => {
"10" => { "value" => "Other social landlord",
"value" => "Other social landlord", },
}, "9" => {
"9" => { "value" => "Community learning disability team",
"value" => "Community learning disability team", },
}, "14" => {
"14" => { "value" => "Community mental health team",
"value" => "Community mental health team", },
}, "15" => {
"15" => { "value" => "Health service",
"value" => "Health service", },
}, "18" => {
"18" => { "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence",
"value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", },
}, "19" => {
"19" => { "value" => "Police, probation, prison or youth offending team – no custodial sentence",
"value" => "Police, probation, prison or youth offending team – no custodial sentence", },
}, "7" => {
"7" => { "value" => "Voluntary agency",
"value" => "Voluntary agency", },
}, "17" => {
"17" => { "value" => "Children’s Social Care",
"value" => "Children’s Social Care", },
}, "16" => {
"16" => { "value" => "Other",
"value" => "Other", },
}, }.freeze
}.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"3" => {
"value" => "Nominated by a local housing authority",
},
"4" => {
"value" => "Referred by local authority housing department",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

120
app/models/form/lettings/questions/referral_supported_housing.rb

@ -10,87 +10,45 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => {
"1" => { "value" => "Internal transfer",
"value" => "Internal transfer", "hint" => "Where the tenant has moved to another social property owned by the same landlord.",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.", },
}, "2" => {
"2" => { "value" => "Tenant applied directly (no referral or nomination)",
"value" => "Tenant applied directly (no referral or nomination)", },
}, "8" => {
"8" => { "value" => "Re-located through official housing mobility scheme",
"value" => "Re-located through official housing mobility scheme", },
}, "10" => {
"10" => { "value" => "Other social landlord",
"value" => "Other social landlord", },
}, "9" => {
"9" => { "value" => "Community learning disability team",
"value" => "Community learning disability team", },
}, "14" => {
"14" => { "value" => "Community mental health team",
"value" => "Community mental health team", },
}, "15" => {
"15" => { "value" => "Health service",
"value" => "Health service", },
}, "18" => {
"18" => { "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence",
"value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", },
}, "19" => {
"19" => { "value" => "Police, probation, prison or youth offending team – no custodial sentence",
"value" => "Police, probation, prison or youth offending team – no custodial sentence", },
}, "7" => {
"7" => { "value" => "Voluntary agency",
"value" => "Voluntary agency", },
}, "17" => {
"17" => { "value" => "Children’s Social Care",
"value" => "Children’s Social Care", },
}, "16" => {
"16" => { "value" => "Other",
"value" => "Other", },
}, }.freeze
}.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

138
app/models/form/lettings/questions/referral_supported_housing_prp.rb

@ -10,99 +10,51 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => {
"1" => { "value" => "Internal transfer",
"value" => "Internal transfer", "hint" => "Where the tenant has moved to another social property owned by the same landlord.",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.", },
}, "2" => {
"2" => { "value" => "Tenant applied directly (no referral or nomination)",
"value" => "Tenant applied directly (no referral or nomination)", },
}, "3" => {
"3" => { "value" => "Nominated by a local housing authority",
"value" => "Nominated by a local housing authority", },
}, "4" => {
"4" => { "value" => "Referred by local authority housing department",
"value" => "Referred by local authority housing department", },
}, "8" => {
"8" => { "value" => "Re-located through official housing mobility scheme",
"value" => "Re-located through official housing mobility scheme", },
}, "10" => {
"10" => { "value" => "Other social landlord",
"value" => "Other social landlord", },
}, "9" => {
"9" => { "value" => "Community learning disability team",
"value" => "Community learning disability team", },
}, "14" => {
"14" => { "value" => "Community mental health team",
"value" => "Community mental health team", },
}, "15" => {
"15" => { "value" => "Health service",
"value" => "Health service", },
}, "18" => {
"18" => { "value" => "Police, probation, prison or youth offending team – tenant had custodial sentence",
"value" => "Police, probation, prison or youth offending team – tenant had custodial sentence", },
}, "19" => {
"19" => { "value" => "Police, probation, prison or youth offending team – no custodial sentence",
"value" => "Police, probation, prison or youth offending team – no custodial sentence", },
}, "7" => {
"7" => { "value" => "Voluntary agency",
"value" => "Voluntary agency", },
}, "17" => {
"17" => { "value" => "Children’s Social Care",
"value" => "Children’s Social Care", },
}, "16" => {
"16" => { "value" => "Other",
"value" => "Other", },
}, }.freeze
}.freeze
else
{
"1" => {
"value" => "Internal transfer",
"hint" => "Where the tenant has moved to another social property owned by the same landlord.",
},
"2" => {
"value" => "Tenant applied directly (no referral or nomination)",
},
"3" => {
"value" => "Nominated by a local housing authority",
},
"4" => {
"value" => "Referred by local authority housing department",
},
"8" => {
"value" => "Re-located through official housing mobility scheme",
},
"10" => {
"value" => "Other social landlord",
},
"9" => {
"value" => "Community learning disability team",
},
"14" => {
"value" => "Community mental health team",
},
"15" => {
"value" => "Health service",
},
"12" => {
"value" => "Police, probation or prison",
},
"7" => {
"value" => "Voluntary agency",
},
"13" => {
"value" => "Youth offending team",
},
"17" => {
"value" => "Children’s Social Care",
},
"16" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84, 2025 => 84 }.freeze

135
app/models/form/lettings/questions/rsnvac.rb

@ -7,95 +7,52 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "14" => {
"14" => { "value" => "Renewal of fixed-term tenancy",
"value" => "Renewal of fixed-term tenancy", "hint" => "To the same tenant in the same property, except if was previously used as temporary accommodation.",
"hint" => "To the same tenant in the same property, except if was previously used as temporary accommodation.", },
}, "9" => {
"9" => { "value" => "Re-let to tenant who occupied same property as temporary accommodation",
"value" => "Re-let to tenant who occupied same property as temporary accommodation", },
}, "13" => {
"13" => { "value" => "Internal transfer",
"value" => "Internal transfer", "hint" => "Where a tenant moved from one social housing property to another property. Their landlord may be the same or may have changed.",
"hint" => "Where a tenant moved from one social housing property to another property. Their landlord may be the same or may have changed.", },
}, "12" => {
"12" => { "value" => "Tenant moved to other social housing provider",
"value" => "Tenant moved to other social housing provider", },
}, "8" => {
"8" => { "value" => "Tenant moved to private sector or other accommodation",
"value" => "Tenant moved to private sector or other accommodation", },
}, "18" => {
"18" => { "value" => "Tenant moved to care home",
"value" => "Tenant moved to care home", },
}, "20" => {
"20" => { "value" => "Tenant moved to long-stay hospital or similar institution",
"value" => "Tenant moved to long-stay hospital or similar institution", },
}, "5" => {
"5" => { "value" => "Tenant died with no succession",
"value" => "Tenant died with no succession", },
}, "19" => {
"19" => { "value" => "Tenant involved in a succession downsize",
"value" => "Tenant involved in a succession downsize", },
}, "6" => {
"6" => { "value" => "Tenant abandoned property",
"value" => "Tenant abandoned property", },
}, "10" => {
"10" => { "value" => "Tenant was evicted due to rent arrears",
"value" => "Tenant was evicted due to rent arrears", },
}, "11" => {
"11" => { "value" => "Tenant was evicted due to anti-social behaviour",
"value" => "Tenant was evicted due to anti-social behaviour", },
}, "21" => {
"21" => { "value" => "Tenant was evicted due to both rent arrears and anti-social behaviour",
"value" => "Tenant was evicted due to both rent arrears and anti-social behaviour", },
}, "22" => {
"22" => { "value" => "Any other reason",
"value" => "Any other reason", },
}, }
}
else
{
"13" => {
"value" => "Internal transfer",
"hint" => "Where a tenant moved from one social housing property to another property. Their landlord may be the same or may have changed.",
},
"5" => {
"value" => "Previous tenant died with no succession",
},
"9" => {
"value" => "Re-let to tenant who occupied same property as temporary accommodation",
},
"14" => {
"value" => "Renewal of fixed-term tenancy",
"hint" => "To the same tenant in the same property, except if was previously used as temporary accommodation.",
},
"19" => {
"value" => "Tenant involved in a succession downsize",
},
"8" => {
"value" => "Tenant moved to private sector or other accommodation",
},
"12" => {
"value" => "Tenant moved to other social housing provider",
},
"18" => {
"value" => "Tenant moved to care home",
},
"20" => {
"value" => "Tenant moved to long-stay hospital or similar institution",
},
"6" => {
"value" => "Tenant abandoned property",
},
"10" => {
"value" => "Tenant was evicted due to rent arrears",
},
"11" => {
"value" => "Tenant was evicted due to anti-social behaviour",
},
}
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 17, 2024 => 18, 2025 => 15, 2026 => 15 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 17, 2024 => 18, 2025 => 15, 2026 => 15 }.freeze

80
app/models/form/lettings/questions/starter_tenancy_type.rb

@ -10,59 +10,33 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "4" => {
"4" => { "value" => "Assured Shorthold Tenancy (AST) – Fixed term",
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", "hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
"hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", },
}, "6" => {
"6" => { "value" => "Secure – fixed term",
"value" => "Secure – fixed term", "hint" => "These are mostly provided by local authorities. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
"hint" => "These are mostly provided by local authorities. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", },
}, "2" => {
"2" => { "value" => "Assured – lifetime",
"value" => "Assured – lifetime", },
}, "7" => {
"7" => { "value" => "Secure – lifetime",
"value" => "Secure – lifetime", },
}, "8" => {
"8" => { "value" => "Periodic",
"value" => "Periodic", "hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.",
"hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", },
}, "5" => {
"5" => { "value" => "Licence agreement",
"value" => "Licence agreement", "hint" => "These are mostly used for Supported Housing and work on a rolling basis.",
"hint" => "These are mostly used for Supported Housing and work on a rolling basis.", },
}, "3" => {
"3" => { "value" => "Other",
"value" => "Other", },
}, }.freeze
}.freeze
else
{
"4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term",
"hint" => "Mostly housing associations provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"6" => {
"value" => "Secure – fixed term",
"hint" => "Mostly local authorities provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"2" => {
"value" => "Assured – lifetime",
},
"7" => {
"value" => "Secure – lifetime",
},
"5" => {
"value" => "Licence agreement",
"hint" => "Licence agreements are mostly used for Supported Housing and work on a rolling basis.",
},
"3" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze

80
app/models/form/lettings/questions/tenancy_type.rb

@ -10,59 +10,33 @@ class Form::Lettings::Questions::TenancyType < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "4" => {
"4" => { "value" => "Assured Shorthold Tenancy (AST) – Fixed term",
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", "hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
"hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", },
}, "6" => {
"6" => { "value" => "Secure – fixed term",
"value" => "Secure – fixed term", "hint" => "These are mostly provided by local authorities. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
"hint" => "These are mostly provided by local authorities. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", },
}, "2" => {
"2" => { "value" => "Assured – lifetime",
"value" => "Assured – lifetime", },
}, "7" => {
"7" => { "value" => "Secure – lifetime",
"value" => "Secure – lifetime", },
}, "8" => {
"8" => { "value" => "Periodic",
"value" => "Periodic", "hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.",
"hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", },
}, "5" => {
"5" => { "value" => "Licence agreement",
"value" => "Licence agreement", "hint" => "These are mostly used for Supported Housing and work on a rolling basis.",
"hint" => "These are mostly used for Supported Housing and work on a rolling basis.", },
}, "3" => {
"3" => { "value" => "Other",
"value" => "Other", },
}, }.freeze
}.freeze
else
{
"4" => {
"value" => "Assured Shorthold Tenancy (AST) – Fixed term",
"hint" => "Mostly housing associations provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"6" => {
"value" => "Secure – fixed term",
"hint" => "Mostly local authorities provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.",
},
"2" => {
"value" => "Assured – lifetime",
},
"7" => {
"value" => "Secure – lifetime",
},
"5" => {
"value" => "Licence agreement",
"hint" => "Licence agreements are mostly used for Supported Housing and work on a rolling basis.",
},
"3" => {
"value" => "Other",
},
}.freeze
end
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 27, 2024 => 27, 2025 => 28, 2026 => 27 }.freeze

15
app/models/form/lettings/questions/uprn_confirmation.rb

@ -8,17 +8,10 @@ class Form::Lettings::Questions::UprnConfirmation < ::Form::Question
end end
def answer_options def answer_options
if form.start_year_2024_or_later? {
{ "1" => { "value" => "Yes" },
"1" => { "value" => "Yes" }, "0" => { "value" => "No, I want to search for the address instead" },
"0" => { "value" => "No, I want to search for the address instead" }, }.freeze
}.freeze
else
{
"1" => { "value" => "Yes" },
"0" => { "value" => "No, I want to enter the address manually" },
}.freeze
end
end end
def notification_banner(log = nil) def notification_banner(log = nil)

17
app/models/form/lettings/questions/waityear.rb

@ -23,27 +23,14 @@ class Form::Lettings::Questions::Waityear < ::Form::Question
}.freeze }.freeze
end end
if form.start_year_2024_or_later?
return {
"2" => { "value" => "Less than 1 year" },
"7" => { "value" => "1 year but under 2 years" },
"8" => { "value" => "2 years but under 3 years" },
"9" => { "value" => "3 years but under 4 years" },
"10" => { "value" => "4 years but under 5 years" },
"11" => { "value" => "5 years but under 10 years" },
"12" => { "value" => "10 years or more" },
"divider" => { "value" => true },
"6" => { "value" => "Don’t know" },
}.freeze
end
{ {
"2" => { "value" => "Less than 1 year" }, "2" => { "value" => "Less than 1 year" },
"7" => { "value" => "1 year but under 2 years" }, "7" => { "value" => "1 year but under 2 years" },
"8" => { "value" => "2 years but under 3 years" }, "8" => { "value" => "2 years but under 3 years" },
"9" => { "value" => "3 years but under 4 years" }, "9" => { "value" => "3 years but under 4 years" },
"10" => { "value" => "4 years but under 5 years" }, "10" => { "value" => "4 years but under 5 years" },
"5" => { "value" => "5 years or more" }, "11" => { "value" => "5 years but under 10 years" },
"12" => { "value" => "10 years or more" },
"divider" => { "value" => true }, "divider" => { "value" => true },
"6" => { "value" => "Don’t know" }, "6" => { "value" => "Don’t know" },
}.freeze }.freeze

7
app/models/form/sales/questions/mortgage_lender.rb

@ -55,15 +55,10 @@ class Form::Sales::Questions::MortgageLender < ::Form::Question
"0" => "Don’t know", "0" => "Don’t know",
}.freeze }.freeze
OPTIONS_INTRODUCED_2024 = %w[41].freeze
OPTIONS_NOT_DISPLAYED = %w[0].freeze OPTIONS_NOT_DISPLAYED = %w[0].freeze
def answer_options def answer_options
if form.start_year_2024_or_later? ANSWER_OPTIONS
ANSWER_OPTIONS
else
ANSWER_OPTIONS.dup.reject { |k, _v| OPTIONS_INTRODUCED_2024.include?(k) }
end
end end
def displayed_answer_options(_log, _user = nil) def displayed_answer_options(_log, _user = nil)

4
config/locales/en.yml

@ -336,9 +336,7 @@ en:
cannot_be_internal_transfer: "Answer cannot be internal transfer as this is not a secure tenancy." cannot_be_internal_transfer: "Answer cannot be internal transfer as this is not a secure tenancy."
declaration: declaration:
missing: missing: "You must show or give the tenant access to the MHCLG privacy notice before you can submit this log."
pre_2024: "You must show the MHCLG privacy notice to the tenant before you can submit this log."
post_2024: "You must show or give the tenant access to the MHCLG privacy notice before you can submit this log."
privacynotice: privacynotice:
missing: missing:

Loading…
Cancel
Save