CLDC-4140: remove old gender question lettings (#3177)
* CLDC-4141: copy person questions refactor from CLDC-4142
* CLDC-4141: remove gender same as sex and replace gender identity q
* CLDC-4141: replace sex with sexrab where relevant for 2026
* CLDC-4141: update download order
* CLDC-4140: remove sex from rowparser entirely
* CLDC-4140: keep sex in factory for now
* CLDC-4140: update household characteristics test
* CLDC-4140: update log variable spec
* CLDC-4140: update csv export tests
* CLDC-4140: update validator tests
* CLDC-4140: update row-parser spec
* CLDC-4140: update csv-parser spec
* CLDC-4140: update export spec
* CLDC-4140: update log var defs spec
* CLDC-4140: update export spec
* CLDC-4140: update row parser spec
* CLDC-4140: update validator spec
* CLDC-4140: update csv parser spec
* CLDC-4143: Update gender retirement validations
rename functions as the new wording is more related to those that identify as male and any other option
* CLDC-4143: Add 2026 tests
* CLDC-4143: Update legacy json files
causes issues with some old tests
* CLDC-4143: Add error mappings for gender fields
* CLDC-4143: Add new gender age retirement soft validation
replaces the many check pages from previous years with a single one
shows if either of the previous ones would show
has agreed wording on ticket
* fixup! CLDC-4143: Update gender retirement validations
improve gender comment wording
* CLDC-4143: Update non males validation name
reference to 'soft validation' we found confusing
* fixup! CLDC-4143: Add new gender age retirement soft validation
update subsection specs
* CLDC-4140: update parsers post merge
* CLDC-4140: update tests after field renumbering
* CLDC-4140: update tests after field renumbering
* CLDC-4140: update spacing in to_2026_row
* CLDC-4140: update row parser spec field numbers
* CLDC-4140: update row parser field types
---------
Co-authored-by: Samuel Young <samuel.young@softwire.com>
expect(parser.errors[:field_43]).toeql([I18n.t("validations.lettings.2026.bulk_upload.not_answered",question:"lead tenant’s sex registered at birth.")])
end
end
@ -1160,7 +1152,7 @@ RSpec.describe BulkUpload::Lettings::Year2026::RowParser do
@ -433,7 +433,7 @@ RSpec.describe Exports::LettingsLogExportService do
end
context"and one lettings log is available for export"do
let!(:lettings_log){FactoryBot.create(:lettings_log,:completed,assigned_to:user,age1:35,sex1:"F",age2:32,sex2:"M",ppostcode_full:"A1 1AA",nationality_all_group:13,propcode:"123",postcode_full:"SE2 6RT",tenancycode:"BZ737",startdate:Time.zone.local(2024,4,2,10,36,49),voiddate:Time.zone.local(2021,11,3),mrcdate:Time.zone.local(2022,5,5,10,36,49),tenancylength:5,underoccupation_benefitcap:4,creation_method:2,bulk_upload_id:1,address_line1_as_entered:"address line 1 as entered",address_line2_as_entered:"address line 2 as entered",town_or_city_as_entered:"town or city as entered",county_as_entered:"county as entered",postcode_full_as_entered:"AB1 2CD",la_as_entered:"la as entered",manual_address_entry_selected:false,uprn:"1",uprn_known:1)}
let!(:lettings_log){FactoryBot.create(:lettings_log,:completed,assigned_to:user,age1:35,sex1:"F",sexrab1:nil,age2:32,sex2:"M",sexrab2:nil,ppostcode_full:"A1 1AA",nationality_all_group:13,propcode:"123",postcode_full:"SE2 6RT",tenancycode:"BZ737",startdate:Time.zone.local(2024,4,2,10,36,49),voiddate:Time.zone.local(2021,11,3),mrcdate:Time.zone.local(2022,5,5,10,36,49),tenancylength:5,underoccupation_benefitcap:4,creation_method:2,bulk_upload_id:1,address_line1_as_entered:"address line 1 as entered",address_line2_as_entered:"address line 2 as entered",town_or_city_as_entered:"town or city as entered",county_as_entered:"county as entered",postcode_full_as_entered:"AB1 2CD",la_as_entered:"la as entered",manual_address_entry_selected:false,uprn:"1",uprn_known:1)}
@ -465,7 +465,7 @@ RSpec.describe Exports::LettingsLogExportService do
end
context"and one lettings log is available for export"do
let!(:lettings_log){FactoryBot.create(:lettings_log,:completed,startdate:Time.zone.local(2025,4,3),assigned_to:user,age1:35,sex1:"F",age2:32,sex2:"M",ppostcode_full:"A1 1AA",nationality_all_group:13,propcode:"123",postcode_full:"SE2 6RT",tenancycode:"BZ737",voiddate:Time.zone.local(2021,11,3),mrcdate:Time.zone.local(2022,5,5,10,36,49),tenancylength:5,underoccupation_benefitcap:4,creation_method:2,bulk_upload_id:1,address_line1_as_entered:"address line 1 as entered",address_line2_as_entered:"address line 2 as entered",town_or_city_as_entered:"town or city as entered",county_as_entered:"county as entered",postcode_full_as_entered:"AB1 2CD",la_as_entered:"la as entered",manual_address_entry_selected:false,uprn:"1",uprn_known:1)}
let!(:lettings_log){FactoryBot.create(:lettings_log,:completed,startdate:Time.zone.local(2025,4,3),assigned_to:user,age1:35,sex1:"F",sexrab1:nil,age2:32,sex2:"M",sexrab2:nil,ppostcode_full:"A1 1AA",nationality_all_group:13,propcode:"123",postcode_full:"SE2 6RT",tenancycode:"BZ737",voiddate:Time.zone.local(2021,11,3),mrcdate:Time.zone.local(2022,5,5,10,36,49),tenancylength:5,underoccupation_benefitcap:4,creation_method:2,bulk_upload_id:1,address_line1_as_entered:"address line 1 as entered",address_line2_as_entered:"address line 2 as entered",town_or_city_as_entered:"town or city as entered",county_as_entered:"county as entered",postcode_full_as_entered:"AB1 2CD",la_as_entered:"la as entered",manual_address_entry_selected:false,uprn:"1",uprn_known:1)}