diff --git a/app/models/case_log.rb b/app/models/case_log.rb index a484fec59..7ecb98d52 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -139,6 +139,7 @@ class CaseLog < ApplicationRecord enum postcode_known: POLAR, _suffix: true enum previous_postcode_known: POLAR, _suffix: true enum la_known: POLAR, _suffix: true + enum previous_la_known: POLAR, _suffix: true enum net_income_known: NET_INCOME_KNOWN, _suffix: true enum household_charge: POLAR, _suffix: true enum is_carehome: POLAR, _suffix: true diff --git a/app/models/constants/case_log.rb b/app/models/constants/case_log.rb index 8272b5438..2d4e63d9a 100644 --- a/app/models/constants/case_log.rb +++ b/app/models/constants/case_log.rb @@ -219,10 +219,10 @@ module Constants::CaseLog LATIME = { "Just moved to local authority area" => 1, "Less than 1 year" => 2, - "1 to 2 years" => 7, - "2 to 3 years" => 8, - "3 to 4 years" => 9, - "4 to 5 years" => 10, + "1 year but under 2 years" => 7, + "2 years but under 3 years" => 8, + "3 years but under 4 years" => 9, + "4 years but under 5 years" => 10, "5 years or more" => 5, "Don’t know" => 6, }.freeze @@ -256,11 +256,11 @@ module Constants::CaseLog "Under occupation - no incentive" => 30, "Property unsuitable because of ill health or disability" => 13, "Property unsuitable because of poor condition" => 14, - "Couldn't afford fees attached to renewing the tenancy" => 35, - "Couldn't afford increase in rent" => 36, - "Couldn't afford rent or mortgage - welfare reforms" => 37, - "Couldn't afford rent or mortgage - employment" => 38, - "Couldn't afford rent or mortgage - other" => 39, + "Couldn’t afford fees attached to renewing the tenancy" => 35, + "Couldn’t afford increase in rent" => 36, + "Couldn’t afford rent or mortgage - welfare reforms" => 37, + "Couldn’t afford rent or mortgage - employment" => 38, + "Couldn’t afford rent or mortgage - other" => 39, "To move nearer to family, friends or school" => 16, "To move nearer to work" => 17, "To move to accommodation with support" => 18, diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 5886b89e5..ddce7224d 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -1107,7 +1107,7 @@ "questions": { "layear": { "check_answer_label": "How long has the household continuously lived in the local authority area where the new letting is located?", - "header": "How long has the household continuously lived in the local authority area where the new letting is located?", + "header": "How long has the household continuously lived in the local authority area of the new letting?", "hint_text": "", "type": "radio", "answer_options": { @@ -1118,25 +1118,25 @@ "value": "Less than 1 year" }, "2": { - "value": "1 to 2 years" + "value": "1 year but under 2 years" }, "3": { - "value": "2 to 3 years" + "value": "2 years but under 3 years" }, "4": { - "value": "3 to 4 years" + "value": "3 years but under 4 years" }, "5": { - "value": "4 to 5 years" + "value": "4 years but under 5 years" }, "6": { "value": "5 years or more" }, - "7": { - "value": "Don’t know" - }, "divider": { "value": true + }, + "7": { + "value": "Don’t know" } } } @@ -1159,25 +1159,25 @@ "value": "Less than 1 year" }, "2": { - "value": "1 to 2 years" + "value": "1 year but under 2 years" }, "3": { - "value": "2 to 3 years" + "value": "2 years but under 3 years" }, "4": { - "value": "3 to 4 years" + "value": "3 years but under 4 years" }, "5": { - "value": "4 to 5 years" + "value": "4 years but under 5 years" }, "6": { "value": "5 years or more" }, - "7": { - "value": "Don’t know" - }, "divider": { "value": true + }, + "7": { + "value": "Don’t know" } } } @@ -1190,7 +1190,7 @@ "questions": { "reason": { "header": "What is the tenant’s main reason for the household leaving their last settled home?", - "hint_text": "The tenant's 'last settled home' is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously.", + "hint_text": "The tenant’s ’last settled home’ is their last long-standing home. For tenants who were in temporary accommodation or sleeping rough, their last settled home is where they were living previously.", "type": "radio", "answer_options": { "0": { @@ -1227,7 +1227,7 @@ "value": "Relationship breakdown (non-violent) with partner" }, "11": { - "value": "Death of household member in last settled accomodation" + "value": "Death of household member in last settled accommodation" }, "12": { "value": "To move nearer to family, friends or school" @@ -1281,10 +1281,10 @@ "value": "Under occupation - offered incentive to downsize" }, "29": { - "value": "To move to accomodation with support" + "value": "To move to accommodation with support" }, "30": { - "value": "To move to independent accomodation" + "value": "To move to independent accommodation" }, "31": { "value": "Other" @@ -1413,11 +1413,11 @@ "3": { "value": "No" }, - "4": { - "value": "Don’t know" - }, "divider": { "value": true + }, + "4": { + "value": "Don’t know" } } } @@ -1450,13 +1450,13 @@ "description": "", "questions": { "previous_postcode_known": { - "check_answer_label": "Do you know the postcode of the household's last settled accommodation?", + "check_answer_label": "Do you know the postcode of the household’s last settled accommodation?", "header": "Do you know the property’s postcode?", - "hint_text": "This is also known as the household's 'last settled home'.", + "hint_text": "This is also known as the household’s ’last settled home’.", "type": "radio", "answer_options": { - "1": "Yes", - "0": "No" + "1": { "value": "Yes" }, + "0": { "value": "No" } }, "conditional_for": { "previous_postcode": ["Yes"] @@ -1469,7 +1469,9 @@ "hint_text": "", "type": "text", "width": 5, - "inferred_answers": { "la": { "is_previous_la_inferred": true } }, + "inferred_answers": { + "la": { "is_previous_la_inferred": true } + }, "inferred_check_answers_value": { "condition": { "postcode_known": "No" }, "value": "Not known" @@ -1484,11 +1486,11 @@ "previous_la_known": { "check_answer_label": "Do you know the local authority of the household’s last settled accommodation?", "header": "Do you know the local authority of the household’s last settled accommodation?", - "hint_text": "This is also known as the household's 'last settled home'.", + "hint_text": "This is also known as the household’s ’last settled home’.", "type": "radio", "answer_options": { - "1": "Yes", - "0": "No" + "1": { "value": "Yes" }, + "0": { "value": "No" } } } }, @@ -1891,7 +1893,9 @@ } } }, - "depends_on": [{"previous_la_known": "Yes", "is_previous_la_inferred": false }] + "depends_on": [ + { "previous_la_known": "Yes", "is_previous_la_inferred": false } + ] }, "reasonable_preference": { "header": "", @@ -1909,11 +1913,11 @@ "1": { "value": "No" }, - "2": { - "value": "Don’t know" - }, "divider": { "value": true + }, + "2": { + "value": "Don’t know" } } } @@ -1926,7 +1930,7 @@ "reasonable_preference_reason": { "check_answer_label": "Reason for reasonable preference", "header": "Why was the household given ‘reasonable preference’?", - "hint_text": "Select all that apply.", + "hint_text": "", "type": "checkbox", "answer_options": { "rp_homeless": { @@ -1950,9 +1954,11 @@ } } }, - "depends_on": [{ - "reasonpref": "Yes" - }] + "depends_on": [ + { + "reasonpref": "Yes" + } + ] }, "lettings_policy": { "header": "", @@ -2029,7 +2035,12 @@ } } }, - "depends_on": [{"managing_organisation.provider_type": "LA", "needstype": "General needs"}] + "depends_on": [ + { + "managing_organisation.provider_type": "LA", + "needstype": "General needs" + } + ] }, "referral_prp": { "header": "", @@ -2080,7 +2091,12 @@ } } }, - "depends_on": [{"managing_organisation.provider_type": "PRP", "needstype": "General needs"}] + "depends_on": [ + { + "managing_organisation.provider_type": "PRP", + "needstype": "General needs" + } + ] }, "referral_supported_housing": { "header": "", @@ -2131,7 +2147,12 @@ } } }, - "depends_on": [{"managing_organisation.provider_type": "LA", "needstype": "Supported housing"}] + "depends_on": [ + { + "managing_organisation.provider_type": "LA", + "needstype": "Supported housing" + } + ] }, "referral_supported_housing_prp": { "header": "", @@ -2185,7 +2206,12 @@ } } }, - "depends_on": [{"managing_organisation.provider_type": "PRP", "needstype": "Supported housing"}] + "depends_on": [ + { + "managing_organisation.provider_type": "PRP", + "needstype": "Supported housing" + } + ] } } }, @@ -4071,7 +4097,7 @@ "pscharge": { "check_answer_label": "Personal service charge", "header": "What is the personal service charge?", - "hint_text": "For example, for heating or hot water. This doesn't include housing benefit or Universal Credit.", + "hint_text": "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit.", "type": "numeric", "min": 0, "step": 1, @@ -4267,7 +4293,7 @@ "pscharge": { "check_answer_label": "Personal service charge", "header": "What is the personal service charge?", - "hint_text": "For example, for heating or hot water. This doesn't include housing benefit or Universal Credit.", + "hint_text": "For example, for heating or hot water. This doesn’t include housing benefit or Universal Credit.", "type": "numeric", "min": 0, "step": 1, diff --git a/docs/api/DLUHC-CORE-Data.v1.json b/docs/api/DLUHC-CORE-Data.v1.json index 6cda929df..46443d4c6 100644 --- a/docs/api/DLUHC-CORE-Data.v1.json +++ b/docs/api/DLUHC-CORE-Data.v1.json @@ -331,7 +331,7 @@ "supcharg": 35, "tcharge": 325, "tshortfall": "Yes", - "layear": "1 to 2 years", + "layear": "1 year but under 2 years", "lawaitlist": "Less than 1 year", "prevloc": "Ashford", "property_postcode": "SE2 6RT", diff --git a/spec/factories/case_log.rb b/spec/factories/case_log.rb index 0287f45f5..aea1e11d1 100644 --- a/spec/factories/case_log.rb +++ b/spec/factories/case_log.rb @@ -75,7 +75,7 @@ FactoryBot.define do pscharge { 40 } supcharg { 35 } tcharge { 325 } - layear { "1 to 2 years" } + layear { "1 year but under 2 years" } lawaitlist { "Less than 1 year" } property_postcode { "NW1 5TY" } reasonpref { "Yes" } diff --git a/spec/features/form/check_answers_page_spec.rb b/spec/features/form/check_answers_page_spec.rb index 131b63bc8..b92153877 100644 --- a/spec/features/form/check_answers_page_spec.rb +++ b/spec/features/form/check_answers_page_spec.rb @@ -179,7 +179,7 @@ RSpec.describe "Form Check Answers Page" do managing_organisation: user.organisation, tenant_code: nil, age1: nil, - layear: "1 to 2 years", + layear: "1 year but under 2 years", lawaitlist: "Less than 1 year", property_postcode: "NW1 5TY", reason: "Permanently decanted from another property owned by this landlord", diff --git a/spec/fixtures/complete_case_log.json b/spec/fixtures/complete_case_log.json index 690717769..c5532f1c5 100644 --- a/spec/fixtures/complete_case_log.json +++ b/spec/fixtures/complete_case_log.json @@ -84,7 +84,7 @@ "supcharg": 35, "tcharge": 325, "outstanding_amount": "Yes", - "layear": "1 to 2 years", + "layear": "1 year but under 2 years", "lawaitlist": "Less than 1 year", "prevloc": "Ashford", "previous_postcode": "SE2 6RT", diff --git a/spec/fixtures/exports/case_logs.xml b/spec/fixtures/exports/case_logs.xml index 7b2181582..c7fd848d0 100644 --- a/spec/fixtures/exports/case_logs.xml +++ b/spec/fixtures/exports/case_logs.xml @@ -62,7 +62,7 @@ Weekly Some Every 2 weeks - 1 to 2 years + 1 year but under 2 years Less than 1 year NW1 5TY Yes @@ -144,7 +144,7 @@ Yes No No - No + No Yes 200.0 @@ -218,7 +218,7 @@ Weekly Some Every 2 weeks - 1 to 2 years + 1 year but under 2 years Less than 1 year NW1 5TY Yes @@ -300,7 +300,7 @@ Yes No No - No + No Yes 200.0 diff --git a/spec/fixtures/forms/2021_2022.json b/spec/fixtures/forms/2021_2022.json index 083ce0827..c26509345 100644 --- a/spec/fixtures/forms/2021_2022.json +++ b/spec/fixtures/forms/2021_2022.json @@ -688,16 +688,16 @@ "value": "Less than 1 year" }, "2": { - "value": "1 to 2 years" + "value": "1 year but under 2 years" }, "3": { - "value": "2 to 3 years" + "value": "2 years but under 3 years" }, "4": { - "value": "3 to 4 years" + "value": "3 years but under 4 years" }, "5": { - "value": "4 to 5 years" + "value": "4 years but under 5 years" }, "6": { "value": "5 years or more" @@ -726,16 +726,16 @@ "value": "Less than 1 year" }, "2": { - "value": "1 to 2 years" + "value": "1 year but under 2 years" }, "3": { - "value": "2 to 3 years" + "value": "2 years but under 3 years" }, "4": { - "value": "3 to 4 years" + "value": "3 years but under 4 years" }, "5": { - "value": "4 to 5 years" + "value": "4 years but under 5 years" }, "6": { "value": "5 years or more" diff --git a/spec/models/form_spec.rb b/spec/models/form_spec.rb index 93bca44c3..685a20212 100644 --- a/spec/models/form_spec.rb +++ b/spec/models/form_spec.rb @@ -77,7 +77,7 @@ RSpec.describe Form, type: :model do end def answer_local_authority(case_log) - case_log.layear = "1 to 2 years" + case_log.layear = "1 year but under 2 years" case_log.lawaitlist = "Less than 1 year" case_log.property_postcode = "NW1 5TY" case_log.reason = "Permanently decanted from another property owned by this landlord"