Browse Source

fix content for non renewal household situation questions

pull/298/head
Kat 3 years ago
parent
commit
a6b1ecdf81
  1. 1
      app/models/case_log.rb
  2. 18
      app/models/constants/case_log.rb
  3. 112
      config/forms/2021_2022.json
  4. 2
      docs/api/DLUHC-CORE-Data.v1.json
  5. 2
      spec/factories/case_log.rb
  6. 2
      spec/features/form/check_answers_page_spec.rb
  7. 2
      spec/fixtures/complete_case_log.json
  8. 8
      spec/fixtures/exports/case_logs.xml
  9. 16
      spec/fixtures/forms/2021_2022.json
  10. 2
      spec/models/form_spec.rb

1
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

18
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,
"Couldnt afford fees attached to renewing the tenancy" => 35,
"Couldnt afford increase in rent" => 36,
"Couldnt afford rent or mortgage - welfare reforms" => 37,
"Couldnt afford rent or mortgage - employment" => 38,
"Couldnt 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,

112
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 households 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": [{
"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 doesnt 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 doesnt include housing benefit or Universal Credit.",
"type": "numeric",
"min": 0,
"step": 1,

2
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",

2
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" }

2
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",

2
spec/fixtures/complete_case_log.json vendored

@ -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",

8
spec/fixtures/exports/case_logs.xml vendored

@ -62,7 +62,7 @@
<incfreq>Weekly</incfreq>
<benefits>Some</benefits>
<period>Every 2 weeks</period>
<layear>1 to 2 years</layear>
<layear>1 year but under 2 years</layear>
<lawaitlist>Less than 1 year</lawaitlist>
<property_postcode>NW1 5TY</property_postcode>
<reasonpref>Yes</reasonpref>
@ -144,7 +144,7 @@
<has_benefits>Yes</has_benefits>
<nocharge>No</nocharge>
<is_carehome>No</is_carehome>
<letting_in_sheltered_accomodation>No</letting_in_sheltered_accomodation>
<letting_in_sheltered_accommodation>No</letting_in_sheltered_accommodation>
<household_charge>Yes</household_charge>
<referral/>
<brent>200.0</brent>
@ -218,7 +218,7 @@
<incfreq>Weekly</incfreq>
<benefits>Some</benefits>
<period>Every 2 weeks</period>
<layear>1 to 2 years</layear>
<layear>1 year but under 2 years</layear>
<lawaitlist>Less than 1 year</lawaitlist>
<property_postcode>NW1 5TY</property_postcode>
<reasonpref>Yes</reasonpref>
@ -300,7 +300,7 @@
<has_benefits>Yes</has_benefits>
<nocharge>No</nocharge>
<is_carehome>No</is_carehome>
<letting_in_sheltered_accomodation>No</letting_in_sheltered_accomodation>
<letting_in_sheltered_accommodation>No</letting_in_sheltered_accommodation>
<household_charge>Yes</household_charge>
<referral/>
<brent>200.0</brent>

16
spec/fixtures/forms/2021_2022.json vendored

@ -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"

2
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"

Loading…
Cancel
Save