diff --git a/app/models/form/lettings/pages/address.rb b/app/models/form/lettings/pages/address.rb
index 916b2f2ca..9fe18d3ef 100644
--- a/app/models/form/lettings/pages/address.rb
+++ b/app/models/form/lettings/pages/address.rb
@@ -2,7 +2,7 @@ class Form::Lettings::Pages::Address < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "address"
- @header = "Q12 - What is the property's address?"
+ @header = "Q#{QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]} - What is the property's address?"
@depends_on = [
{ "is_supported_housing?" => false, "uprn_known" => nil },
{ "is_supported_housing?" => false, "uprn_known" => 0 },
@@ -19,4 +19,6 @@ class Form::Lettings::Pages::Address < ::Form::Page
Form::Lettings::Questions::PostcodeForFullAddress.new(nil, nil, self),
]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end
diff --git a/app/models/form/lettings/pages/income_amount.rb b/app/models/form/lettings/pages/income_amount.rb
index c4ebaff2b..589ae463a 100644
--- a/app/models/form/lettings/pages/income_amount.rb
+++ b/app/models/form/lettings/pages/income_amount.rb
@@ -8,8 +8,8 @@ class Form::Lettings::Pages::IncomeAmount < ::Form::Page
def questions
@questions ||= [
- Form::Lettings::Questions::Earnings.new(nil, nil, self),
Form::Lettings::Questions::Incfreq.new(nil, nil, self),
+ Form::Lettings::Questions::Earnings.new(nil, nil, self),
]
end
end
diff --git a/app/models/form/lettings/questions/address_line1.rb b/app/models/form/lettings/questions/address_line1.rb
index 95702b8de..f90da8b26 100644
--- a/app/models/form/lettings/questions/address_line1.rb
+++ b/app/models/form/lettings/questions/address_line1.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
@plain_label = true
@check_answer_label = "Address lines 1 and 2"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
- @question_number = 12
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true
end
@@ -18,4 +18,6 @@ class Form::Lettings::Questions::AddressLine1 < ::Form::Question
log.address_line2,
].select(&:present?).join("\n")
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end
diff --git a/app/models/form/lettings/questions/age.rb b/app/models/form/lettings/questions/age.rb
index 6b76a6945..26f7527d6 100644
--- a/app/models/form/lettings/questions/age.rb
+++ b/app/models/form/lettings/questions/age.rb
@@ -12,6 +12,18 @@ class Form::Lettings::Questions::Age < ::Form::Question
@min = 1
@step = 1
@hint_text = "For a child under 1, enter 1" if person_type == "child"
- @question_number = 31 + (4 * person_index)
+ @person_index = person_index
+ @question_number = question_number
+ end
+
+ def question_number
+ base_question_number = case form.start_date.year
+ when 2023
+ 31
+ else
+ 30
+ end
+
+ base_question_number + (4 * @person_index)
end
end
diff --git a/app/models/form/lettings/questions/age1.rb b/app/models/form/lettings/questions/age1.rb
index 2f43ac7ab..922345e65 100644
--- a/app/models/form/lettings/questions/age1.rb
+++ b/app/models/form/lettings/questions/age1.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::Age1 < ::Form::Question
@max = 120
@min = 16
@step = 1
- @question_number = 32
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 32, 2024 => 31 }.freeze
end
diff --git a/app/models/form/lettings/questions/age1_known.rb b/app/models/form/lettings/questions/age1_known.rb
index 42505b113..27c185de4 100644
--- a/app/models/form/lettings/questions/age1_known.rb
+++ b/app/models/form/lettings/questions/age1_known.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::Age1Known < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "age1" => [0] }
@hidden_in_check_answers = { "depends_on" => [{ "age1_known" => 0 }, { "age1_known" => 1 }] }
- @question_number = 32
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze
@@ -21,4 +21,6 @@ class Form::Lettings::Questions::Age1Known < ::Form::Question
"The ’lead’ or ’main’ 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."
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 32, 2024 => 31 }.freeze
end
diff --git a/app/models/form/lettings/questions/age_known.rb b/app/models/form/lettings/questions/age_known.rb
index 9f9264e7d..10ae7dad5 100644
--- a/app/models/form/lettings/questions/age_known.rb
+++ b/app/models/form/lettings/questions/age_known.rb
@@ -15,8 +15,20 @@ class Form::Lettings::Questions::AgeKnown < ::Form::Question
{ "age#{person_index}_known" => 1 },
],
}
- @question_number = 31 + (4 * person_index)
+ @person_index = person_index
+ @question_number = question_number
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze
+
+ def question_number
+ base_question_number = case form.start_date.year
+ when 2023
+ 31
+ else
+ 30
+ end
+
+ base_question_number + (4 * @person_index)
+ end
end
diff --git a/app/models/form/lettings/questions/armedforces.rb b/app/models/form/lettings/questions/armedforces.rb
index fb9a02a64..d7f8e44f2 100644
--- a/app/models/form/lettings/questions/armedforces.rb
+++ b/app/models/form/lettings/questions/armedforces.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Armedforces < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This excludes national service.
If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner."
@answer_options = ANSWER_OPTIONS
- @question_number = 66
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -20,4 +20,6 @@ class Form::Lettings::Questions::Armedforces < ::Form::Question
"3" => { "value" => "Person prefers not to say" },
"6" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 66, 2024 => 65 }.freeze
end
diff --git a/app/models/form/lettings/questions/beds.rb b/app/models/form/lettings/questions/beds.rb
index e75e688bb..87847d512 100644
--- a/app/models/form/lettings/questions/beds.rb
+++ b/app/models/form/lettings/questions/beds.rb
@@ -10,10 +10,12 @@ class Form::Lettings::Questions::Beds < ::Form::Question
@max = 12
@min = 1
@step = 1
- @question_number = 22
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def hint_text
form.start_year_after_2024? ? "If shared accommodation, enter the number of bedrooms occupied by this household." : "If shared accommodation, enter the number of bedrooms occupied by this household. A bedsit has 1 bedroom."
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 22 }.freeze
end
diff --git a/app/models/form/lettings/questions/benefits.rb b/app/models/form/lettings/questions/benefits.rb
index 3d23c50a1..bc17396fb 100644
--- a/app/models/form/lettings/questions/benefits.rb
+++ b/app/models/form/lettings/questions/benefits.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Benefits < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This excludes child and housing benefit, council tax support and tax credits."
@answer_options = ANSWER_OPTIONS
- @question_number = 90
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -18,4 +18,6 @@ class Form::Lettings::Questions::Benefits < ::Form::Question
"divider" => { "value" => true },
"4" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 90, 2024 => 89 }.freeze
end
diff --git a/app/models/form/lettings/questions/brent_4_weekly.rb b/app/models/form/lettings/questions/brent_4_weekly.rb
index 6649b9a60..436b628ad 100644
--- a/app/models/form/lettings/questions/brent_4_weekly.rb
+++ b/app/models/form/lettings/questions/brent_4_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::Brent4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
- @question_number = 95
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end
diff --git a/app/models/form/lettings/questions/brent_bi_weekly.rb b/app/models/form/lettings/questions/brent_bi_weekly.rb
index 37f1bfa20..8dc27b610 100644
--- a/app/models/form/lettings/questions/brent_bi_weekly.rb
+++ b/app/models/form/lettings/questions/brent_bi_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::BrentBiWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 2 weeks"
- @question_number = 95
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end
diff --git a/app/models/form/lettings/questions/brent_monthly.rb b/app/models/form/lettings/questions/brent_monthly.rb
index e38a490b0..7b567736b 100644
--- a/app/models/form/lettings/questions/brent_monthly.rb
+++ b/app/models/form/lettings/questions/brent_monthly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::BrentMonthly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every month"
- @question_number = 95
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end
diff --git a/app/models/form/lettings/questions/brent_weekly.rb b/app/models/form/lettings/questions/brent_weekly.rb
index 7a8adfc7a..e604e5f34 100644
--- a/app/models/form/lettings/questions/brent_weekly.rb
+++ b/app/models/form/lettings/questions/brent_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::BrentWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every week"
- @question_number = 95
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 95, 2024 => 94 }.freeze
end
diff --git a/app/models/form/lettings/questions/builtype.rb b/app/models/form/lettings/questions/builtype.rb
index 9cda5649f..a95d88b13 100644
--- a/app/models/form/lettings/questions/builtype.rb
+++ b/app/models/form/lettings/questions/builtype.rb
@@ -8,11 +8,13 @@ class Form::Lettings::Questions::Builtype < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 20
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
"2" => { "value" => "Converted from previous residential or non-residential property" },
"1" => { "value" => "Purpose built" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 20 }.freeze
end
diff --git a/app/models/form/lettings/questions/chcharge_4_weekly.rb b/app/models/form/lettings/questions/chcharge_4_weekly.rb
index 6e0923cc0..b42bbe052 100644
--- a/app/models/form/lettings/questions/chcharge_4_weekly.rb
+++ b/app/models/form/lettings/questions/chcharge_4_weekly.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::Chcharge4Weekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every 4 weeks"
- @question_number = 94
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end
diff --git a/app/models/form/lettings/questions/chcharge_bi_weekly.rb b/app/models/form/lettings/questions/chcharge_bi_weekly.rb
index 273ec7ac0..72de6d32b 100644
--- a/app/models/form/lettings/questions/chcharge_bi_weekly.rb
+++ b/app/models/form/lettings/questions/chcharge_bi_weekly.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::ChchargeBiWeekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every 2 weeks"
- @question_number = 94
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end
diff --git a/app/models/form/lettings/questions/chcharge_monthly.rb b/app/models/form/lettings/questions/chcharge_monthly.rb
index ab2da34ad..c640085d2 100644
--- a/app/models/form/lettings/questions/chcharge_monthly.rb
+++ b/app/models/form/lettings/questions/chcharge_monthly.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::ChchargeMonthly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every month"
- @question_number = 94
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end
diff --git a/app/models/form/lettings/questions/chcharge_weekly.rb b/app/models/form/lettings/questions/chcharge_weekly.rb
index 96b8de324..484da8b5b 100644
--- a/app/models/form/lettings/questions/chcharge_weekly.rb
+++ b/app/models/form/lettings/questions/chcharge_weekly.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::ChchargeWeekly < ::Form::Question
@step = 0.01
@prefix = "£"
@suffix = " every week"
- @question_number = 94
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 94, 2024 => 93 }.freeze
end
diff --git a/app/models/form/lettings/questions/condition_effects.rb b/app/models/form/lettings/questions/condition_effects.rb
index c8240f232..de5c188f0 100644
--- a/app/models/form/lettings/questions/condition_effects.rb
+++ b/app/models/form/lettings/questions/condition_effects.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::ConditionEffects < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS
- @question_number = 74
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -29,4 +29,6 @@ class Form::Lettings::Questions::ConditionEffects < ::Form::Question
"illness_type_1" => { "value" => "Vision", "hint" => "For example, blindness or partial sight." },
"illness_type_10" => { "value" => "Other" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 74, 2024 => 73 }.freeze
end
diff --git a/app/models/form/lettings/questions/county.rb b/app/models/form/lettings/questions/county.rb
index 8eaa410eb..f3c780257 100644
--- a/app/models/form/lettings/questions/county.rb
+++ b/app/models/form/lettings/questions/county.rb
@@ -7,7 +7,9 @@ class Form::Lettings::Questions::County < ::Form::Question
@plain_label = true
@check_answer_label = "County"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
- @question_number = 12
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end
diff --git a/app/models/form/lettings/questions/declaration.rb b/app/models/form/lettings/questions/declaration.rb
index 985c4eed1..7e1b0280d 100644
--- a/app/models/form/lettings/questions/declaration.rb
+++ b/app/models/form/lettings/questions/declaration.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
@type = "checkbox"
@check_answers_card_number = 0 unless form.start_year_after_2024?
@top_guidance_partial = form.start_year_after_2024? ? "privacy_notice_tenant_2024" : "privacy_notice_tenant"
- @question_number = 30
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -19,4 +19,6 @@ class Form::Lettings::Questions::Declaration < ::Form::Question
{ "declaration" => { "value" => declaration_text } }.freeze
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 30, 2024 => 11 }.freeze
end
diff --git a/app/models/form/lettings/questions/earnings.rb b/app/models/form/lettings/questions/earnings.rb
index 84d9ff9c5..2ebb3e30b 100644
--- a/app/models/form/lettings/questions/earnings.rb
+++ b/app/models/form/lettings/questions/earnings.rb
@@ -17,6 +17,8 @@ class Form::Lettings::Questions::Earnings < ::Form::Question
{ "label" => " every month", "depends_on" => { "incfreq" => 2 } },
{ "label" => " every year", "depends_on" => { "incfreq" => 3 } },
]
- @question_number = 88
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 88, 2024 => 87 }.freeze
end
diff --git a/app/models/form/lettings/questions/ethnic_arab.rb b/app/models/form/lettings/questions/ethnic_arab.rb
index 9884b69f0..929b680b0 100644
--- a/app/models/form/lettings/questions/ethnic_arab.rb
+++ b/app/models/form/lettings/questions/ethnic_arab.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicArab < ::Form::Question
@check_answers_card_number = 1
@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."
@answer_options = ANSWER_OPTIONS
- @question_number = 35
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -19,4 +19,6 @@ class Form::Lettings::Questions::EthnicArab < ::Form::Question
"value" => "Other ethnic group",
},
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end
diff --git a/app/models/form/lettings/questions/ethnic_asian.rb b/app/models/form/lettings/questions/ethnic_asian.rb
index 17aa29d44..4e0ec376e 100644
--- a/app/models/form/lettings/questions/ethnic_asian.rb
+++ b/app/models/form/lettings/questions/ethnic_asian.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicAsian < ::Form::Question
@check_answers_card_number = 1
@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."
@answer_options = ANSWER_OPTIONS
- @question_number = 35
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -28,4 +28,6 @@ class Form::Lettings::Questions::EthnicAsian < ::Form::Question
"value" => "Any other Asian or Asian British background",
},
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end
diff --git a/app/models/form/lettings/questions/ethnic_black.rb b/app/models/form/lettings/questions/ethnic_black.rb
index 8ae04982f..4b336b819 100644
--- a/app/models/form/lettings/questions/ethnic_black.rb
+++ b/app/models/form/lettings/questions/ethnic_black.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicBlack < ::Form::Question
@check_answers_card_number = 1
@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."
@answer_options = ANSWER_OPTIONS
- @question_number = 35
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -22,4 +22,6 @@ class Form::Lettings::Questions::EthnicBlack < ::Form::Question
"value" => "Any other Black, African, Caribbean or Black British background",
},
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end
diff --git a/app/models/form/lettings/questions/ethnic_group.rb b/app/models/form/lettings/questions/ethnic_group.rb
index f9e392089..fdf80e03d 100644
--- a/app/models/form/lettings/questions/ethnic_group.rb
+++ b/app/models/form/lettings/questions/ethnic_group.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicGroup < ::Form::Question
@check_answers_card_number = 1
@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."
@answer_options = ANSWER_OPTIONS
- @question_number = 34
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -20,4 +20,6 @@ class Form::Lettings::Questions::EthnicGroup < ::Form::Question
"divider" => { "value" => true },
"17" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 34, 2024 => 33 }.freeze
end
diff --git a/app/models/form/lettings/questions/ethnic_mixed.rb b/app/models/form/lettings/questions/ethnic_mixed.rb
index ac059837d..3016abee1 100644
--- a/app/models/form/lettings/questions/ethnic_mixed.rb
+++ b/app/models/form/lettings/questions/ethnic_mixed.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::EthnicMixed < ::Form::Question
@check_answers_card_number = 1
@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."
@answer_options = ANSWER_OPTIONS
- @question_number = 35
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -25,4 +25,6 @@ class Form::Lettings::Questions::EthnicMixed < ::Form::Question
"value" => "Any other Mixed or Multiple ethnic background",
},
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end
diff --git a/app/models/form/lettings/questions/ethnic_white.rb b/app/models/form/lettings/questions/ethnic_white.rb
index 11bb3ef8a..9c042b576 100644
--- a/app/models/form/lettings/questions/ethnic_white.rb
+++ b/app/models/form/lettings/questions/ethnic_white.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
@type = "radio"
@check_answers_card_number = 1
@hint_text = form.start_year_after_2024? ? "" : "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_number = 35
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -28,4 +28,6 @@ class Form::Lettings::Questions::EthnicWhite < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 34 }.freeze
end
diff --git a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb b/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
index 10fe5752d..6e36c9911 100644
--- a/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
+++ b/app/models/form/lettings/questions/first_time_property_let_as_social_housing.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
- @question_number = 14
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -24,4 +24,6 @@ class Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing < ::Form::Q
def no_hint
form.start_year_after_2024? ? "This is a re-let of existing social housing stock." : "This is a re-let of existing social housing."
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 14, 2024 => 15 }.freeze
end
diff --git a/app/models/form/lettings/questions/gender_identity1.rb b/app/models/form/lettings/questions/gender_identity1.rb
index f7bba8e89..eefe20e15 100644
--- a/app/models/form/lettings/questions/gender_identity1.rb
+++ b/app/models/form/lettings/questions/gender_identity1.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::GenderIdentity1 < ::Form::Question
@type = "radio"
@check_answers_card_number = 1
@answer_options = ANSWER_OPTIONS
- @question_number = 33
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -25,4 +25,6 @@ class Form::Lettings::Questions::GenderIdentity1 < ::Form::Question
"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."
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 33, 2024 => 32 }.freeze
end
diff --git a/app/models/form/lettings/questions/hb.rb b/app/models/form/lettings/questions/hb.rb
index 11a9faa8e..a3feba77a 100644
--- a/app/models/form/lettings/questions/hb.rb
+++ b/app/models/form/lettings/questions/hb.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Hb < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is about when the tenant is in their new let. If they are unsure about the situation for their new let and their financial and working situation hasn’t changed significantly, answer based on what housing-related benefits they currently receive." : ""
@answer_options = ANSWER_OPTIONS
- @question_number = 89
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -19,4 +19,6 @@ class Form::Lettings::Questions::Hb < ::Form::Question
"3" => { "value" => "Don’t know" },
"10" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 89, 2024 => 88 }.freeze
end
diff --git a/app/models/form/lettings/questions/hbrentshortfall.rb b/app/models/form/lettings/questions/hbrentshortfall.rb
index 828c36377..ee9546e73 100644
--- a/app/models/form/lettings/questions/hbrentshortfall.rb
+++ b/app/models/form/lettings/questions/hbrentshortfall.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Hbrentshortfall < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Also known as the ‘outstanding amount’."
@answer_options = ANSWER_OPTIONS
- @question_number = 99
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -16,4 +16,6 @@ class Form::Lettings::Questions::Hbrentshortfall < ::Form::Question
"2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 99, 2024 => 98 }.freeze
end
diff --git a/app/models/form/lettings/questions/hhmemb.rb b/app/models/form/lettings/questions/hhmemb.rb
index fee0aced3..bd874d544 100644
--- a/app/models/form/lettings/questions/hhmemb.rb
+++ b/app/models/form/lettings/questions/hhmemb.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::Hhmemb < ::Form::Question
@min = 1
@hint_text = "You can provide details for a maximum of 8 people."
@step = 1
- @question_number = 31
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 31, 2024 => 30 }.freeze
end
diff --git a/app/models/form/lettings/questions/homeless.rb b/app/models/form/lettings/questions/homeless.rb
index 2462f75ab..081e1a8cf 100644
--- a/app/models/form/lettings/questions/homeless.rb
+++ b/app/models/form/lettings/questions/homeless.rb
@@ -8,11 +8,13 @@ class Form::Lettings::Questions::Homeless < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 79
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
"11" => { "value" => "Yes - assessed by a local authority as homeless" },
"1" => { "value" => "No" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 79, 2024 => 78 }.freeze
end
diff --git a/app/models/form/lettings/questions/household_charge.rb b/app/models/form/lettings/questions/household_charge.rb
index da77cb361..7f89aa548 100644
--- a/app/models/form/lettings/questions/household_charge.rb
+++ b/app/models/form/lettings/questions/household_charge.rb
@@ -8,8 +8,10 @@ class Form::Lettings::Questions::HouseholdCharge < ::Form::Question
@check_answers_card_number = 0
@hint_text = "If rent is charged on the property then answer Yes to this question, even if the tenants do not pay it themselves."
@answer_options = ANSWER_OPTIONS
- @question_number = 91
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 91, 2024 => 90 }.freeze
end
diff --git a/app/models/form/lettings/questions/housingneeds.rb b/app/models/form/lettings/questions/housingneeds.rb
index 5b6775eec..3d3369d68 100644
--- a/app/models/form/lettings/questions/housingneeds.rb
+++ b/app/models/form/lettings/questions/housingneeds.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Housingneeds < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 70
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::Housingneeds < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 70, 2024 => 69 }.freeze
end
diff --git a/app/models/form/lettings/questions/housingneeds_other.rb b/app/models/form/lettings/questions/housingneeds_other.rb
index 754fb106c..e8fa2c0f9 100644
--- a/app/models/form/lettings/questions/housingneeds_other.rb
+++ b/app/models/form/lettings/questions/housingneeds_other.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
- @question_number = 72
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -24,4 +24,6 @@ class Form::Lettings::Questions::HousingneedsOther < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 72, 2024 => 71 }.freeze
end
diff --git a/app/models/form/lettings/questions/housingneeds_type.rb b/app/models/form/lettings/questions/housingneeds_type.rb
index 49a03e73d..a3de7223d 100644
--- a/app/models/form/lettings/questions/housingneeds_type.rb
+++ b/app/models/form/lettings/questions/housingneeds_type.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::HousingneedsType < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 71
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -18,4 +18,6 @@ class Form::Lettings::Questions::HousingneedsType < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "None of the listed options" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 71, 2024 => 70 }.freeze
end
diff --git a/app/models/form/lettings/questions/illness.rb b/app/models/form/lettings/questions/illness.rb
index 6a54c6a46..20b76bec4 100644
--- a/app/models/form/lettings/questions/illness.rb
+++ b/app/models/form/lettings/questions/illness.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Illness < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 73
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::Illness < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 73, 2024 => 72 }.freeze
end
diff --git a/app/models/form/lettings/questions/incfreq.rb b/app/models/form/lettings/questions/incfreq.rb
index c31f23fd5..3067c5c98 100644
--- a/app/models/form/lettings/questions/incfreq.rb
+++ b/app/models/form/lettings/questions/incfreq.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::Incfreq < ::Form::Question
@hint_text = ""
@answer_options = ANSWER_OPTIONS
@hidden_in_check_answers = true
- @question_number = 87
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::Incfreq < ::Form::Question
"2" => { "value" => "Monthly" },
"3" => { "value" => "Yearly" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 87, 2024 => 86 }.freeze
end
diff --git a/app/models/form/lettings/questions/irproduct_other.rb b/app/models/form/lettings/questions/irproduct_other.rb
index be21c3d27..6b75fed7f 100644
--- a/app/models/form/lettings/questions/irproduct_other.rb
+++ b/app/models/form/lettings/questions/irproduct_other.rb
@@ -5,6 +5,8 @@ class Form::Lettings::Questions::IrproductOther < ::Form::Question
@check_answer_label = "Product name"
@header = "Name of rent product"
@type = "text"
- @question_number = 6
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 6 }.freeze
end
diff --git a/app/models/form/lettings/questions/is_carehome.rb b/app/models/form/lettings/questions/is_carehome.rb
index 34c40db50..41996b4f0 100644
--- a/app/models/form/lettings/questions/is_carehome.rb
+++ b/app/models/form/lettings/questions/is_carehome.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@conditional_for = { "chcharge" => [1] }
- @question_number = 93
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -24,4 +24,6 @@ class Form::Lettings::Questions::IsCarehome < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 93, 2024 => 92 }.freeze
end
diff --git a/app/models/form/lettings/questions/joint.rb b/app/models/form/lettings/questions/joint.rb
index 538660cdb..5f3379c5d 100644
--- a/app/models/form/lettings/questions/joint.rb
+++ b/app/models/form/lettings/questions/joint.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Joint < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is where two or more people are named on the tenancy agreement" : ""
@answer_options = ANSWER_OPTIONS
- @question_number = 25
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::Joint < ::Form::Question
"divider" => { "value" => "true" },
"3" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 25 }.freeze
end
diff --git a/app/models/form/lettings/questions/la.rb b/app/models/form/lettings/questions/la.rb
index f9d650918..6038bc2ad 100644
--- a/app/models/form/lettings/questions/la.rb
+++ b/app/models/form/lettings/questions/la.rb
@@ -7,11 +7,13 @@ class Form::Lettings::Questions::La < ::Form::Question
@type = "select"
@check_answers_card_number = nil
@hint_text = ""
- @question_number = 13
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
def answer_options
{ "" => "Select an option" }.merge(LocalAuthority.active(form.start_date).england.map { |la| [la.code, la.name] }.to_h)
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 13, 2024 => 14 }.freeze
end
diff --git a/app/models/form/lettings/questions/layear.rb b/app/models/form/lettings/questions/layear.rb
index ad504589b..5c2e9c195 100644
--- a/app/models/form/lettings/questions/layear.rb
+++ b/app/models/form/lettings/questions/layear.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::Layear < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
- @question_number = 75
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -38,4 +38,6 @@ class Form::Lettings::Questions::Layear < ::Form::Question
}
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 75, 2024 => 74 }.freeze
end
diff --git a/app/models/form/lettings/questions/leftreg.rb b/app/models/form/lettings/questions/leftreg.rb
index 98c6064ac..3868d5ce7 100644
--- a/app/models/form/lettings/questions/leftreg.rb
+++ b/app/models/form/lettings/questions/leftreg.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Leftreg < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 67
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -18,4 +18,6 @@ class Form::Lettings::Questions::Leftreg < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Person prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 67, 2024 => 66 }.freeze
end
diff --git a/app/models/form/lettings/questions/letting_allocation.rb b/app/models/form/lettings/questions/letting_allocation.rb
index 09fd82121..c9742e97f 100644
--- a/app/models/form/lettings/questions/letting_allocation.rb
+++ b/app/models/form/lettings/questions/letting_allocation.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
@type = "checkbox"
@check_answers_card_number = 0
@hint_text = "Select all that apply."
- @question_number = 84
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -30,4 +30,6 @@ class Form::Lettings::Questions::LettingAllocation < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 84, 2024 => 83 }.freeze
end
diff --git a/app/models/form/lettings/questions/location_id.rb b/app/models/form/lettings/questions/location_id.rb
index 62ee0d218..cbc9b840a 100644
--- a/app/models/form/lettings/questions/location_id.rb
+++ b/app/models/form/lettings/questions/location_id.rb
@@ -11,7 +11,7 @@ class Form::Lettings::Questions::LocationId < ::Form::Question
"needstype": 2,
},
}
- @question_number = 10
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
@top_guidance_partial = "finding_location"
end
@@ -58,4 +58,6 @@ private
"Which location is this log for?"
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 10, 2024 => 5 }.freeze
end
diff --git a/app/models/form/lettings/questions/majorrepairs.rb b/app/models/form/lettings/questions/majorrepairs.rb
index 83acf76a6..d2d94224e 100644
--- a/app/models/form/lettings/questions/majorrepairs.rb
+++ b/app/models/form/lettings/questions/majorrepairs.rb
@@ -9,8 +9,10 @@ class Form::Lettings::Questions::Majorrepairs < ::Form::Question
@hint_text = "Major repairs are works that could not be reasonably carried out with a tenant living at the property. For example, structural repairs."
@answer_options = ANSWER_OPTIONS
@conditional_for = { "mrcdate" => [1] }
- @question_number = 24
+ @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" => "Yes" }, "0" => { "value" => "No" } }.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 24 }.freeze
end
diff --git a/app/models/form/lettings/questions/managing_organisation.rb b/app/models/form/lettings/questions/managing_organisation.rb
index 55a38ee71..c9ab1247a 100644
--- a/app/models/form/lettings/questions/managing_organisation.rb
+++ b/app/models/form/lettings/questions/managing_organisation.rb
@@ -5,7 +5,7 @@ class Form::Lettings::Questions::ManagingOrganisation < ::Form::Question
@check_answer_label = "Managing agent"
@header = "Which organisation manages this letting?"
@type = "select"
- @question_number = 2
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
def answer_options(log = nil, user = nil)
@@ -83,4 +83,6 @@ private
def selected_answer_option_is_derived?(_log)
true
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 2 }.freeze
end
diff --git a/app/models/form/lettings/questions/mrcdate.rb b/app/models/form/lettings/questions/mrcdate.rb
index 09176dca6..8bbd8223b 100644
--- a/app/models/form/lettings/questions/mrcdate.rb
+++ b/app/models/form/lettings/questions/mrcdate.rb
@@ -6,6 +6,8 @@ class Form::Lettings::Questions::Mrcdate < ::Form::Question
@header = "When were the repairs completed?"
@type = "date"
@check_answers_card_number = 0
- @question_number = 24
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 24 }.freeze
end
diff --git a/app/models/form/lettings/questions/nationality.rb b/app/models/form/lettings/questions/nationality.rb
index c86f93b09..51cbec936 100644
--- a/app/models/form/lettings/questions/nationality.rb
+++ b/app/models/form/lettings/questions/nationality.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Nationality < ::Form::Question
@check_answers_card_number = 1
@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."
@answer_options = ANSWER_OPTIONS
- @question_number = 36
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -21,4 +21,6 @@ class Form::Lettings::Questions::Nationality < ::Form::Question
"divider" => true,
"13" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 36, 2024 => 35 }.freeze
end
diff --git a/app/models/form/lettings/questions/nationality_all.rb b/app/models/form/lettings/questions/nationality_all.rb
index 354622f2f..8d59a37fb 100644
--- a/app/models/form/lettings/questions/nationality_all.rb
+++ b/app/models/form/lettings/questions/nationality_all.rb
@@ -7,10 +7,12 @@ class Form::Lettings::Questions::NationalityAll < ::Form::Question
@type = "select"
@check_answers_card_number = 1
@answer_options = GlobalConstants::COUNTRIES_ANSWER_OPTIONS
- @question_number = 36
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_label(log, _current_user = nil)
answer_options[log.nationality_all.to_s]["name"]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 36, 2024 => 35 }.freeze
end
diff --git a/app/models/form/lettings/questions/nationality_all_group.rb b/app/models/form/lettings/questions/nationality_all_group.rb
index 49b000a16..a1d6cd843 100644
--- a/app/models/form/lettings/questions/nationality_all_group.rb
+++ b/app/models/form/lettings/questions/nationality_all_group.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::NationalityAllGroup < ::Form::Question
@check_answers_card_number = 1
@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. If the lead tenant is a dual national of the United Kingdom and another country, enter United Kingdom. If they are a dual national of two other countries, the tenant should decide which country to enter."
@answer_options = ANSWER_OPTIONS
- @question_number = 36
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@conditional_for = { "nationality_all" => [12] }
@hidden_in_check_answers = { "depends_on" => [{ "nationality_all_group" => 12 }] }
end
@@ -18,4 +18,6 @@ class Form::Lettings::Questions::NationalityAllGroup < ::Form::Question
"12" => { "value" => "Other" },
"0" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 36, 2024 => 35 }.freeze
end
diff --git a/app/models/form/lettings/questions/needs_type.rb b/app/models/form/lettings/questions/needs_type.rb
index eaa13cb9d..158626843 100644
--- a/app/models/form/lettings/questions/needs_type.rb
+++ b/app/models/form/lettings/questions/needs_type.rb
@@ -7,11 +7,13 @@ class Form::Lettings::Questions::NeedsType < ::Form::Question
@hint_text = "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
@type = "radio"
@answer_options = ANSWER_OPTIONS
- @question_number = 3
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
ANSWER_OPTIONS = {
"1" => { "value" => "General needs" },
"2" => { "value" => "Supported housing" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 3 }.freeze
end
diff --git a/app/models/form/lettings/questions/net_income_known.rb b/app/models/form/lettings/questions/net_income_known.rb
index d3008f44f..5858d4d26 100644
--- a/app/models/form/lettings/questions/net_income_known.rb
+++ b/app/models/form/lettings/questions/net_income_known.rb
@@ -9,7 +9,7 @@ class Form::Lettings::Questions::NetIncomeKnown < ::Form::Question
@top_guidance_partial = "what_counts_as_income"
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 86
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -18,4 +18,6 @@ class Form::Lettings::Questions::NetIncomeKnown < ::Form::Question
"divider_a" => { "value" => true },
"2" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 86, 2024 => 85 }.freeze
end
diff --git a/app/models/form/lettings/questions/offered.rb b/app/models/form/lettings/questions/offered.rb
index e41def301..6d98f405c 100644
--- a/app/models/form/lettings/questions/offered.rb
+++ b/app/models/form/lettings/questions/offered.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::Offered < ::Form::Question
@min = 0
@hint_text = I18n.t("hints.offered")
@step = 1
- @question_number = 18
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 18 }.freeze
end
diff --git a/app/models/form/lettings/questions/period.rb b/app/models/form/lettings/questions/period.rb
index c9fa80263..3155207b8 100644
--- a/app/models/form/lettings/questions/period.rb
+++ b/app/models/form/lettings/questions/period.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Period < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select how often the household is charged. This may be different to how often they pay."
@answer_options = ANSWER_OPTIONS
- @question_number = 92
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -23,4 +23,6 @@ class Form::Lettings::Questions::Period < ::Form::Question
"1" => { "value" => "Weekly for 52 weeks" },
"10" => { "value" => "Weekly for 53 weeks" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 92, 2024 => 91 }.freeze
end
diff --git a/app/models/form/lettings/questions/person_gender_identity.rb b/app/models/form/lettings/questions/person_gender_identity.rb
index 657438071..21244938d 100644
--- a/app/models/form/lettings/questions/person_gender_identity.rb
+++ b/app/models/form/lettings/questions/person_gender_identity.rb
@@ -7,7 +7,8 @@ class Form::Lettings::Questions::PersonGenderIdentity < ::Form::Question
@type = "radio"
@check_answers_card_number = person_index
@answer_options = ANSWER_OPTIONS
- @question_number = 32 + (4 * person_index)
+ @person_index = person_index
+ @question_number = question_number
end
ANSWER_OPTIONS = {
@@ -25,4 +26,15 @@ class Form::Lettings::Questions::PersonGenderIdentity < ::Form::Question
""
end
end
+
+ def question_number
+ base_question_number = case form.start_date.year
+ when 2023
+ 32
+ else
+ 31
+ end
+
+ base_question_number + (4 * @person_index)
+ end
end
diff --git a/app/models/form/lettings/questions/person_relationship.rb b/app/models/form/lettings/questions/person_relationship.rb
index 0d54db949..118211c9d 100644
--- a/app/models/form/lettings/questions/person_relationship.rb
+++ b/app/models/form/lettings/questions/person_relationship.rb
@@ -8,7 +8,8 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
@check_answers_card_number = person_index
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 30 + (4 * person_index)
+ @person_index = person_index
+ @question_number = question_number
end
ANSWER_OPTIONS = {
@@ -21,4 +22,15 @@ class Form::Lettings::Questions::PersonRelationship < ::Form::Question
"divider" => { "value" => true },
"R" => { "value" => "Person prefers not to say" },
}.freeze
+
+ def question_number
+ base_question_number = case form.start_date.year
+ when 2023
+ 30
+ else
+ 29
+ end
+
+ base_question_number + (4 * @person_index)
+ end
end
diff --git a/app/models/form/lettings/questions/person_working_situation.rb b/app/models/form/lettings/questions/person_working_situation.rb
index dce08af4f..8541d096a 100644
--- a/app/models/form/lettings/questions/person_working_situation.rb
+++ b/app/models/form/lettings/questions/person_working_situation.rb
@@ -8,7 +8,8 @@ class Form::Lettings::Questions::PersonWorkingSituation < ::Form::Question
@check_answers_card_number = person_index
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 33 + (4 * person_index)
+ @person_index = person_index
+ @question_number = question_number
end
ANSWER_OPTIONS = {
@@ -31,4 +32,15 @@ class Form::Lettings::Questions::PersonWorkingSituation < ::Form::Question
"divider" => { "value" => true },
"10" => { "value" => "Person prefers not to say" },
}.freeze
+
+ def question_number
+ base_question_number = case form.start_date.year
+ when 2023
+ 33
+ else
+ 32
+ end
+
+ base_question_number + (4 * @person_index)
+ end
end
diff --git a/app/models/form/lettings/questions/postcode_for_full_address.rb b/app/models/form/lettings/questions/postcode_for_full_address.rb
index 8f7de5f52..ef93b003d 100644
--- a/app/models/form/lettings/questions/postcode_for_full_address.rb
+++ b/app/models/form/lettings/questions/postcode_for_full_address.rb
@@ -19,7 +19,9 @@ class Form::Lettings::Questions::PostcodeForFullAddress < ::Form::Question
@plain_label = true
@check_answer_label = "Postcode"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
- @question_number = 12
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end
diff --git a/app/models/form/lettings/questions/ppcodenk.rb b/app/models/form/lettings/questions/ppcodenk.rb
index 88ca5277f..4af3b17f0 100644
--- a/app/models/form/lettings/questions/ppcodenk.rb
+++ b/app/models/form/lettings/questions/ppcodenk.rb
@@ -10,7 +10,7 @@ class Form::Lettings::Questions::Ppcodenk < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "ppostcode_full" => [0] }
@hidden_in_check_answers = { "depends_on" => [{ "ppcodenk" => 0 }, { "ppcodenk" => 1 }] }
- @question_number = 80
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
@@ -18,4 +18,6 @@ class Form::Lettings::Questions::Ppcodenk < ::Form::Question
"0" => { "value" => "Yes" },
"1" => { "value" => "No" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 80, 2024 => 79 }.freeze
end
diff --git a/app/models/form/lettings/questions/ppostcode_full.rb b/app/models/form/lettings/questions/ppostcode_full.rb
index edcbaf30a..ed0439805 100644
--- a/app/models/form/lettings/questions/ppostcode_full.rb
+++ b/app/models/form/lettings/questions/ppostcode_full.rb
@@ -15,7 +15,9 @@ class Form::Lettings::Questions::PpostcodeFull < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@inferred_answers = { "prevloc" => { "is_previous_la_inferred" => true } }
- @question_number = 80
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 80, 2024 => 79 }.freeze
end
diff --git a/app/models/form/lettings/questions/preg_occ.rb b/app/models/form/lettings/questions/preg_occ.rb
index 8a863a870..a733fc806 100644
--- a/app/models/form/lettings/questions/preg_occ.rb
+++ b/app/models/form/lettings/questions/preg_occ.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::PregOcc < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 69
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::PregOcc < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 69, 2024 => 68 }.freeze
end
diff --git a/app/models/form/lettings/questions/previous_la_known.rb b/app/models/form/lettings/questions/previous_la_known.rb
index acf0da53c..d99c1e057 100644
--- a/app/models/form/lettings/questions/previous_la_known.rb
+++ b/app/models/form/lettings/questions/previous_la_known.rb
@@ -10,9 +10,11 @@ class Form::Lettings::Questions::PreviousLaKnown < ::Form::Question
@answer_options = ANSWER_OPTIONS
@conditional_for = { "prevloc" => [1] }
@hidden_in_check_answers = { "depends_on" => [{ "previous_la_known" => 0 }, { "previous_la_known" => 1 }] }
- @question_number = 81
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 81, 2024 => 80 }.freeze
end
diff --git a/app/models/form/lettings/questions/previous_let_type.rb b/app/models/form/lettings/questions/previous_let_type.rb
index 6ce55da42..d9c018820 100644
--- a/app/models/form/lettings/questions/previous_let_type.rb
+++ b/app/models/form/lettings/questions/previous_let_type.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is the rent type of the previous tenancy in this property." : ""
@answer_options = form.start_year_after_2024? ? ANSWER_OPTIONS_AFTER_2024 : ANSWER_OPTIONS
- @question_number = 16
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -32,4 +32,6 @@ class Form::Lettings::Questions::PreviousLetType < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 16, 2024 => 17 }.freeze
end
diff --git a/app/models/form/lettings/questions/previous_tenure.rb b/app/models/form/lettings/questions/previous_tenure.rb
index ca5b8d832..d262f4fda 100644
--- a/app/models/form/lettings/questions/previous_tenure.rb
+++ b/app/models/form/lettings/questions/previous_tenure.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
@check_answers_card_number = 0
@hint_text = "This is where the household was the night before they moved."
@answer_options = ANSWER_OPTIONS
- @question_number = 78
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -39,4 +39,6 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
"4" => { "value" => "Tied housing or rented with job" },
"25" => { "value" => "Any other accommodation" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 78, 2024 => 77 }.freeze
end
diff --git a/app/models/form/lettings/questions/previous_tenure_renewal.rb b/app/models/form/lettings/questions/previous_tenure_renewal.rb
index 56be9a95d..572de3fd4 100644
--- a/app/models/form/lettings/questions/previous_tenure_renewal.rb
+++ b/app/models/form/lettings/questions/previous_tenure_renewal.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 78
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::PreviousTenureRenewal < ::Form::Question
"35" => { "value" => "Extra care housing" },
"6" => { "value" => "Other supported housing" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 78, 2024 => 77 }.freeze
end
diff --git a/app/models/form/lettings/questions/prevloc.rb b/app/models/form/lettings/questions/prevloc.rb
index e0082602e..7f9c0db8b 100644
--- a/app/models/form/lettings/questions/prevloc.rb
+++ b/app/models/form/lettings/questions/prevloc.rb
@@ -8,11 +8,13 @@ class Form::Lettings::Questions::Prevloc < ::Form::Question
@inferred_check_answers_value = [{ "condition" => { "previous_la_known" => 0 }, "value" => "Not known" }]
@check_answers_card_number = 0
@hint_text = "Select ‘Northern Ireland’, ‘Scotland’, ‘Wales’ or ‘Outside the UK’ if the household’s last settled home was outside England."
- @question_number = 81
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
end
def answer_options
{ "" => "Select an option" }.merge(LocalAuthority.active(form.start_date).map { |la| [la.code, la.name] }.to_h)
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 81, 2024 => 80 }.freeze
end
diff --git a/app/models/form/lettings/questions/property_reference.rb b/app/models/form/lettings/questions/property_reference.rb
index f93a57cee..f7d80829c 100644
--- a/app/models/form/lettings/questions/property_reference.rb
+++ b/app/models/form/lettings/questions/property_reference.rb
@@ -7,6 +7,8 @@ class Form::Lettings::Questions::PropertyReference < ::Form::Question
@hint_text = "This is how you usually refer to this property on your own systems."
@type = "text"
@width = 10
- @question_number = 8
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 8, 2024 => 10 }.freeze
end
diff --git a/app/models/form/lettings/questions/pscharge_4_weekly.rb b/app/models/form/lettings/questions/pscharge_4_weekly.rb
index cb716abd2..0340e55b8 100644
--- a/app/models/form/lettings/questions/pscharge_4_weekly.rb
+++ b/app/models/form/lettings/questions/pscharge_4_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::Pscharge4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
- @question_number = 97
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end
diff --git a/app/models/form/lettings/questions/pscharge_bi_weekly.rb b/app/models/form/lettings/questions/pscharge_bi_weekly.rb
index bd3524b10..db4e040f0 100644
--- a/app/models/form/lettings/questions/pscharge_bi_weekly.rb
+++ b/app/models/form/lettings/questions/pscharge_bi_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::PschargeBiWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 2 weeks"
- @question_number = 97
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end
diff --git a/app/models/form/lettings/questions/pscharge_monthly.rb b/app/models/form/lettings/questions/pscharge_monthly.rb
index bae5bd459..e96cd32d4 100644
--- a/app/models/form/lettings/questions/pscharge_monthly.rb
+++ b/app/models/form/lettings/questions/pscharge_monthly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::PschargeMonthly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every month"
- @question_number = 97
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end
diff --git a/app/models/form/lettings/questions/pscharge_weekly.rb b/app/models/form/lettings/questions/pscharge_weekly.rb
index 1b24e9a10..6b5fa9889 100644
--- a/app/models/form/lettings/questions/pscharge_weekly.rb
+++ b/app/models/form/lettings/questions/pscharge_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::PschargeWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every week"
- @question_number = 97
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 97, 2024 => 96 }.freeze
end
diff --git a/app/models/form/lettings/questions/reason.rb b/app/models/form/lettings/questions/reason.rb
index a60cc3b3f..1a7d0a167 100644
--- a/app/models/form/lettings/questions/reason.rb
+++ b/app/models/form/lettings/questions/reason.rb
@@ -12,7 +12,7 @@ class Form::Lettings::Questions::Reason < ::Form::Question
20,
],
}
- @question_number = 77
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -92,4 +92,6 @@ class Form::Lettings::Questions::Reason < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76 }.freeze
end
diff --git a/app/models/form/lettings/questions/reason_renewal.rb b/app/models/form/lettings/questions/reason_renewal.rb
index e62041780..b3e9fc9dc 100644
--- a/app/models/form/lettings/questions/reason_renewal.rb
+++ b/app/models/form/lettings/questions/reason_renewal.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = "You told us this letting is a renewal. We have removed some options because of this."
- @question_number = 77
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@conditional_for = {
"reasonother" => [
20,
@@ -38,4 +38,6 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76 }.freeze
end
diff --git a/app/models/form/lettings/questions/reasonable_preference_reason.rb b/app/models/form/lettings/questions/reasonable_preference_reason.rb
index 631949685..235cf6342 100644
--- a/app/models/form/lettings/questions/reasonable_preference_reason.rb
+++ b/app/models/form/lettings/questions/reasonable_preference_reason.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReasonablePreferenceReason < ::Form::Question
@check_answers_card_number = 0
@hint_text = "Select all that apply."
@answer_options = ANSWER_OPTIONS
- @question_number = 83
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -19,4 +19,6 @@ class Form::Lettings::Questions::ReasonablePreferenceReason < ::Form::Question
"divider" => { "value" => true },
"rp_dontknow" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 83, 2024 => 82 }.freeze
end
diff --git a/app/models/form/lettings/questions/reasonother.rb b/app/models/form/lettings/questions/reasonother.rb
index e045c9aa3..37bfd8c7b 100644
--- a/app/models/form/lettings/questions/reasonother.rb
+++ b/app/models/form/lettings/questions/reasonother.rb
@@ -7,6 +7,8 @@ class Form::Lettings::Questions::Reasonother < ::Form::Question
@type = "text"
@check_answers_card_number = 0
@hint_text = ""
- @question_number = 77
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 77, 2024 => 76 }.freeze
end
diff --git a/app/models/form/lettings/questions/reasonpref.rb b/app/models/form/lettings/questions/reasonpref.rb
index 2493033bd..522576ec6 100644
--- a/app/models/form/lettings/questions/reasonpref.rb
+++ b/app/models/form/lettings/questions/reasonpref.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Reasonpref < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "Households may be given ‘reasonable preference’ for social housing under one or more specific categories by the local authority. This is also known as ‘priority need’." : "Households may be given ‘reasonable preference’ for social housing, also known as ‘priority need’, by the local authority."
@answer_options = ANSWER_OPTIONS
- @question_number = 82
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::Reasonpref < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Don’t know" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 82, 2024 => 81 }.freeze
end
diff --git a/app/models/form/lettings/questions/referral.rb b/app/models/form/lettings/questions/referral.rb
index 7f0fb3c41..5bf45a187 100644
--- a/app/models/form/lettings/questions/referral.rb
+++ b/app/models/form/lettings/questions/referral.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Referral < ::Form::Question
@check_answers_card_number = 0
@hint_text = "You told us that you are a local authority and that the needs type is general needs. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS
- @question_number = 85
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -50,4 +50,6 @@ class Form::Lettings::Questions::Referral < ::Form::Question
"value" => "Other",
},
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end
diff --git a/app/models/form/lettings/questions/referral_prp.rb b/app/models/form/lettings/questions/referral_prp.rb
index a1ec41fd5..ee676e81e 100644
--- a/app/models/form/lettings/questions/referral_prp.rb
+++ b/app/models/form/lettings/questions/referral_prp.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
@check_answers_card_number = 0
@hint_text = "You told us that the needs type is general needs. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS
- @question_number = 85
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -56,4 +56,6 @@ class Form::Lettings::Questions::ReferralPrp < ::Form::Question
"value" => "Other",
},
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end
diff --git a/app/models/form/lettings/questions/referral_supported_housing.rb b/app/models/form/lettings/questions/referral_supported_housing.rb
index b6b6b1567..a4d0403d6 100644
--- a/app/models/form/lettings/questions/referral_supported_housing.rb
+++ b/app/models/form/lettings/questions/referral_supported_housing.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
@check_answers_card_number = 0
@hint_text = "You told us that you are a local authority. We have removed some options because of this."
@answer_options = ANSWER_OPTIONS
- @question_number = 85
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -53,4 +53,6 @@ class Form::Lettings::Questions::ReferralSupportedHousing < ::Form::Question
"value" => "Other",
},
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end
diff --git a/app/models/form/lettings/questions/referral_supported_housing_prp.rb b/app/models/form/lettings/questions/referral_supported_housing_prp.rb
index 207eb0e8a..b7b937fa3 100644
--- a/app/models/form/lettings/questions/referral_supported_housing_prp.rb
+++ b/app/models/form/lettings/questions/referral_supported_housing_prp.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 85
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -27,4 +27,6 @@ class Form::Lettings::Questions::ReferralSupportedHousingPrp < ::Form::Question
"17" => { "value" => "Children’s Social Care" },
"16" => { "value" => "Other" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 84 }.freeze
end
diff --git a/app/models/form/lettings/questions/renewal.rb b/app/models/form/lettings/questions/renewal.rb
index 1320a0f45..2a32d1f16 100644
--- a/app/models/form/lettings/questions/renewal.rb
+++ b/app/models/form/lettings/questions/renewal.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::Renewal < ::Form::Question
@type = "radio"
@answer_options = ANSWER_OPTIONS
@hint_text = hint_text
- @question_number = 4
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
ANSWER_OPTIONS = {
@@ -31,4 +31,6 @@ class Form::Lettings::Questions::Renewal < ::Form::Question
"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'"
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 4, 2024 => 6 }.freeze
end
diff --git a/app/models/form/lettings/questions/rent_type.rb b/app/models/form/lettings/questions/rent_type.rb
index 4ff1a0d32..35e63dd35 100644
--- a/app/models/form/lettings/questions/rent_type.rb
+++ b/app/models/form/lettings/questions/rent_type.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::RentType < ::Form::Question
@top_guidance_partial = "rent_type_definitions"
@answer_options = ANSWER_OPTIONS
@conditional_for = { "irproduct_other" => [5] }
- @question_number = 6
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
ANSWER_OPTIONS = {
@@ -19,4 +19,6 @@ class Form::Lettings::Questions::RentType < ::Form::Question
"0" => { "value" => "Social Rent" },
"5" => { "value" => "Other intermediate rent product" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 6, 2024 => 8 }.freeze
end
diff --git a/app/models/form/lettings/questions/reservist.rb b/app/models/form/lettings/questions/reservist.rb
index 44eb8219d..d411f96e7 100644
--- a/app/models/form/lettings/questions/reservist.rb
+++ b/app/models/form/lettings/questions/reservist.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::Reservist < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 68
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -17,4 +17,6 @@ class Form::Lettings::Questions::Reservist < ::Form::Question
"divider" => { "value" => true },
"3" => { "value" => "Person prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 68, 2024 => 67 }.freeze
end
diff --git a/app/models/form/lettings/questions/rsnvac.rb b/app/models/form/lettings/questions/rsnvac.rb
index d443d039d..303f2ea48 100644
--- a/app/models/form/lettings/questions/rsnvac.rb
+++ b/app/models/form/lettings/questions/rsnvac.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
- @question_number = 17
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -101,4 +101,6 @@ class Form::Lettings::Questions::Rsnvac < ::Form::Question
}
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 17, 2024 => 18 }.freeze
end
diff --git a/app/models/form/lettings/questions/rsnvac_first_let.rb b/app/models/form/lettings/questions/rsnvac_first_let.rb
index df66b57cd..f03c64995 100644
--- a/app/models/form/lettings/questions/rsnvac_first_let.rb
+++ b/app/models/form/lettings/questions/rsnvac_first_let.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 15
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -16,4 +16,6 @@ class Form::Lettings::Questions::RsnvacFirstLet < ::Form::Question
"17" => { "value" => "First let of leased property" },
"15" => { "value" => "First let of new-build property" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 15, 2024 => 16 }.freeze
end
diff --git a/app/models/form/lettings/questions/scharge_4_weekly.rb b/app/models/form/lettings/questions/scharge_4_weekly.rb
index b13c8339b..a2f81c6ef 100644
--- a/app/models/form/lettings/questions/scharge_4_weekly.rb
+++ b/app/models/form/lettings/questions/scharge_4_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::Scharge4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
- @question_number = 96
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end
diff --git a/app/models/form/lettings/questions/scharge_bi_weekly.rb b/app/models/form/lettings/questions/scharge_bi_weekly.rb
index 679662e64..a19acbab5 100644
--- a/app/models/form/lettings/questions/scharge_bi_weekly.rb
+++ b/app/models/form/lettings/questions/scharge_bi_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::SchargeBiWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 2 weeks"
- @question_number = 96
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end
diff --git a/app/models/form/lettings/questions/scharge_monthly.rb b/app/models/form/lettings/questions/scharge_monthly.rb
index 74f35578c..eb399b0de 100644
--- a/app/models/form/lettings/questions/scharge_monthly.rb
+++ b/app/models/form/lettings/questions/scharge_monthly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::SchargeMonthly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every month"
- @question_number = 96
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end
diff --git a/app/models/form/lettings/questions/scharge_weekly.rb b/app/models/form/lettings/questions/scharge_weekly.rb
index c8788b7bd..faf854b82 100644
--- a/app/models/form/lettings/questions/scharge_weekly.rb
+++ b/app/models/form/lettings/questions/scharge_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::SchargeWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every week"
- @question_number = 96
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 96, 2024 => 95 }.freeze
end
diff --git a/app/models/form/lettings/questions/scheme_id.rb b/app/models/form/lettings/questions/scheme_id.rb
index 8d906f134..cc849bab9 100644
--- a/app/models/form/lettings/questions/scheme_id.rb
+++ b/app/models/form/lettings/questions/scheme_id.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::SchemeId < ::Form::Question
@answer_options = answer_options
@top_guidance_partial = "finding_scheme"
@bottom_guidance_partial = "scheme_selection"
- @question_number = 9
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
@inferred_answers = {
"location.name": {
"scheme_has_multiple_locations?": false,
@@ -58,4 +58,6 @@ private
def selected_answer_option_is_derived?(_lettings_log)
false
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 9, 2024 => 4 }.freeze
end
diff --git a/app/models/form/lettings/questions/sheltered.rb b/app/models/form/lettings/questions/sheltered.rb
index b8379469c..7b78a9b30 100644
--- a/app/models/form/lettings/questions/sheltered.rb
+++ b/app/models/form/lettings/questions/sheltered.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::Sheltered < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = "Sheltered housing and special retirement housing are for tenants with low-level care and support needs. This typically provides some limited support to enable independent living, such as alarm-based assistance or a scheme manager.Extra care housing is for tenants with medium to high care and support needs, often with 24 hour access to support staff provided by an agency registered with the Care Quality Commission."
- @question_number = 29
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -28,4 +28,6 @@ class Form::Lettings::Questions::Sheltered < ::Form::Question
"4" => { "value" => "Don’t know" } }
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 29 }.freeze
end
diff --git a/app/models/form/lettings/questions/starter_tenancy_type.rb b/app/models/form/lettings/questions/starter_tenancy_type.rb
index db67bbb7f..9157c8e18 100644
--- a/app/models/form/lettings/questions/starter_tenancy_type.rb
+++ b/app/models/form/lettings/questions/starter_tenancy_type.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "" : "This is also known as an ‘introductory period’."
@conditional_for = { "tenancyother" => [3] }
- @question_number = 27
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -66,4 +66,6 @@ class Form::Lettings::Questions::StarterTenancyType < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 27 }.freeze
end
diff --git a/app/models/form/lettings/questions/startertenancy.rb b/app/models/form/lettings/questions/startertenancy.rb
index 6a8eb7a27..0e461a25e 100644
--- a/app/models/form/lettings/questions/startertenancy.rb
+++ b/app/models/form/lettings/questions/startertenancy.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::Startertenancy < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@answer_options = ANSWER_OPTIONS
- @question_number = 26
+ @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" => "Yes" }, "2" => { "value" => "No" } }.freeze
@@ -20,4 +20,6 @@ class Form::Lettings::Questions::Startertenancy < ::Form::Question
"This is also known as an ‘introductory period’."
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 26 }.freeze
end
diff --git a/app/models/form/lettings/questions/stock_owner.rb b/app/models/form/lettings/questions/stock_owner.rb
index 6b5e77c6d..758427fc9 100644
--- a/app/models/form/lettings/questions/stock_owner.rb
+++ b/app/models/form/lettings/questions/stock_owner.rb
@@ -5,7 +5,7 @@ class Form::Lettings::Questions::StockOwner < ::Form::Question
@check_answer_label = "Stock owner"
@header = "Which organisation owns this property?"
@type = "select"
- @question_number = 1
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
def answer_options(log = nil, user = nil)
@@ -89,4 +89,6 @@ private
def merged_organisation_label(name, merge_date)
"#{name} (inactive as of #{merge_date.to_fs(:govuk_date)})"
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 1 }.freeze
end
diff --git a/app/models/form/lettings/questions/supcharg_4_weekly.rb b/app/models/form/lettings/questions/supcharg_4_weekly.rb
index 1ca7da652..292578d56 100644
--- a/app/models/form/lettings/questions/supcharg_4_weekly.rb
+++ b/app/models/form/lettings/questions/supcharg_4_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::Supcharg4Weekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 4 weeks"
- @question_number = 98
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 98, 2024 => 97 }.freeze
end
diff --git a/app/models/form/lettings/questions/supcharg_bi_weekly.rb b/app/models/form/lettings/questions/supcharg_bi_weekly.rb
index 07150f6f0..4f6daf141 100644
--- a/app/models/form/lettings/questions/supcharg_bi_weekly.rb
+++ b/app/models/form/lettings/questions/supcharg_bi_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::SupchargBiWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every 2 weeks"
- @question_number = 98
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 98, 2024 => 97 }.freeze
end
diff --git a/app/models/form/lettings/questions/supcharg_monthly.rb b/app/models/form/lettings/questions/supcharg_monthly.rb
index 224ddc31c..9dd1c669b 100644
--- a/app/models/form/lettings/questions/supcharg_monthly.rb
+++ b/app/models/form/lettings/questions/supcharg_monthly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::SupchargMonthly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every month"
- @question_number = 98
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 98, 2024 => 97 }.freeze
end
diff --git a/app/models/form/lettings/questions/supcharg_weekly.rb b/app/models/form/lettings/questions/supcharg_weekly.rb
index 4e0c99057..54a9743b6 100644
--- a/app/models/form/lettings/questions/supcharg_weekly.rb
+++ b/app/models/form/lettings/questions/supcharg_weekly.rb
@@ -14,6 +14,8 @@ class Form::Lettings::Questions::SupchargWeekly < ::Form::Question
@result_field = "tcharge"
@prefix = "£"
@suffix = " every week"
- @question_number = 98
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 98, 2024 => 97 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenancy_length.rb b/app/models/form/lettings/questions/tenancy_length.rb
index 7dd572560..b94d41af5 100644
--- a/app/models/form/lettings/questions/tenancy_length.rb
+++ b/app/models/form/lettings/questions/tenancy_length.rb
@@ -11,6 +11,8 @@ class Form::Lettings::Questions::TenancyLength < ::Form::Question
@min = 0
@hint_text = "Do not include the starter or introductory period."
@step = 1
- @question_number = 28
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 28 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenancy_length_affordable_rent.rb b/app/models/form/lettings/questions/tenancy_length_affordable_rent.rb
index 739e5e606..bea745ae1 100644
--- a/app/models/form/lettings/questions/tenancy_length_affordable_rent.rb
+++ b/app/models/form/lettings/questions/tenancy_length_affordable_rent.rb
@@ -10,7 +10,7 @@ class Form::Lettings::Questions::TenancyLengthAffordableRent < ::Form::Question
@max = 150
@min = 0
@step = 1
- @question_number = 28
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def hint_text
@@ -20,4 +20,6 @@ class Form::Lettings::Questions::TenancyLengthAffordableRent < ::Form::Question
"Do not include the starter or introductory period.The minimum period is 2 years for social or affordable rent general needs logs and you do not need a log for shorter tenancies."
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 28 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenancy_length_intermediate_rent.rb b/app/models/form/lettings/questions/tenancy_length_intermediate_rent.rb
index 829fa1244..835efd429 100644
--- a/app/models/form/lettings/questions/tenancy_length_intermediate_rent.rb
+++ b/app/models/form/lettings/questions/tenancy_length_intermediate_rent.rb
@@ -10,7 +10,7 @@ class Form::Lettings::Questions::TenancyLengthIntermediateRent < ::Form::Questio
@max = 150
@min = 0
@step = 1
- @question_number = 28
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def hint_text
@@ -20,4 +20,6 @@ class Form::Lettings::Questions::TenancyLengthIntermediateRent < ::Form::Questio
"Do not include the starter or introductory period.The minimum period is 1 year for intermediate rent general needs logs and you do not need a log for shorter tenancies."
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 28 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenancy_length_periodic.rb b/app/models/form/lettings/questions/tenancy_length_periodic.rb
index 4c0d9a51d..113435dd6 100644
--- a/app/models/form/lettings/questions/tenancy_length_periodic.rb
+++ b/app/models/form/lettings/questions/tenancy_length_periodic.rb
@@ -10,7 +10,9 @@ class Form::Lettings::Questions::TenancyLengthPeriodic < ::Form::Question
@max = 150
@min = 0
@step = 1
- @question_number = 28
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hint_text = "As this is a periodic tenancy, this question is optional. If you do not have the information available click save and continue"
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 28 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenancy_other.rb b/app/models/form/lettings/questions/tenancy_other.rb
index c19b03703..21e932250 100644
--- a/app/models/form/lettings/questions/tenancy_other.rb
+++ b/app/models/form/lettings/questions/tenancy_other.rb
@@ -7,6 +7,8 @@ class Form::Lettings::Questions::TenancyOther < ::Form::Question
@type = "text"
@check_answers_card_number = 0
@hint_text = ""
- @question_number = 27
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 27 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenancy_start_date.rb b/app/models/form/lettings/questions/tenancy_start_date.rb
index fd9d63cec..c7dc73627 100644
--- a/app/models/form/lettings/questions/tenancy_start_date.rb
+++ b/app/models/form/lettings/questions/tenancy_start_date.rb
@@ -6,6 +6,8 @@ class Form::Lettings::Questions::TenancyStartDate < ::Form::Question
@header = "What is the tenancy start date?"
@type = "date"
@unresolved_hint_text = "Some scheme details have changed, and now this log needs updating. Check that the tenancy start date is correct."
- @question_number = 5
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 5, 2024 => 7 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenancy_type.rb b/app/models/form/lettings/questions/tenancy_type.rb
index 6a7642123..b4ed6aca4 100644
--- a/app/models/form/lettings/questions/tenancy_type.rb
+++ b/app/models/form/lettings/questions/tenancy_type.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::TenancyType < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@conditional_for = { "tenancyother" => [3] }
- @question_number = 27
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -66,4 +66,6 @@ class Form::Lettings::Questions::TenancyType < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 27 }.freeze
end
diff --git a/app/models/form/lettings/questions/tenant_code.rb b/app/models/form/lettings/questions/tenant_code.rb
index f51d33c46..30b51525a 100644
--- a/app/models/form/lettings/questions/tenant_code.rb
+++ b/app/models/form/lettings/questions/tenant_code.rb
@@ -7,6 +7,8 @@ class Form::Lettings::Questions::TenantCode < ::Form::Question
@hint_text = "This is how you usually refer to this tenancy on your own systems."
@type = "text"
@width = 10
- @question_number = 7
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] if form.start_date.present?
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 7, 2024 => 9 }.freeze
end
diff --git a/app/models/form/lettings/questions/town_or_city.rb b/app/models/form/lettings/questions/town_or_city.rb
index 43aa48625..745810893 100644
--- a/app/models/form/lettings/questions/town_or_city.rb
+++ b/app/models/form/lettings/questions/town_or_city.rb
@@ -7,7 +7,9 @@ class Form::Lettings::Questions::TownOrCity < ::Form::Question
@plain_label = true
@check_answer_label = "Town or city"
@disable_clearing_if_not_routed_or_dynamic_answer_options = true
- @question_number = 12
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@hide_question_number_on_page = true
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 12, 2024 => 13 }.freeze
end
diff --git a/app/models/form/lettings/questions/tshortfall.rb b/app/models/form/lettings/questions/tshortfall.rb
index 69697ca44..75583008c 100644
--- a/app/models/form/lettings/questions/tshortfall.rb
+++ b/app/models/form/lettings/questions/tshortfall.rb
@@ -22,6 +22,8 @@ class Form::Lettings::Questions::Tshortfall < ::Form::Question
{ "label" => " every week for 52 weeks", "depends_on" => { "period" => 1 } },
{ "label" => " every week for 53 weeks", "depends_on" => { "period" => 10 } },
]
- @question_number = 100
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 100, 2024 => 99 }.freeze
end
diff --git a/app/models/form/lettings/questions/tshortfall_known.rb b/app/models/form/lettings/questions/tshortfall_known.rb
index 7082af4f3..600736077 100644
--- a/app/models/form/lettings/questions/tshortfall_known.rb
+++ b/app/models/form/lettings/questions/tshortfall_known.rb
@@ -9,8 +9,10 @@ class Form::Lettings::Questions::TshortfallKnown < ::Form::Question
@hint_text = "You only need to give an approximate figure."
@answer_options = ANSWER_OPTIONS
@conditional_for = { "tshortfall" => [0] }
- @question_number = 100
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 100, 2024 => 99 }.freeze
end
diff --git a/app/models/form/lettings/questions/unittype_gn.rb b/app/models/form/lettings/questions/unittype_gn.rb
index 01f38b0b9..501f25ee7 100644
--- a/app/models/form/lettings/questions/unittype_gn.rb
+++ b/app/models/form/lettings/questions/unittype_gn.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::UnittypeGn < ::Form::Question
@check_answers_card_number = 0
@hint_text = ""
@answer_options = ANSWER_OPTIONS
- @question_number = 19
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -21,4 +21,6 @@ class Form::Lettings::Questions::UnittypeGn < ::Form::Question
"9" => { "value" => "Shared house" },
"6" => { "value" => "Other" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 19 }.freeze
end
diff --git a/app/models/form/lettings/questions/uprn.rb b/app/models/form/lettings/questions/uprn.rb
index f33084a22..7c860e01b 100644
--- a/app/models/form/lettings/questions/uprn.rb
+++ b/app/models/form/lettings/questions/uprn.rb
@@ -6,7 +6,7 @@ class Form::Lettings::Questions::Uprn < ::Form::Question
@header = "What is the property's UPRN?"
@type = "text"
@width = 10
- @question_number = 11
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@inferred_check_answers_value = [
{
"condition" => { "uprn_known" => 0 },
@@ -35,4 +35,6 @@ class Form::Lettings::Questions::Uprn < ::Form::Question
"\n\n#{value.join("\n")}"
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 11, 2024 => 12 }.freeze
end
diff --git a/app/models/form/lettings/questions/uprn_known.rb b/app/models/form/lettings/questions/uprn_known.rb
index 93daa1934..a9840667c 100644
--- a/app/models/form/lettings/questions/uprn_known.rb
+++ b/app/models/form/lettings/questions/uprn_known.rb
@@ -22,6 +22,7 @@ class Form::Lettings::Questions::UprnKnown < ::Form::Question
{ "uprn_known" => 1 },
],
}
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -32,4 +33,6 @@ class Form::Lettings::Questions::UprnKnown < ::Form::Question
def unanswered_error_message
I18n.t("validations.property.uprn_known.invalid")
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 11, 2024 => 12 }.freeze
end
diff --git a/app/models/form/lettings/questions/voiddate.rb b/app/models/form/lettings/questions/voiddate.rb
index 38064bb3e..9d47fe1ea 100644
--- a/app/models/form/lettings/questions/voiddate.rb
+++ b/app/models/form/lettings/questions/voiddate.rb
@@ -6,7 +6,9 @@ class Form::Lettings::Questions::Voiddate < ::Form::Question
@header = "What is the void date?"
@type = "date"
@check_answers_card_number = 0
- @question_number = 23
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@top_guidance_partial = "void_date"
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 23 }.freeze
end
diff --git a/app/models/form/lettings/questions/waityear.rb b/app/models/form/lettings/questions/waityear.rb
index 7ca4938f9..94187e62b 100644
--- a/app/models/form/lettings/questions/waityear.rb
+++ b/app/models/form/lettings/questions/waityear.rb
@@ -7,7 +7,7 @@ class Form::Lettings::Questions::Waityear < ::Form::Question
@type = "radio"
@check_answers_card_number = 0
@hint_text = ""
- @question_number = 76
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
def answer_options
@@ -36,4 +36,6 @@ class Form::Lettings::Questions::Waityear < ::Form::Question
}.freeze
end
end
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 76, 2024 => 75 }.freeze
end
diff --git a/app/models/form/lettings/questions/wheelchair.rb b/app/models/form/lettings/questions/wheelchair.rb
index c2aaa3700..7d8dcfa25 100644
--- a/app/models/form/lettings/questions/wheelchair.rb
+++ b/app/models/form/lettings/questions/wheelchair.rb
@@ -8,11 +8,13 @@ class Form::Lettings::Questions::Wheelchair < ::Form::Question
@check_answers_card_number = 0
@hint_text = form.start_year_after_2024? ? "This is whether someone who uses a wheelchair is able to make full use of all of the property’s rooms and facilities, including use of both inside and outside space, and entering and exiting the property." : ""
@answer_options = ANSWER_OPTIONS
- @question_number = 21
+ @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" => "Yes" },
"2" => { "value" => "No" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 21 }.freeze
end
diff --git a/app/models/form/lettings/questions/working_situation1.rb b/app/models/form/lettings/questions/working_situation1.rb
index 4975b4125..cbd1b9a24 100644
--- a/app/models/form/lettings/questions/working_situation1.rb
+++ b/app/models/form/lettings/questions/working_situation1.rb
@@ -8,7 +8,7 @@ class Form::Lettings::Questions::WorkingSituation1 < ::Form::Question
@check_answers_card_number = 1
@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."
@answer_options = ANSWER_OPTIONS
- @question_number = 37
+ @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end
ANSWER_OPTIONS = {
@@ -24,4 +24,6 @@ class Form::Lettings::Questions::WorkingSituation1 < ::Form::Question
"divider" => { "value" => true },
"10" => { "value" => "Tenant prefers not to say" },
}.freeze
+
+ QUESTION_NUMBER_FROM_YEAR = { 2023 => 37, 2024 => 36 }.freeze
end
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 086f250e0..39074143c 100644
--- a/spec/fixtures/files/lettings_log_csv_export_codes_23.csv
+++ b/spec/fixtures/files/lettings_log_csv_export_codes_23.csv
@@ -1,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,postcode_known,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,nationality_all,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,reasonother_value_check,prevten,new_old,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,earnings,incfreq,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,1,,,2023,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,1,0,,,fake address,,London,,NW9 5LL,false,Barnet,E09000003,0,2,6,2,2,7,1,1,3,2023-11-24,,,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,2,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,,2,,0,0,268,1,,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,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,postcode_known,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,nationality_all,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,reasonother_value_check,prevten,new_old,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,1,,,2023,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,1,0,,,fake address,,London,,NW9 5LL,false,Barnet,E09000003,0,2,6,2,2,7,1,1,3,2023-11-24,,,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,2,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,,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,,,,,,,,,,,,,,,,,,,,
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 e752f4237..591a803bf 100644
--- a/spec/fixtures/files/lettings_log_csv_export_codes_24.csv
+++ b/spec/fixtures/files/lettings_log_csv_export_codes_24.csv
@@ -1,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,declaration,postcode_known,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,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,national,nationality_all,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,reasonother_value_check,prevten,new_old,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,earnings,incfreq,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2024-04-01T00:00:00+01:00,1,,,2023,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,1,1,0,,,fake address,,London,,NW9 5LL,false,Barnet,E09000003,0,2,6,2,2,7,1,1,3,2023-11-24,,,1,2023-11-25,,3,1,4,,2,,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,2,1,0,TN23 6LZ,1,false,Ashford,E07000105,1,0,1,0,0,0,0,0,1,0,,2,,0,0,268,1,,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,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,declaration,postcode_known,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,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,national,nationality_all,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,reasonother_value_check,prevten,new_old,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2024-04-01T00:00:00+01:00,1,,,2023,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,1,1,0,,,fake address,,London,,NW9 5LL,false,Barnet,E09000003,0,2,6,2,2,7,1,1,3,2023-11-24,,,1,2023-11-25,,3,1,4,,2,,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,2,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,,,,,,,,,,,,,,,,,,,,
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 4f2c43d5d..0f6b4e40d 100644
--- a/spec/fixtures/files/lettings_log_csv_export_labels_23.csv
+++ b/spec/fixtures/files/lettings_log_csv_export_labels_23.csv
@@ -1,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,postcode_known,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,nationality_all,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,reasonother_value_check,prevten,new_old,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,earnings,incfreq,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,single log,,,2023,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,Yes,No,,,fake address,,London,,NW9 5LL,No,Barnet,E09000003,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,,,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,2,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,,Tenant applied directly (no referral or nomination),,Yes,No,268,Weekly,,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,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,postcode_known,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,nationality_all,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,reasonother_value_check,prevten,new_old,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2023-11-26T00:00:00+00:00,single log,,,2023,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,Yes,No,,,fake address,,London,,NW9 5LL,No,Barnet,E09000003,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,,,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,2,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,,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,,,,,,,,,,,,,,,,,,,,
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 2d15ea4b3..4234f7619 100644
--- a/spec/fixtures/files/lettings_log_csv_export_labels_24.csv
+++ b/spec/fixtures/files/lettings_log_csv_export_labels_24.csv
@@ -1,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,declaration,postcode_known,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,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,national,nationality_all,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,reasonother_value_check,prevten,new_old,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,earnings,incfreq,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2024-04-01T00:00:00+01:00,single log,,,2023,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,Yes,Yes,No,,,fake address,,London,,NW9 5LL,No,Barnet,E09000003,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,,,Yes,2023-11-25,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,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,2,No,Yes,TN23 6LZ,Yes,No,Ashford,E07000105,Yes,,Yes,,,,No,No,Yes,No,,Tenant applied directly (no referral or nomination),,Yes,No,268,Weekly,,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,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,declaration,postcode_known,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,hhmemb,pregnancy_value_check,refused,hhtype,totchild,totelder,totadult,age1,retirement_value_check,sex1,ethnic_group,ethnic,national,nationality_all,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,reasonother_value_check,prevten,new_old,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_sensitive,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,false,2023-11-26T00:00:00+00:00,,2024-04-01T00:00:00+01:00,single log,,,2023,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,Yes,Yes,No,,,fake address,,London,,NW9 5LL,No,Barnet,E09000003,No,Affordable rent basis,Tenant abandoned property,No,2,House,Purpose built,Yes,3,2023-11-24,,,Yes,2023-11-25,,Don’t know,Yes,Assured Shorthold Tenancy (AST) – Fixed term,,2,,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,2,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,,,,,,,,,,,,,,,,,,,,
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 2cf49f785..2fcf96476 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,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,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,refused,age1,sex1,ethnic_group,ethnic,nationality_all,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,referral_value_check,incref,earnings,incfreq,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,0,,fake address,,London,,NW9 5LL,Barnet,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,,2,,0,268,1,6,1,1,,0,2,,,,,200.0,50.0,40.0,35.0,325.0,,,,1,12.0,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,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,refused,age1,sex1,ethnic_group,ethnic,nationality_all,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,referral_value_check,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,0,,fake address,,London,,NW9 5LL,Barnet,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,,2,,0,1,268,6,1,1,,0,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 29c2db295..9ba4f78eb 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,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,declaration,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,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,hhmemb,refused,age1,sex1,ethnic_group,ethnic,national,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,referral_value_check,incref,earnings,incfreq,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,,2024-04-01T00:00:00+01:00,1,2023,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,1,0,,fake address,,London,,NW9 5LL,Barnet,2,6,2,2,7,1,1,3,2023-11-24,1,,1,2023-11-25,,3,1,4,,2,,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,268,1,6,1,1,,0,2,,,,,200.0,50.0,40.0,35.0,325.0,,,,1,12.0,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,declaration,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,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,hhmemb,refused,age1,sex1,ethnic_group,ethnic,national,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,referral_value_check,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,,2024-04-01T00:00:00+01:00,1,2023,DLUHC,DLUHC,1,7,0,2023-11-26,2,2,1,,2,HIJKLMN,ABCDEFG,1,0,,fake address,,London,,NW9 5LL,Barnet,2,6,2,2,7,1,1,3,2023-11-24,1,,1,2023-11-25,,3,1,4,,2,,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,,,,,,,,,,,,,,,,,,,,
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 2c2b63ee4..305a0d000 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,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,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,refused,age1,sex1,ethnic_group,ethnic,nationality_all,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,referral_value_check,incref,earnings,incfreq,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,No,,fake address,,London,,NW9 5LL,Barnet,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,,Tenant applied directly (no referral or nomination),,No,268,Weekly,Universal Credit housing element,Yes,All,,No,Every 2 weeks,,,,,200.0,50.0,40.0,35.0,325.0,,,,Yes,12.0,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,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,refused,age1,sex1,ethnic_group,ethnic,nationality_all,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,referral_value_check,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,No,,fake address,,London,,NW9 5LL,Barnet,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,,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,,,,,,,,,,,,,,,,,,,,
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 cef9f5c72..fd6fd06e7 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,2 +1,2 @@
-id,status,duplicate_set_id,created_by,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,declaration,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,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,hhmemb,refused,age1,sex1,ethnic_group,ethnic,national,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,referral_value_check,incref,earnings,incfreq,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,,2024-04-01T00:00:00+01:00,single log,2023,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,Yes,No,,fake address,,London,,NW9 5LL,Barnet,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,,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,268,Weekly,Universal Credit housing element,Yes,All,,No,Every 2 weeks,,,,,200.0,50.0,40.0,35.0,325.0,,,,Yes,12.0,,,,,,,,,,,,,,,,,,,,
+id,status,duplicate_set_id,created_by,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,declaration,uprn_known,uprn,address_line1,address_line2,town_or_city,county,postcode_full,la_label,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,hhmemb,refused,age1,sex1,ethnic_group,ethnic,national,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,referral_value_check,incref,incfreq,earnings,hb,has_benefits,benefits,household_charge,nocharge,period,is_carehome,chcharge,wchchrg,carehome_charges_value_check,brent,scharge,pscharge,supcharg,tcharge,scharge_value_check,pscharge_value_check,supcharg_value_check,hbrentshortfall,tshortfall,scheme_code,scheme_service_name,scheme_sensitive,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,,2024-04-01T00:00:00+01:00,single log,2023,DLUHC,DLUHC,General needs,Affordable rent general needs local authority,No,2023-11-26,Affordable Rent,Affordable Rent,Rent to Buy,,No,HIJKLMN,ABCDEFG,Yes,No,,fake address,,London,,NW9 5LL,Barnet,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,,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,,,,,,,,,,,,,,,,,,,,
diff --git a/spec/models/form/lettings/pages/address_spec.rb b/spec/models/form/lettings/pages/address_spec.rb
index 78034f824..cb275e530 100644
--- a/spec/models/form/lettings/pages/address_spec.rb
+++ b/spec/models/form/lettings/pages/address_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::Address, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
@@ -20,7 +20,7 @@ RSpec.describe Form::Lettings::Pages::Address, type: :model do
end
it "has the correct header" do
- expect(page.header).to eq("Q12 - What is the property's address?")
+ expect(page.header).to eq("Q13 - What is the property's address?")
end
it "has the correct description" do
diff --git a/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb b/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb
index 6d2b8f7a8..e37d6efc4 100644
--- a/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/care_home_charges_value_check_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::CareHomeChargesValueCheck, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb
index b3d7054ce..d789a850a 100644
--- a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_age_value_check_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb
index fac723aea..3a9e37d47 100644
--- a/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/females_in_soft_age_range_in_pregnant_household_person_value_check_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::FemalesInSoftAgeRangeInPregnantHouseholdPe
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb b/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
index 8f0f5c2b7..9cf49add6 100644
--- a/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
+++ b/spec/models/form/lettings/pages/first_time_property_let_as_social_housing_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Pages::FirstTimePropertyLetAsSocialHousing, type:
let(:page_id) { nil }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb b/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
index c2504550d..2e9b3a9c3 100644
--- a/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
+++ b/spec/models/form/lettings/pages/lead_tenant_ethnic_background_white_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Pages::LeadTenantEthnicBackgroundWhite, type: :mo
let(:page_id) { nil }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/pages/location_spec.rb b/spec/models/form/lettings/pages/location_spec.rb
index 65bca4636..10e8fdf09 100644
--- a/spec/models/form/lettings/pages/location_spec.rb
+++ b/spec/models/form/lettings/pages/location_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Pages::Location, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2022, 4, 1))
diff --git a/spec/models/form/lettings/pages/managing_organisation_spec.rb b/spec/models/form/lettings/pages/managing_organisation_spec.rb
index f32afca2d..1c4e3a8df 100644
--- a/spec/models/form/lettings/pages/managing_organisation_spec.rb
+++ b/spec/models/form/lettings/pages/managing_organisation_spec.rb
@@ -5,8 +5,7 @@ RSpec.describe Form::Lettings::Pages::ManagingOrganisation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/max_rent_value_check_spec.rb b/spec/models/form/lettings/pages/max_rent_value_check_spec.rb
index 45caf16a3..c11f9f412 100644
--- a/spec/models/form/lettings/pages/max_rent_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/max_rent_value_check_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::MaxRentValueCheck, type: :model do
let(:page_id) { "max_rent_value_check" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/min_rent_value_check_spec.rb b/spec/models/form/lettings/pages/min_rent_value_check_spec.rb
index 2f953c4cb..1b128dd80 100644
--- a/spec/models/form/lettings/pages/min_rent_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/min_rent_value_check_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::MinRentValueCheck, type: :model do
let(:page_id) { "min_rent_value_check" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/needs_type_spec.rb b/spec/models/form/lettings/pages/needs_type_spec.rb
index 1f0cabdfa..a9e9d0fcc 100644
--- a/spec/models/form/lettings/pages/needs_type_spec.rb
+++ b/spec/models/form/lettings/pages/needs_type_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::NeedsType, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/net_income_value_check_spec.rb b/spec/models/form/lettings/pages/net_income_value_check_spec.rb
index f07ec84ab..e21476fa5 100644
--- a/spec/models/form/lettings/pages/net_income_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/net_income_value_check_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::NetIncomeValueCheck, type: :model do
let(:page_id) { "shared_ownership_deposit_value_check" }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb b/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb
index 5e6adf867..06f17b190 100644
--- a/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/no_females_pregnant_household_person_age_value_check_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonAgeValueCh
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb b/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb
index 05691313c..4be9a5ef2 100644
--- a/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/no_females_pregnant_household_person_value_check_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::NoFemalesPregnantHouseholdPersonValueCheck
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/person_age_spec.rb b/spec/models/form/lettings/pages/person_age_spec.rb
index 3a5ee1655..483784e5c 100644
--- a/spec/models/form/lettings/pages/person_age_spec.rb
+++ b/spec/models/form/lettings/pages/person_age_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonAge, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:, person_type:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
let(:person_type) { "non_child" }
diff --git a/spec/models/form/lettings/pages/person_gender_identity_spec.rb b/spec/models/form/lettings/pages/person_gender_identity_spec.rb
index df0e8fa12..b487c3cfd 100644
--- a/spec/models/form/lettings/pages/person_gender_identity_spec.rb
+++ b/spec/models/form/lettings/pages/person_gender_identity_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonGenderIdentity, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/person_known_spec.rb b/spec/models/form/lettings/pages/person_known_spec.rb
index a64976ed5..7bc4bce83 100644
--- a/spec/models/form/lettings/pages/person_known_spec.rb
+++ b/spec/models/form/lettings/pages/person_known_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonKnown, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb b/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb
index 865a01f61..22613095d 100644
--- a/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb b/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
index 6af0a07c2..6bf4558af 100644
--- a/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
+++ b/spec/models/form/lettings/pages/person_relationship_to_lead_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonRelationshipToLead, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb b/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb
index 58fbcf33d..13023e1d0 100644
--- a/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb
+++ b/spec/models/form/lettings/pages/person_under_retirement_value_check_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonUnderRetirementValueCheck, type: :mo
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
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 36120ec70..9631a20a9 100644
--- a/spec/models/form/lettings/pages/person_working_situation_spec.rb
+++ b/spec/models/form/lettings/pages/person_working_situation_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::PersonWorkingSituation, type: :model do
subject(:page) { described_class.new(nil, page_definition, subsection, person_index:) }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
let(:person_index) { 2 }
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/previous_housing_situation_renewal_spec.rb b/spec/models/form/lettings/pages/previous_housing_situation_renewal_spec.rb
index 4bdc2d8a3..017ff5978 100644
--- a/spec/models/form/lettings/pages/previous_housing_situation_renewal_spec.rb
+++ b/spec/models/form/lettings/pages/previous_housing_situation_renewal_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Pages::PreviousHousingSituationRenewal, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/previous_housing_situation_spec.rb b/spec/models/form/lettings/pages/previous_housing_situation_spec.rb
index c891996c9..1baef7198 100644
--- a/spec/models/form/lettings/pages/previous_housing_situation_spec.rb
+++ b/spec/models/form/lettings/pages/previous_housing_situation_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Pages::PreviousHousingSituation, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/property_number_of_bedrooms_spec.rb b/spec/models/form/lettings/pages/property_number_of_bedrooms_spec.rb
index f6cec39e8..ce5f10617 100644
--- a/spec/models/form/lettings/pages/property_number_of_bedrooms_spec.rb
+++ b/spec/models/form/lettings/pages/property_number_of_bedrooms_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::PropertyNumberOfBedrooms, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/property_number_of_times_relet_spec.rb b/spec/models/form/lettings/pages/property_number_of_times_relet_spec.rb
index 4612dd31a..67c6504b7 100644
--- a/spec/models/form/lettings/pages/property_number_of_times_relet_spec.rb
+++ b/spec/models/form/lettings/pages/property_number_of_times_relet_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::PropertyNumberOfTimesRelet, type: :model d
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/property_reference_spec.rb b/spec/models/form/lettings/pages/property_reference_spec.rb
index d412f9b8a..ee53c3aae 100644
--- a/spec/models/form/lettings/pages/property_reference_spec.rb
+++ b/spec/models/form/lettings/pages/property_reference_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::PropertyReference, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb b/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
index 522a19905..06144b2b4 100644
--- a/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
+++ b/spec/models/form/lettings/pages/property_wheelchair_accessible_spec.rb
@@ -3,10 +3,10 @@ require "rails_helper"
RSpec.describe Form::Lettings::Pages::PropertyWheelchairAccessible, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct subsection" do
diff --git a/spec/models/form/lettings/pages/renewal_spec.rb b/spec/models/form/lettings/pages/renewal_spec.rb
index 6a6be457d..aec06352d 100644
--- a/spec/models/form/lettings/pages/renewal_spec.rb
+++ b/spec/models/form/lettings/pages/renewal_spec.rb
@@ -5,8 +5,8 @@ RSpec.describe Form::Lettings::Pages::Renewal, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/pages/rent_type_spec.rb b/spec/models/form/lettings/pages/rent_type_spec.rb
index 0d02791da..be4da3775 100644
--- a/spec/models/form/lettings/pages/rent_type_spec.rb
+++ b/spec/models/form/lettings/pages/rent_type_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::RentType, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/scheme_spec.rb b/spec/models/form/lettings/pages/scheme_spec.rb
index 4f5510330..96d66da2b 100644
--- a/spec/models/form/lettings/pages/scheme_spec.rb
+++ b/spec/models/form/lettings/pages/scheme_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::Scheme, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/sheltered_accommodation_spec.rb b/spec/models/form/lettings/pages/sheltered_accommodation_spec.rb
index 7d403f9e3..e2e1d1086 100644
--- a/spec/models/form/lettings/pages/sheltered_accommodation_spec.rb
+++ b/spec/models/form/lettings/pages/sheltered_accommodation_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Pages::ShelteredAccommodation, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb b/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
index 2c5208fd1..14388539c 100644
--- a/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
+++ b/spec/models/form/lettings/pages/starter_tenancy_type_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Pages::StarterTenancyType, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/pages/stock_owner_spec.rb b/spec/models/form/lettings/pages/stock_owner_spec.rb
index 798a68e8c..bb0ddd3dc 100644
--- a/spec/models/form/lettings/pages/stock_owner_spec.rb
+++ b/spec/models/form/lettings/pages/stock_owner_spec.rb
@@ -5,8 +5,8 @@ RSpec.describe Form::Lettings::Pages::StockOwner, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/tenancy_length_periodic_spec.rb b/spec/models/form/lettings/pages/tenancy_length_periodic_spec.rb
index 19134110f..d7463f694 100644
--- a/spec/models/form/lettings/pages/tenancy_length_periodic_spec.rb
+++ b/spec/models/form/lettings/pages/tenancy_length_periodic_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Pages::TenancyLengthPeriodic, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq subsection
diff --git a/spec/models/form/lettings/pages/tenancy_length_spec.rb b/spec/models/form/lettings/pages/tenancy_length_spec.rb
index b3c949a32..aef5f3fd0 100644
--- a/spec/models/form/lettings/pages/tenancy_length_spec.rb
+++ b/spec/models/form/lettings/pages/tenancy_length_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Pages::TenancyLength, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq subsection
diff --git a/spec/models/form/lettings/pages/tenancy_start_date_spec.rb b/spec/models/form/lettings/pages/tenancy_start_date_spec.rb
index 8f8330395..8157f1872 100644
--- a/spec/models/form/lettings/pages/tenancy_start_date_spec.rb
+++ b/spec/models/form/lettings/pages/tenancy_start_date_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::TenancyStartDate, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/tenancy_type_spec.rb b/spec/models/form/lettings/pages/tenancy_type_spec.rb
index ef772e85e..e4b6a04e5 100644
--- a/spec/models/form/lettings/pages/tenancy_type_spec.rb
+++ b/spec/models/form/lettings/pages/tenancy_type_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Pages::TenancyType, type: :model do
subject(:page) { described_class.new(nil, nil, subsection) }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/tenant_code_spec.rb b/spec/models/form/lettings/pages/tenant_code_spec.rb
index 724b93ad0..636fbce83 100644
--- a/spec/models/form/lettings/pages/tenant_code_spec.rb
+++ b/spec/models/form/lettings/pages/tenant_code_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::TenantCode, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/uprn_confirmation_spec.rb b/spec/models/form/lettings/pages/uprn_confirmation_spec.rb
index 66e55979a..1f66964f4 100644
--- a/spec/models/form/lettings/pages/uprn_confirmation_spec.rb
+++ b/spec/models/form/lettings/pages/uprn_confirmation_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::UprnConfirmation, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/uprn_spec.rb b/spec/models/form/lettings/pages/uprn_spec.rb
index 009f7b392..1e7b9b7b4 100644
--- a/spec/models/form/lettings/pages/uprn_spec.rb
+++ b/spec/models/form/lettings/pages/uprn_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::Uprn, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/pages/void_date_spec.rb b/spec/models/form/lettings/pages/void_date_spec.rb
index 0d5e1689a..5e3cbd323 100644
--- a/spec/models/form/lettings/pages/void_date_spec.rb
+++ b/spec/models/form/lettings/pages/void_date_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Pages::VoidDate, type: :model do
let(:page_id) { nil }
let(:page_definition) { nil }
- let(:subsection) { instance_double(Form::Subsection) }
+ let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1))) }
it "has correct subsection" do
expect(page.subsection).to eq(subsection)
diff --git a/spec/models/form/lettings/questions/address_line1_spec.rb b/spec/models/form/lettings/questions/address_line1_spec.rb
index 0fc91a586..82e6a5274 100644
--- a/spec/models/form/lettings/questions/address_line1_spec.rb
+++ b/spec/models/form/lettings/questions/address_line1_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::AddressLine1, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/age1_known_spec.rb b/spec/models/form/lettings/questions/age1_known_spec.rb
index 680de4977..ac5af8aab 100644
--- a/spec/models/form/lettings/questions/age1_known_spec.rb
+++ b/spec/models/form/lettings/questions/age1_known_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::Age1Known, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/age_known_spec.rb b/spec/models/form/lettings/questions/age_known_spec.rb
index a3ca5c3fb..bac940097 100644
--- a/spec/models/form/lettings/questions/age_known_spec.rb
+++ b/spec/models/form/lettings/questions/age_known_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Questions::AgeKnown, type: :model do
subject(:question) { described_class.new(nil, question_definition, page, person_index:) }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/age_spec.rb b/spec/models/form/lettings/questions/age_spec.rb
index 40a6356fd..bdd2f0a21 100644
--- a/spec/models/form/lettings/questions/age_spec.rb
+++ b/spec/models/form/lettings/questions/age_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Questions::Age, type: :model do
subject(:question) { described_class.new(nil, question_definition, page, person_index:, person_type:) }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) }
let(:person_index) { 2 }
let(:person_type) { "non_child" }
diff --git a/spec/models/form/lettings/questions/beds_spec.rb b/spec/models/form/lettings/questions/beds_spec.rb
index 77340f5d5..6291892b1 100644
--- a/spec/models/form/lettings/questions/beds_spec.rb
+++ b/spec/models/form/lettings/questions/beds_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Beds, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/county_spec.rb b/spec/models/form/lettings/questions/county_spec.rb
index 1955dad8f..901bd2e9c 100644
--- a/spec/models/form/lettings/questions/county_spec.rb
+++ b/spec/models/form/lettings/questions/county_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::County, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/created_by_id_spec.rb b/spec/models/form/lettings/questions/created_by_id_spec.rb
index ec3fc7a9b..98e0e283b 100644
--- a/spec/models/form/lettings/questions/created_by_id_spec.rb
+++ b/spec/models/form/lettings/questions/created_by_id_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::CreatedById, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/declaration_spec.rb b/spec/models/form/lettings/questions/declaration_spec.rb
index 8230235cf..e61258893 100644
--- a/spec/models/form/lettings/questions/declaration_spec.rb
+++ b/spec/models/form/lettings/questions/declaration_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Declaration, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?)
diff --git a/spec/models/form/lettings/questions/ethnic_white_spec.rb b/spec/models/form/lettings/questions/ethnic_white_spec.rb
index 6a81afb88..b06490b86 100644
--- a/spec/models/form/lettings/questions/ethnic_white_spec.rb
+++ b/spec/models/form/lettings/questions/ethnic_white_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::EthnicWhite, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb b/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
index e88c4ac8b..7f38f0108 100644
--- a/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
+++ b/spec/models/form/lettings/questions/first_time_property_let_as_social_housing_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::FirstTimePropertyLetAsSocialHousing, t
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/gender_identity1_spec.rb b/spec/models/form/lettings/questions/gender_identity1_spec.rb
index 596e38941..337936dbc 100644
--- a/spec/models/form/lettings/questions/gender_identity1_spec.rb
+++ b/spec/models/form/lettings/questions/gender_identity1_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::GenderIdentity1, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(page).to receive(:subsection).and_return(subsection)
diff --git a/spec/models/form/lettings/questions/hb_spec.rb b/spec/models/form/lettings/questions/hb_spec.rb
index 1c0ce31de..a73f030ad 100644
--- a/spec/models/form/lettings/questions/hb_spec.rb
+++ b/spec/models/form/lettings/questions/hb_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Hb, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/homeless_spec.rb b/spec/models/form/lettings/questions/homeless_spec.rb
index a443d7391..f2b384360 100644
--- a/spec/models/form/lettings/questions/homeless_spec.rb
+++ b/spec/models/form/lettings/questions/homeless_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::Homeless, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/housingneeds_other_spec.rb b/spec/models/form/lettings/questions/housingneeds_other_spec.rb
index 9054c0c8a..b6649aea4 100644
--- a/spec/models/form/lettings/questions/housingneeds_other_spec.rb
+++ b/spec/models/form/lettings/questions/housingneeds_other_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::HousingneedsOther, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/irproduct_other_spec.rb b/spec/models/form/lettings/questions/irproduct_other_spec.rb
index 45182104a..aeea7ae20 100644
--- a/spec/models/form/lettings/questions/irproduct_other_spec.rb
+++ b/spec/models/form/lettings/questions/irproduct_other_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::IrproductOther, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/is_carehome_spec.rb b/spec/models/form/lettings/questions/is_carehome_spec.rb
index 99f13aab0..8a2853aa3 100644
--- a/spec/models/form/lettings/questions/is_carehome_spec.rb
+++ b/spec/models/form/lettings/questions/is_carehome_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::IsCarehome, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/joint_spec.rb b/spec/models/form/lettings/questions/joint_spec.rb
index 542c1cd30..338110e4d 100644
--- a/spec/models/form/lettings/questions/joint_spec.rb
+++ b/spec/models/form/lettings/questions/joint_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Joint, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/layear_spec.rb b/spec/models/form/lettings/questions/layear_spec.rb
index 12e8c5746..e42ac704d 100644
--- a/spec/models/form/lettings/questions/layear_spec.rb
+++ b/spec/models/form/lettings/questions/layear_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Layear, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/letting_allocation_spec.rb b/spec/models/form/lettings/questions/letting_allocation_spec.rb
index ab268d840..78cd5acca 100644
--- a/spec/models/form/lettings/questions/letting_allocation_spec.rb
+++ b/spec/models/form/lettings/questions/letting_allocation_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::LettingAllocation, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/location_id_spec.rb b/spec/models/form/lettings/questions/location_id_spec.rb
index 0d3f8d1c8..a2c41af80 100644
--- a/spec/models/form/lettings/questions/location_id_spec.rb
+++ b/spec/models/form/lettings/questions/location_id_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::LocationId, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_date).and_return(Time.zone.local(2022, 4, 1))
diff --git a/spec/models/form/lettings/questions/managing_organisation_spec.rb b/spec/models/form/lettings/questions/managing_organisation_spec.rb
index 62a46bc1e..f35f17b4f 100644
--- a/spec/models/form/lettings/questions/managing_organisation_spec.rb
+++ b/spec/models/form/lettings/questions/managing_organisation_spec.rb
@@ -5,9 +5,7 @@ RSpec.describe Form::Lettings::Questions::ManagingOrganisation, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
- let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/nationality_all_group_spec.rb b/spec/models/form/lettings/questions/nationality_all_group_spec.rb
index d92551546..56fc50257 100644
--- a/spec/models/form/lettings/questions/nationality_all_group_spec.rb
+++ b/spec/models/form/lettings/questions/nationality_all_group_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::NationalityAllGroup, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/nationality_all_spec.rb b/spec/models/form/lettings/questions/nationality_all_spec.rb
index 07c993766..9c274e06c 100644
--- a/spec/models/form/lettings/questions/nationality_all_spec.rb
+++ b/spec/models/form/lettings/questions/nationality_all_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::NationalityAll, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/nationality_spec.rb b/spec/models/form/lettings/questions/nationality_spec.rb
index d0eaeb69b..f32cf4f0d 100644
--- a/spec/models/form/lettings/questions/nationality_spec.rb
+++ b/spec/models/form/lettings/questions/nationality_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::Nationality, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/needs_type_spec.rb b/spec/models/form/lettings/questions/needs_type_spec.rb
index 343a10ffd..a0a309f70 100644
--- a/spec/models/form/lettings/questions/needs_type_spec.rb
+++ b/spec/models/form/lettings/questions/needs_type_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::NeedsType, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/net_income_known_spec.rb b/spec/models/form/lettings/questions/net_income_known_spec.rb
index 80ea412ba..fff32fba0 100644
--- a/spec/models/form/lettings/questions/net_income_known_spec.rb
+++ b/spec/models/form/lettings/questions/net_income_known_spec.rb
@@ -1,7 +1,9 @@
require "rails_helper"
RSpec.describe Form::Lettings::Questions::NetIncomeKnown do
- subject(:question) { described_class.new(nil, {}, nil) }
+ subject(:question) { described_class.new(nil, {}, page) }
+
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
describe "#id" do
it "is net_income_known" do
diff --git a/spec/models/form/lettings/questions/offered_spec.rb b/spec/models/form/lettings/questions/offered_spec.rb
index 09d103a1b..45a589a32 100644
--- a/spec/models/form/lettings/questions/offered_spec.rb
+++ b/spec/models/form/lettings/questions/offered_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::Offered, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to be page
diff --git a/spec/models/form/lettings/questions/period_spec.rb b/spec/models/form/lettings/questions/period_spec.rb
index 6097dfc55..629be7f28 100644
--- a/spec/models/form/lettings/questions/period_spec.rb
+++ b/spec/models/form/lettings/questions/period_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::Period, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has the correct hint" do
expect(question.hint_text).to eq("Select how often the household is charged. This may be different to how often they pay.")
diff --git a/spec/models/form/lettings/questions/person_gender_identity_spec.rb b/spec/models/form/lettings/questions/person_gender_identity_spec.rb
index bff45a624..49daf60ed 100644
--- a/spec/models/form/lettings/questions/person_gender_identity_spec.rb
+++ b/spec/models/form/lettings/questions/person_gender_identity_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::PersonGenderIdentity, type: :model do
let(:page) { instance_double(Form::Page) }
let(:person_index) { 2 }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(page).to receive(:subsection).and_return(subsection)
diff --git a/spec/models/form/lettings/questions/person_relationship_spec.rb b/spec/models/form/lettings/questions/person_relationship_spec.rb
index dca3d82a3..31b2c402e 100644
--- a/spec/models/form/lettings/questions/person_relationship_spec.rb
+++ b/spec/models/form/lettings/questions/person_relationship_spec.rb
@@ -4,7 +4,7 @@ RSpec.describe Form::Lettings::Questions::PersonRelationship, type: :model do
subject(:question) { described_class.new(nil, question_definition, page, person_index:) }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) }
let(:person_index) { 2 }
it "has correct page" do
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 b13e82992..5f4c513f4 100644
--- a/spec/models/form/lettings/questions/person_working_situation_spec.rb
+++ b/spec/models/form/lettings/questions/person_working_situation_spec.rb
@@ -4,7 +4,7 @@ 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) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 4)))) }
let(:person_index) { 2 }
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/postcode_for_full_address_spec.rb b/spec/models/form/lettings/questions/postcode_for_full_address_spec.rb
index 337d1e6fe..1cb179ce5 100644
--- a/spec/models/form/lettings/questions/postcode_for_full_address_spec.rb
+++ b/spec/models/form/lettings/questions/postcode_for_full_address_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::PostcodeForFullAddress, type: :model d
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/ppcodenk_spec.rb b/spec/models/form/lettings/questions/ppcodenk_spec.rb
index ad5e52e96..79613d962 100644
--- a/spec/models/form/lettings/questions/ppcodenk_spec.rb
+++ b/spec/models/form/lettings/questions/ppcodenk_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::Ppcodenk, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/previous_la_known_spec.rb b/spec/models/form/lettings/questions/previous_la_known_spec.rb
index af269db5e..8b8460ce0 100644
--- a/spec/models/form/lettings/questions/previous_la_known_spec.rb
+++ b/spec/models/form/lettings/questions/previous_la_known_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLaKnown, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/previous_let_type_spec.rb b/spec/models/form/lettings/questions/previous_let_type_spec.rb
index 9f43f0aff..8b28bc93a 100644
--- a/spec/models/form/lettings/questions/previous_let_type_spec.rb
+++ b/spec/models/form/lettings/questions/previous_let_type_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::PreviousLetType, type: :model do
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb b/spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb
index 91f1ec158..624229dda 100644
--- a/spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb
+++ b/spec/models/form/lettings/questions/previous_tenure_renewal_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::PreviousTenureRenewal, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has the correct id" do
expect(question.id).to eq("prevten")
diff --git a/spec/models/form/lettings/questions/previous_tenure_spec.rb b/spec/models/form/lettings/questions/previous_tenure_spec.rb
index 4b106601e..c3a598889 100644
--- a/spec/models/form/lettings/questions/previous_tenure_spec.rb
+++ b/spec/models/form/lettings/questions/previous_tenure_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::PreviousTenure, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has the correct id" do
expect(question.id).to eq("prevten")
diff --git a/spec/models/form/lettings/questions/property_reference_spec.rb b/spec/models/form/lettings/questions/property_reference_spec.rb
index 82f60c421..b4aa848af 100644
--- a/spec/models/form/lettings/questions/property_reference_spec.rb
+++ b/spec/models/form/lettings/questions/property_reference_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::PropertyReference, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
let(:lettings_log) { FactoryBot.create(:lettings_log) }
it "has correct page" do
diff --git a/spec/models/form/lettings/questions/reason_renewal_spec.rb b/spec/models/form/lettings/questions/reason_renewal_spec.rb
index 27b1524c6..5575c7e92 100644
--- a/spec/models/form/lettings/questions/reason_renewal_spec.rb
+++ b/spec/models/form/lettings/questions/reason_renewal_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/reason_spec.rb b/spec/models/form/lettings/questions/reason_spec.rb
index 4ea1a4a35..68f3fdd36 100644
--- a/spec/models/form/lettings/questions/reason_spec.rb
+++ b/spec/models/form/lettings/questions/reason_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/reasonpref_spec.rb b/spec/models/form/lettings/questions/reasonpref_spec.rb
index 9b9bf8a80..1f531921d 100644
--- a/spec/models/form/lettings/questions/reasonpref_spec.rb
+++ b/spec/models/form/lettings/questions/reasonpref_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::Reasonpref, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/renewal_spec.rb b/spec/models/form/lettings/questions/renewal_spec.rb
index c1c4f5d77..15b6fa84b 100644
--- a/spec/models/form/lettings/questions/renewal_spec.rb
+++ b/spec/models/form/lettings/questions/renewal_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Renewal, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/rent_type_spec.rb b/spec/models/form/lettings/questions/rent_type_spec.rb
index da1951c09..bc66348f5 100644
--- a/spec/models/form/lettings/questions/rent_type_spec.rb
+++ b/spec/models/form/lettings/questions/rent_type_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::RentType, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/rsnvac_spec.rb b/spec/models/form/lettings/questions/rsnvac_spec.rb
index d4de17016..bdc84753d 100644
--- a/spec/models/form/lettings/questions/rsnvac_spec.rb
+++ b/spec/models/form/lettings/questions/rsnvac_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Rsnvac, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/scheme_id_spec.rb b/spec/models/form/lettings/questions/scheme_id_spec.rb
index b1e628612..a9a7887be 100644
--- a/spec/models/form/lettings/questions/scheme_id_spec.rb
+++ b/spec/models/form/lettings/questions/scheme_id_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::SchemeId, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/sheltered_spec.rb b/spec/models/form/lettings/questions/sheltered_spec.rb
index cf3f59f26..c37646abb 100644
--- a/spec/models/form/lettings/questions/sheltered_spec.rb
+++ b/spec/models/form/lettings/questions/sheltered_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::Sheltered, type: :model do
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
index 3993e1b87..81d0b8b3b 100644
--- a/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
+++ b/spec/models/form/lettings/questions/starter_tenancy_type_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::StarterTenancyType, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(page).to receive(:subsection).and_return(subsection)
diff --git a/spec/models/form/lettings/questions/startertenancy_spec.rb b/spec/models/form/lettings/questions/startertenancy_spec.rb
index bdbc93897..f5b1e7ec5 100644
--- a/spec/models/form/lettings/questions/startertenancy_spec.rb
+++ b/spec/models/form/lettings/questions/startertenancy_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::Startertenancy, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(page).to receive(:subsection).and_return(subsection)
diff --git a/spec/models/form/lettings/questions/stock_owner_spec.rb b/spec/models/form/lettings/questions/stock_owner_spec.rb
index 74ca0d088..376179cf2 100644
--- a/spec/models/form/lettings/questions/stock_owner_spec.rb
+++ b/spec/models/form/lettings/questions/stock_owner_spec.rb
@@ -5,9 +5,7 @@ RSpec.describe Form::Lettings::Questions::StockOwner, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
- let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb b/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
index 647086ef0..45d2a80eb 100644
--- a/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_affordable_rent_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthAffordableRent, type: :mo
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb b/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
index f15dd7d03..9599997fb 100644
--- a/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_intermediate_rent_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthIntermediateRent, type: :
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb b/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb
index 7708ee9d8..4a2563e6f 100644
--- a/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_periodic_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::TenancyLengthPeriodic, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_length_spec.rb b/spec/models/form/lettings/questions/tenancy_length_spec.rb
index 0a83d0baa..2de7c99a6 100644
--- a/spec/models/form/lettings/questions/tenancy_length_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_length_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::TenancyLength, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_other_spec.rb b/spec/models/form/lettings/questions/tenancy_other_spec.rb
index 58a656e57..4891f5e31 100644
--- a/spec/models/form/lettings/questions/tenancy_other_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_other_spec.rb
@@ -3,7 +3,7 @@ require "rails_helper"
RSpec.describe Form::Lettings::Questions::TenancyOther, type: :model do
subject(:question) { described_class.new(nil, nil, page) }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_start_date_spec.rb b/spec/models/form/lettings/questions/tenancy_start_date_spec.rb
index 56031ffd9..a6c96d989 100644
--- a/spec/models/form/lettings/questions/tenancy_start_date_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_start_date_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::TenancyStartDate, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/tenancy_type_spec.rb b/spec/models/form/lettings/questions/tenancy_type_spec.rb
index c5ad04a03..6eafc96a7 100644
--- a/spec/models/form/lettings/questions/tenancy_type_spec.rb
+++ b/spec/models/form/lettings/questions/tenancy_type_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/tenant_code_spec.rb b/spec/models/form/lettings/questions/tenant_code_spec.rb
index a60383119..dc6ed86d5 100644
--- a/spec/models/form/lettings/questions/tenant_code_spec.rb
+++ b/spec/models/form/lettings/questions/tenant_code_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::TenantCode, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/town_or_city_spec.rb b/spec/models/form/lettings/questions/town_or_city_spec.rb
index a18d63c04..61262055f 100644
--- a/spec/models/form/lettings/questions/town_or_city_spec.rb
+++ b/spec/models/form/lettings/questions/town_or_city_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::TownOrCity, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/uprn_known_spec.rb b/spec/models/form/lettings/questions/uprn_known_spec.rb
index ec99a4fad..94f99fe53 100644
--- a/spec/models/form/lettings/questions/uprn_known_spec.rb
+++ b/spec/models/form/lettings/questions/uprn_known_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::UprnKnown, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
@@ -71,4 +71,16 @@ RSpec.describe Form::Lettings::Questions::UprnKnown, type: :model do
},
])
end
+
+ it "has the correct question_number" do
+ expect(question.question_number).to eq(11)
+ end
+
+ context "with 2024 form" do
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2024, 4, 1)))) }
+
+ it "has the correct question_number" do
+ expect(question.question_number).to eq(12)
+ end
+ end
end
diff --git a/spec/models/form/lettings/questions/uprn_spec.rb b/spec/models/form/lettings/questions/uprn_spec.rb
index 21d997446..d02a3ff1f 100644
--- a/spec/models/form/lettings/questions/uprn_spec.rb
+++ b/spec/models/form/lettings/questions/uprn_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::Uprn, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/voiddate_spec.rb b/spec/models/form/lettings/questions/voiddate_spec.rb
index aa3270d89..27aeb72f8 100644
--- a/spec/models/form/lettings/questions/voiddate_spec.rb
+++ b/spec/models/form/lettings/questions/voiddate_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Form::Lettings::Questions::Voiddate, type: :model do
let(:question_id) { nil }
let(:question_definition) { nil }
- let(:page) { instance_double(Form::Page) }
+ let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) }
it "has correct page" do
expect(question.page).to eq(page)
diff --git a/spec/models/form/lettings/questions/waityear_spec.rb b/spec/models/form/lettings/questions/waityear_spec.rb
index def11af8a..7a322f864 100644
--- a/spec/models/form/lettings/questions/waityear_spec.rb
+++ b/spec/models/form/lettings/questions/waityear_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do
let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) }
let(:subsection) { instance_double(Form::Subsection) }
- let(:form) { instance_double(Form) }
+ let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1)) }
before do
allow(form).to receive(:start_year_after_2024?).and_return(false)
diff --git a/spec/models/form/lettings/questions/wheelchair_spec.rb b/spec/models/form/lettings/questions/wheelchair_spec.rb
index 1fa65a68b..a5d240d51 100644
--- a/spec/models/form/lettings/questions/wheelchair_spec.rb
+++ b/spec/models/form/lettings/questions/wheelchair_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::Lettings::Questions::Wheelchair, type: :model do
before do
allow(page).to receive(:subsection).and_return(subsection)
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: false, start_date: Time.zone.local(2023, 4, 1)))
end
it "has correct page" do
@@ -48,7 +48,7 @@ RSpec.describe Form::Lettings::Questions::Wheelchair, type: :model do
context "with 2024 form" do
before do
- allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true))
+ allow(subsection).to receive(:form).and_return(instance_double(Form, start_year_after_2024?: true, start_date: Time.zone.local(2024, 4, 1)))
end
it "has the correct hint_text" do