diff --git a/app/services/imports/variable_definitions_service.rb b/app/services/imports/variable_definitions_service.rb index 49303ba2d..ba2e0d518 100644 --- a/app/services/imports/variable_definitions_service.rb +++ b/app/services/imports/variable_definitions_service.rb @@ -22,7 +22,7 @@ module Imports file_name = File.basename(file, ".csv") parsed_file_name = file_name.split("_") log_type = parsed_file_name[0] - year = "20#{parsed_file_name[3]}".to_i + year = "20#{parsed_file_name[2]}".to_i records_added = 0 diff --git a/config/csv/definitions/lettings_support_download_23_24.csv b/config/csv/definitions/lettings_download_23_24.csv similarity index 100% rename from config/csv/definitions/lettings_support_download_23_24.csv rename to config/csv/definitions/lettings_download_23_24.csv diff --git a/config/csv/definitions/lettings_support_download_24_25.csv b/config/csv/definitions/lettings_download_24_25.csv similarity index 100% rename from config/csv/definitions/lettings_support_download_24_25.csv rename to config/csv/definitions/lettings_download_24_25.csv diff --git a/config/csv/definitions/lettings_user_download_23_24.csv b/config/csv/definitions/lettings_user_download_23_24.csv deleted file mode 100644 index 33313fbe7..000000000 --- a/config/csv/definitions/lettings_user_download_23_24.csv +++ /dev/null @@ -1,170 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -is_dpo,Is the user in the assigned_to column the data protection officer? -created_at,Time and date the log was created -updated_by,User who last updated the log -updated_at,Time and date the log was last updated -creation_method,Was the log submitted in-service or via bulk upload? -collection_start_year,Year collection period opened -assigned_to,User the log is assigned to -owning_organisation_name,Which organisation owns this property? -managing_organisation_name,Which organisation manages this letting? -needstype,What is the needs type? -lettype,What is the letting type? -renewal,Is this letting a renewal? -startdate,What is the tenancy start date? -renttype,What is the rent type? (grouped into SR, IR or AR) -renttype_detail,What is the rent type? -irproduct,Which type of Intermediate Rent is this letting? -irproduct_other,Which 'Other' type of Intermediate Rent is this letting? -lar,Is this a London Affordable Rent letting? -tenancycode,What is the tenant code? -propcode,What is the property reference? -uprn_known,Is the UPRN known? -uprn,If known, property's UPRN -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town or City -county,County -postcode_full,Postcode -la_label,What is the property's local authority? -first_time_property_let_as_social_housing,Is this the first time the property has been let as social housing? -unitletas,What rent product was the property most recently let as? -rsnvac,What is the reason for the property being vacant? -newprop,Is this property new to the social rented sector? -offered,How many times was the property offered between becoming vacant and this letting? -unittype_gn,What type of unit is the property? -builtype,Which type of building is the property? -wchair,Is the property built or adapted to wheelchair-user standards? -beds,How many bedrooms does the property have? -voiddate,What is the void date? -vacdays,Number of days the property was vacant -majorrepairs,Were any major repairs carried out during the void period? -mrcdate,What date were any major repairs completed on? -joint,Is this a joint tenancy? -startertenancy,Is this a starter tenancy? -tenancy,What is the type of tenancy? -tenancyother,If 'Other', what is the type of tenancy? -tenancylength,What is the length of the fixed-term tenancy to the nearest year? -sheltered,Is this letting in sheltered accommodation? -declaration,Has the tenant seen the MHCLG privacy notice? -hhmemb,How many people live in the household at this letting? -refused,Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8 -age1,What is the lead tenant's age? -sex1,Which of these best describes the lead tenant's gender identity? -ethnic_group,What is the lead tenant's ethnic group? -ethnic,Which of these best describes the lead tenant's ethnic background? -national,What is the lead tenant's nationality? -ecstat1,Which of these best describes the lead tenant's working situation? -relat2,What is person 2's relationship to the lead tenant? -age2,What is person 2's age? -sex2,Which of these best describes person 2's gender identity? -ecstat2,Which of these best describes person 2's working situation? -relat3,What is person 3's relationship to the lead tenant? -age3,What is person 3's age? -sex3,Which of these best describes person 3's gender identity? -ecstat3,Which of these best describes person 3's working situation? -relat4,What is person 4's relationship to the lead tenant? -age4,What is person 4's age? -sex4,Which of these best describes person 4's gender identity? -ecstat4,Which of these best describes person 4's working situation? -relat5,What is person 5's relationship to the lead tenant? -age5,What is person 5's age? -sex5,Which of these best describes person 5's gender identity? -ecstat5,Which of these best describes person 5's working situation? -relat6,What is person 6's relationship to the lead tenant? -age6,What is person 6's age? -sex6,Which of these best describes person 6's gender identity? -ecstat6,Which of these best describes person 6's working situation? -relat7,What is person 7's relationship to the lead tenant? -age7,What is person 7's age? -sex7,Which of these best describes person 7's gender identity? -ecstat7,Which of these best describes person 7's working situation? -relat8,What is person 8's relationship to the lead tenant? -age8,What is person 8's age? -sex8,Which of these best describes person 8's gender identity? -ecstat8,Which of these best describes person 8's working situation? -armedforces,Does anybody in the household have links to the UK armed forces? -leftreg,Is this person still serving in the UK armed forces? -reservist,Was this person seriously injured or ill as a result of serving in the UK armed forces? -preg_occ,Is anybody in the household pregnant? -housingneeds,Does anybody in the household have any disabled access needs? -housingneeds_type,What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms) -housingneeds_a,Disabled access needs a) Fully wheelchair-accessible housing -housingneeds_b,Disabled access needs b) Wheelchair access to essential rooms -housingneeds_c,Disabled access needs c) Level access housing -housingneeds_f,Disabled access needs f) Other disabled access needs -housingneeds_g,Disabled access needs g) No disabled access needs -housingneeds_h,Disabled access needs h) Don't know -housingneeds_other,Do they have any other disabled access needs? -illness,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more? -illness_type_4,Does this person's condition affect their dexterity? -illness_type_5,Does this person's condition affect their learning or understanding or concentrating? -illness_type_2,Does this person's condition affect their hearing? -illness_type_6,Does this person's condition affect their memory? -illness_type_7,Does this person's condition affect their mental health? -illness_type_3,Does this person's condition affect their mobility? -illness_type_9,Does this person's condition affect them socially or behaviourally? -illness_type_8,Does this person's condition affect their stamina or breathing or fatigue? -illness_type_1,Does this person's condition affect their vision? -illness_type_10,Does this person's condition affect them in another way? -layear,How long has the household continuously lived in the local authority area of the new letting? -waityear,How long has the household been on the local authority waiting list for the new letting? -reason,What is the tenant's main reason for the household leaving their last settled home? -reasonother,If 'Other', what was the main reason for leaving their last settled home? -prevten,Where was the household immediately before this letting? -homeless,Did the household experience homelessness immediately before this letting? -ppcodenk,Previous postcode unknown or previous accommodation was temporary -ppostcode_full,What is the postcode of the household's last settled home? -prevloc_label,Previous location LA name -reasonpref,Was the household given reasonable preference by the local authority? -rp_homeless,Reasonable preference reason - They were homeless or about to lose their home (within 56 days) -rp_insan_unsat,Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing -rp_medwel,Reasonable preference reason - They needed to move on medical and welfare reasons (including disability) -rp_hardship,Reasonable preference reason - They needed to move to avoid hardship to themselves or others -rp_dontknow,Reasonable preference reason - Don't Know -cbl,Was the letting made under Choice-Based Lettings (CBL)? -cap,Was the letting made under the Common Allocation Policy (CAP)? -chr,Was the letting made under the Common Housing Register (CHR)? -letting_allocation_none,The letting was not allocated under CBL, CAP, CHR or Accessible Register. -referral,What was the source of referral for this letting? -incref,Was the household income refused? -earnings,How much income does the household have in total? -incfreq,How often does the household receive income? -hb,Is the tenant likely to be receiving any of these housing-related benefits? -has_benefits,Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank -benefits,How much of the household's income is from Universal Credit, state pensions or benefits? -household_charge,Does the household pay rent or other charges for the accommodation? -nocharge,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no -period,How often does the household pay rent and other charges? -is_carehome,Is this accommodation a care home? -chcharge,If this is a care home, how much does the household pay every [time period]? -wchchrg,Weekly care home charge -brent,What is the basic rent? -scharge,What is the service charge? -pscharge,What is the personal service charge? -supcharg,What is the support charge? -tcharge,Total charge to the tenant -hbrentshortfall,After the household has received any housing-related benefits, will they still need to pay for rent and charges? -tshortfall,Estimated outstanding amount -scheme_code,What scheme does this letting belong to? -scheme_service_name,From scheme code, we map to the scheme name -scheme_confidential,Does the scheme contain confidential information? -SCHTYPE,What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing -scheme_registered_under_care_act,Is this scheme registered under the Care Standards Act 2000? -scheme_owning_organisation_name,Which organisation owns the housing stock for this scheme? -scheme_primary_client_group,What client group is this scheme intended for? -scheme_has_other_client_group,Does this scheme provide for another client group? -scheme_secondary_client_group,What is the other client group? -scheme_support_type,What support does this scheme provide? -scheme_intended_stay,Intended length of stay -scheme_created_at,Date scheme was created -location_code,Which location is this letting for? -location_postcode,What is the postcode for this location? -location_name,What is the name of this location? -location_units,How many units are at this location? -location_type_of_unit,What is the most common type of unit at this location? -location_mobility_type,What are the mobility standards for the majority of the units in this location? -location_local_authority,What is the local authority of this postcode? -location_startdate,When did the first property in this location become available under this scheme? diff --git a/config/csv/definitions/lettings_user_download_24_25.csv b/config/csv/definitions/lettings_user_download_24_25.csv deleted file mode 100644 index 70e61c6ee..000000000 --- a/config/csv/definitions/lettings_user_download_24_25.csv +++ /dev/null @@ -1,171 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -is_dpo,Is the user in the assigned_to column the data protection officer? -created_at,Time and date the log was created -updated_by,User who last updated the log -updated_at,Time and date the log was last updated -creation_method,Was the log submitted in-service or via bulk upload? -collection_start_year,Year collection period opened -bulk_upload_id,ID of a set of bulk uploaded logs -assigned_to,User the log is assigned to -owning_organisation_name,Which organisation owns this property? -managing_organisation_name,Which organisation manages this letting? -needstype,What is the needs type? -lettype,What is the letting type? -renewal,Is this letting a renewal? -startdate,What is the tenancy start date? -renttype,What is the rent type? (grouped into SR, IR or AR) -renttype_detail,What is the rent type? -irproduct,Which type of Intermediate Rent is this letting? -irproduct_other,Which 'Other' type of Intermediate Rent is this letting? -lar,Is this a London Affordable Rent letting? -tenancycode,What is the tenant code? -propcode,What is the property reference? -uprn_known,Is the UPRN known? -uprn,If known, property's UPRN -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town or City -county,County -postcode_full,Postcode -la_label,What is the property's local authority? -first_time_property_let_as_social_housing,Is this the first time the property has been let as social housing? -unitletas,What rent product was the property most recently let as? -rsnvac,What is the reason for the property being vacant? -newprop,Is this property new to the social rented sector? -unittype_gn,What type of unit is the property? -builtype,Which type of building is the property? -wchair,Is the property built or adapted to wheelchair-user standards? -beds,How many bedrooms does the property have? -voiddate,What is the void date? -vacdays,Number of days the property was vacant -majorrepairs,Were any major repairs carried out during the void period? -mrcdate,What date were any major repairs completed on? -joint,Is this a joint tenancy? -startertenancy,Is this a starter tenancy? -tenancy,What is the type of tenancy? -tenancyother,If 'Other', what is the type of tenancy? -tenancylength,What is the length of the fixed-term tenancy to the nearest year? -sheltered,Is this letting in sheltered accommodation? -declaration,Has the tenant seen the MHCLG privacy notice? -hhmemb,How many people live in the household at this letting? -refused,Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8 -age1,What is the lead tenant's age? -sex1,Which of these best describes the lead tenant's gender identity? -ethnic_group,What is the lead tenant's ethnic group? -ethnic,Which of these best describes the lead tenant's ethnic background? -nationality_all,What is the lead tenant's nationality? -ecstat1,Which of these best describes the lead tenant's working situation? -relat2,What is person 2's relationship to the lead tenant? -age2,What is person 2's age? -sex2,Which of these best describes person 2's gender identity? -ecstat2,Which of these best describes person 2's working situation? -relat3,What is person 3's relationship to the lead tenant? -age3,What is person 3's age? -sex3,Which of these best describes person 3's gender identity? -ecstat3,Which of these best describes person 3's working situation? -relat4,What is person 4's relationship to the lead tenant? -age4,What is person 4's age? -sex4,Which of these best describes person 4's gender identity? -ecstat4,Which of these best describes person 4's working situation? -relat5,What is person 5's relationship to the lead tenant? -age5,What is person 5's age? -sex5,Which of these best describes person 5's gender identity? -ecstat5,Which of these best describes person 5's working situation? -relat6,What is person 6's relationship to the lead tenant? -age6,What is person 6's age? -sex6,Which of these best describes person 6's gender identity? -ecstat6,Which of these best describes person 6's working situation? -relat7,What is person 7's relationship to the lead tenant? -age7,What is person 7's age? -sex7,Which of these best describes person 7's gender identity? -ecstat7,Which of these best describes person 7's working situation? -relat8,What is person 8's relationship to the lead tenant? -age8,What is person 8's age? -sex8,Which of these best describes person 8's gender identity? -ecstat8,Which of these best describes person 8's working situation? -armedforces,Does anybody in the household have links to the UK armed forces? -leftreg,Is this person still serving in the UK armed forces? -reservist,Was this person seriously injured or ill as a result of serving in the UK armed forces? -preg_occ,Is anybody in the household pregnant? -housingneeds,Does anybody in the household have any disabled access needs? -housingneeds_type,What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms) -housingneeds_a,Disabled access needs a) Fully wheelchair-accessible housing -housingneeds_b,Disabled access needs b) Wheelchair access to essential rooms -housingneeds_c,Disabled access needs c) Level access housing -housingneeds_f,Disabled access needs f) Other disabled access needs -housingneeds_g,Disabled access needs g) No disabled access needs -housingneeds_h,Disabled access needs h) Don't know -housingneeds_other,Do they have any other disabled access needs? -illness,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more? -illness_type_4,Does this person's condition affect their dexterity? -illness_type_5,Does this person's condition affect their learning or understanding or concentrating? -illness_type_2,Does this person's condition affect their hearing? -illness_type_6,Does this person's condition affect their memory? -illness_type_7,Does this person's condition affect their mental health? -illness_type_3,Does this person's condition affect their mobility? -illness_type_9,Does this person's condition affect them socially or behaviourally? -illness_type_8,Does this person's condition affect their stamina or breathing or fatigue? -illness_type_1,Does this person's condition affect their vision? -illness_type_10,Does this person's condition affect them in another way? -layear,How long has the household continuously lived in the local authority area of the new letting? -waityear,How long has the household been on the local authority waiting list for the new letting? -reason,What is the tenant's main reason for the household leaving their last settled home? -reasonother,If 'Other', what was the main reason for leaving their last settled home? -prevten,Where was the household immediately before this letting? -homeless,Did the household experience homelessness immediately before this letting? -ppcodenk,Previous postcode unknown or previous accommodation was temporary -ppostcode_full,What is the postcode of the household's last settled home? -prevloc_label,Previous location LA name -reasonpref,Was the household given reasonable preference by the local authority? -rp_homeless,Reasonable preference reason - They were homeless or about to lose their home (within 56 days) -rp_insan_unsat,Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing -rp_medwel,Reasonable preference reason - They needed to move on medical and welfare reasons (including disability) -rp_hardship,Reasonable preference reason - They needed to move to avoid hardship to themselves or others -rp_dontknow,Reasonable preference reason - Don't Know -cbl,Was the letting made under Choice-Based Lettings (CBL)? -cap,Was the letting made under the Common Allocation Policy (CAP)? -chr,Was the letting made under the Common Housing Register (CHR)? -accessible_register,Was the letting made under the Accessible Register? -letting_allocation_none,The letting was not allocated under CBL, CAP, CHR or Accessible Register. -referral,What was the source of referral for this letting? -incref,Was the household income refused? -earnings,How much income does the household have in total? -incfreq,How often does the household receive income? -hb,Is the tenant likely to be receiving any of these housing-related benefits? -has_benefits,Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank -benefits,How much of the household's income is from Universal Credit, state pensions or benefits? -household_charge,Does the household pay rent or other charges for the accommodation? -nocharge,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no -period,How often does the household pay rent and other charges? -is_carehome,Is this accommodation a care home? -chcharge,If this is a care home, how much does the household pay every [time period]? -wchchrg,Weekly care home charge -brent,What is the basic rent? -scharge,What is the service charge? -pscharge,What is the personal service charge? -supcharg,What is the support charge? -tcharge,Total charge to the tenant -hbrentshortfall,After the household has received any housing-related benefits, will they still need to pay for rent and charges? -tshortfall,Estimated outstanding amount -scheme_code,What scheme does this letting belong to? -scheme_service_name,From scheme code, we map to the scheme name -scheme_confidential,Does the scheme contain confidential information? -SCHTYPE,What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing -scheme_registered_under_care_act,Is this scheme registered under the Care Standards Act 2000? -scheme_owning_organisation_name,Which organisation owns the housing stock for this scheme? -scheme_primary_client_group,What client group is this scheme intended for? -scheme_has_other_client_group,Does this scheme provide for another client group? -scheme_secondary_client_group,What is the other client group? -scheme_support_type,What support does this scheme provide? -scheme_intended_stay,Intended length of stay -scheme_created_at,Date scheme was created -location_code,Which location is this letting for? -location_postcode,What is the postcode for this location? -location_name,What is the name of this location? -location_units,How many units are at this location? -location_type_of_unit,What is the most common type of unit at this location? -location_mobility_type,What are the mobility standards for the majority of the units in this location? -location_local_authority,What is the local authority of this postcode? -location_startdate,When did the first property in this location become available under this scheme? diff --git a/spec/fixtures/variable_definitions/sales_support_download_23_24.csv b/config/csv/definitions/sales_download_23_24.csv similarity index 50% rename from spec/fixtures/variable_definitions/sales_support_download_23_24.csv rename to config/csv/definitions/sales_download_23_24.csv index c5955e2d4..ad596de6c 100644 --- a/spec/fixtures/variable_definitions/sales_support_download_23_24.csv +++ b/config/csv/definitions/sales_download_23_24.csv @@ -134,3 +134,136 @@ MSCHARGE,What are the total monthly leasehold charges for the property? MSCHARGE_VALUE_CHECK,Populated if a soft validation is confirmed. DISCOUNT,What was the percentage discount? GRANT,What was the amount of any loan, grant, discount or subsidy given? +id,Log ID +status,Status of log +duplicate_set_id,ID of a set of duplicate logs +created_at,Time and date the log was created +updated_at,Time and date the log was last updated +old_form_id,The ID on the old service +collection_start_year,Year collection period opened +creation_method,Was the log submitted in-service or via bulk upload? +is_dpo,Is the user in the assigned_to column the data protection officer? +owning_organisation_name,Which organisation owned this property before the sale? +managing_organisation_name,Which organisation reported the sale? +assigned_to,User the log is assigned to +day,Day of sale completion date +month,Month of sale completion date +year,Year of sale completion date +purchid,What is the purchaser code? +ownershipsch,Was this purchase made through an ownership scheme? +type,What is the type of shared ownership/discounted ownership/outright sale? +othtype,If type = 'Other', what is the type of outright sale? +companybuy,Is the buyer a company? +buylivein,Will the buyer(s) live in the property? +jointpur,Is this a joint purchase? +jointmore,Are there more than 2 joint buyers of this property? +beds,How many bedrooms does the property have? +proptype,What type of unit is the property? +builtype,Which type of building is the property? +uprn,What is the UPRN of the property? +uprn_confirmed,We found an address that might be this property. Is this the property address? +address_line1,Address line 1 +address_line2,Address line 2 +town_or_city,Town/City +county,County +pcode1,Part 1 of the property's postcode +pcode2,Part 2 of the property's postcode +la,LA code +la_label,LA name +wchair,Is the property built or adapted to wheelchair-user standards? +noint,Did you interview the buyer to answer these questions? +privacynotice,Has the buyer seen the MHCLG privacy notice? +age1,What is buyer 1's age? +sex1,Which of these best describes buyer 1's gender identity? +ethnic_group,What is buyer 1's ethnic group? +ethnic,Which of the following best describes buyer 1's ethnic background? +national,What is buyer 1's nationality? +ecstat1,Which of these best describes buyer 1's working situation? +buy1livein,Will buyer 1 live in the property? +relat2,What is buyer 2 or person 2's relationship to buyer 1? +age2,What is buyer 2 or person 2's age? +sex2,Which of these best describes buyer 2 or person 2's gender identity? +ethnic_group2,What is buyer 2's ethnic group? +ethnicbuy2,Which of the following best describes buyer 2's ethnic background? +nationalbuy2,What is buyer 2's nationality? +ecstat2,What is buyer 2 or person 2's working situation? +buy2livein,Will buyer 2 live in the property? +hholdcount,Besides the buyer(s), how many other people live or will live in the property? +relat3,What is person 3's relationship to buyer 1? +age3,What is person 3's age? +sex3,What is person 3's gender identity? +ecstat3,What is person 3's working situation? +relat4,What is person 4's relationship to buyer 1? +age4,What is person 4's age? +sex4,What is person 4's gender identity? +ecstat4,What is person 4's working situation? +relat5,What is person 5's relationship to buyer 1? +age5,What is person 5's age? +sex5,What is person 5's gender identity? +ecstat5,What is person 5's working situation? +relat6,What is person 6's relationship to buyer 1? +age6,What is person 6's age? +sex6,What is person 6's gender identity? +ecstat6,What is person 6's working situation? +prevten,What was buyer 1's previous tenure? +ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? +ppostc1,Part 1 of postcode of buyer 1's last settled accommodation +ppostc2,Part 2 of postcode of buyer 1's last settled accommodation +previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? +prevloc,The local authority code of buyer 1's last settled accommodation +prevloc_label,The local authority name of buyer 1's last settled accommodation +pregyrha,Was the buyer registered with their PRP (HA)? +pregother,Was the buyer registered with another PRP (HA)? +pregla,Was the buyer registered with the local authority? +pregghb,Was the buyer registered with a Help to Buy agent? +pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank +buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? +prevtenbuy2,What was buyer 2's previous tenure? +hhregres,Have any of the buyers ever served as a regular in the UK armed forces? +hhregresstill,Is the buyer still serving in the UK armed forces? +armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? +disabled,Does anyone in the household consider themselves to have a disability? +wheel,Does anyone in the household use a wheelchair? +income1nk,Is buyer 1's annual income known? +income1,What is buyer 1's annual income? +inc1mort,Was buyer 1's income used for a mortgage application? +income2nk,Is buyer 2's annual income known? +income2,What is buyer 2's annual income? +inc2mort,Was buyer 2's income used for a mortgage application? +hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? +savingsnk,Is the the total amount the buyers had in savings known? +savings,What is the total amount the buyers had in savings before they paid any deposit for the property? +prevown,Have any of the buyers previously owned a property? +prevshared,Was the previous property under shared ownership? +proplen,How long did the buyer(s) live in the property before purchasing it? +staircase,Is this a staircasing transaction? +stairbought,What percentage of the property has been bought in this staircasing transaction? +stairowned,What percentage of the property do the buyers now own in total? +staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? +resale,Is this a resale? +exday,Day of the exchange of contracts +exmonth,Month of the exchange of contracts +exyear,Year of the exchange of contracts +hoday,Day of the practical completion or handover date +homonth,Month of the practical completion or handover date +hoyear,Year of the practical completion or handover date +lanomagr,Was the household rehoused under a local authority nominations agreement? +soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? +frombeds,How many bedrooms did the buyer's previous property have? +fromprop,What was the previous property type? +socprevten,What was the rent type of buyer's previous tenure? +value,What is the full purchase price? +equity,What was the initial percentage equity stake purchased? +mortgageused,Was a mortgage used to buy this property? +mortgage,What is the mortgage amount? +mortgagelender,What is the name of the mortgage lender? +mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? +mortlen,What is the length of the mortgage in years? +extrabor,Does this include any extra borrowing? +deposit,How much was the cash deposit paid on the property? +cashdis,How much cash discount was given through Social Homebuy? +mrent,What is the basic monthly rent? +has_mscharge,Does the property have any monthly leasehold charges? +mscharge,What are the total monthly leasehold charges for the property? +discount,What was the percentage discount? +grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/spec/fixtures/variable_definitions/sales_support_download_24_25.csv b/config/csv/definitions/sales_download_24_25.csv similarity index 51% rename from spec/fixtures/variable_definitions/sales_support_download_24_25.csv rename to config/csv/definitions/sales_download_24_25.csv index e1144a0dd..cf5641921 100644 --- a/spec/fixtures/variable_definitions/sales_support_download_24_25.csv +++ b/config/csv/definitions/sales_download_24_25.csv @@ -143,3 +143,139 @@ MSCHARGE,What are the total monthly leasehold charges for the property? MSCHARGE_VALUE_CHECK,Populated if a soft validation is confirmed. DISCOUNT,What was the percentage discount? GRANT,What was the amount of any loan, grant, discount or subsidy given? +id,Log ID +status,Status of log +duplicate_set_id,ID of a set of duplicate logs +created_at,Time and date the log was created +updated_at,Time and date the log was last updated +old_form_id,The ID on the old service +collection_start_year,Year collection period opened +creation_method,Was the log submitted in-service or via bulk upload? +is_dpo,Is the user in the assigned_to column the data protection officer? +owning_organisation_name,Which organisation owned this property before the sale? +managing_organisation_name,Which organisation reported the sale? +assigned_to,User the log is assigned to +day,Day of sale completion date +month,Month of sale completion date +year,Year of sale completion date +purchid,What is the purchaser code? +ownershipsch,Was this purchase made through an ownership scheme? +type,What is the type of shared ownership/discounted ownership/outright sale? +othtype,If type = 'Other', what is the type of outright sale? +companybuy,Is the buyer a company? +buylivein,Will the buyer(s) live in the property? +jointpur,Is this a joint purchase? +jointmore,Are there more than 2 joint buyers of this property? +beds,How many bedrooms does the property have? +proptype,What type of unit is the property? +builtype,Which type of building is the property? +uprn,What is the UPRN of the property? +uprn_confirmed,We found an address that might be this property. Is this the property address? +address_line1_input,Address line 1 input from address matching feature +postcode_full_input,Postcode input from address matching feature +uprn_selection,UPRN of the address selected +address_line1,Address line 1 +address_line2,Address line 2 +town_or_city,Town/City +county,County +pcode1,Part 1 of the property's postcode +pcode2,Part 2 of the property's postcode +la,LA code +la_label,LA name +wchair,Is the property built or adapted to wheelchair-user standards? +noint,Did you interview the buyer to answer these questions? +privacynotice,Has the buyer seen the MHCLG privacy notice? +age1,What is buyer 1's age? +sex1,Which of these best describes buyer 1's gender identity? +ethnic_group,What is buyer 1's ethnic group? +ethnic,Which of the following best describes buyer 1's ethnic background? +nationality_all,What is buyer 1's nationality? +ecstat1,Which of these best describes buyer 1's working situation? +buy1livein,Will buyer 1 live in the property? +relat2,What is buyer 2 or person 2's relationship to buyer 1? +age2,What is buyer 2 or person 2's age? +sex2,Which of these best describes buyer 2 or person 2's gender identity? +ethnic_group2,What is buyer 2's ethnic group? +ethnicbuy2,Which of the following best describes buyer 2's ethnic background? +nationality_all_buyer2,What is buyer 2's nationality? +ecstat2,What is buyer 2 or person 2's working situation? +buy2livein,Will buyer 2 live in the property? +hholdcount,Besides the buyer(s), how many other people live or will live in the property? +relat3,What is person 3's relationship to buyer 1? +age3,What is person 3's age? +sex3,What is person 3's gender identity? +ecstat3,What is person 3's working situation? +relat4,What is person 4's relationship to buyer 1? +age4,What is person 4's age? +sex4,What is person 4's gender identity? +ecstat4,What is person 4's working situation? +relat5,What is person 5's relationship to buyer 1? +age5,What is person 5's age? +sex5,What is person 5's gender identity? +ecstat5,What is person 5's working situation? +relat6,What is person 6's relationship to buyer 1? +age6,What is person 6's age? +sex6,What is person 6's gender identity? +ecstat6,What is person 6's working situation? +prevten,What was buyer 1's previous tenure? +ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? +ppostc1,Part 1 of postcode of buyer 1's last settled accommodation +ppostc2,Part 2 of postcode of buyer 1's last settled accommodation +previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? +prevloc,The local authority code of buyer 1's last settled accommodation +prevloc_label,The local authority name of buyer 1's last settled accommodation +pregyrha,Was the buyer registered with their PRP (HA)? +pregother,Was the buyer registered with another PRP (HA)? +pregla,Was the buyer registered with the local authority? +pregghb,Was the buyer registered with a Help to Buy agent? +pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank +buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? +prevtenbuy2,What was buyer 2's previous tenure? +hhregres,Have any of the buyers ever served as a regular in the UK armed forces? +hhregresstill,Is the buyer still serving in the UK armed forces? +armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? +disabled,Does anyone in the household consider themselves to have a disability? +wheel,Does anyone in the household use a wheelchair? +income1nk,Is buyer 1's annual income known? +income1,What is buyer 1's annual income? +inc1mort,Was buyer 1's income used for a mortgage application? +income2nk,Is buyer 2's annual income known? +income2,What is buyer 2's annual income? +inc2mort,Was buyer 2's income used for a mortgage application? +hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? +savingsnk,Is the the total amount the buyers had in savings known? +savings,What is the total amount the buyers had in savings before they paid any deposit for the property? +prevown,Have any of the buyers previously owned a property? +prevshared,Was the previous property under shared ownership? +proplen,How long did the buyer(s) live in the property before purchasing it? +staircase,Is this a staircasing transaction? +stairbought,What percentage of the property has been bought in this staircasing transaction? +stairowned,What percentage of the property do the buyers now own in total? +staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? +resale,Is this a resale? +exday,Day of the exchange of contracts +exmonth,Month of the exchange of contracts +exyear,Year of the exchange of contracts +hoday,Day of the practical completion or handover date +homonth,Month of the practical completion or handover date +hoyear,Year of the practical completion or handover date +lanomagr,Was the household rehoused under a local authority nominations agreement? +soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? +frombeds,How many bedrooms did the buyer's previous property have? +fromprop,What was the previous property type? +socprevten,What was the rent type of buyer's previous tenure? +value,What is the full purchase price? +equity,What was the initial percentage equity stake purchased? +mortgageused,Was a mortgage used to buy this property? +mortgage,What is the mortgage amount? +mortgagelender,What is the name of the mortgage lender? +mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? +mortlen,What is the length of the mortgage in years? +extrabor,Does this include any extra borrowing? +deposit,How much was the cash deposit paid on the property? +cashdis,How much cash discount was given through Social Homebuy? +mrent,What is the basic monthly rent? +has_mscharge,Does the property have any monthly leasehold charges? +mscharge,What are the total monthly leasehold charges for the property? +discount,What was the percentage discount? +grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/config/csv/definitions/sales_user_download_23_24.csv b/config/csv/definitions/sales_user_download_23_24.csv deleted file mode 100644 index c1334130d..000000000 --- a/config/csv/definitions/sales_user_download_23_24.csv +++ /dev/null @@ -1,133 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -created_at,Time and date the log was created -updated_at,Time and date the log was last updated -old_form_id,The ID on the old service -collection_start_year,Year collection period opened -creation_method,Was the log submitted in-service or via bulk upload? -is_dpo,Is the user in the assigned_to column the data protection officer? -owning_organisation_name,Which organisation owned this property before the sale? -managing_organisation_name,Which organisation reported the sale? -assigned_to,User the log is assigned to -day,Day of sale completion date -month,Month of sale completion date -year,Year of sale completion date -purchid,What is the purchaser code? -ownershipsch,Was this purchase made through an ownership scheme? -type,What is the type of shared ownership/discounted ownership/outright sale? -othtype,If type = 'Other', what is the type of outright sale? -companybuy,Is the buyer a company? -buylivein,Will the buyer(s) live in the property? -jointpur,Is this a joint purchase? -jointmore,Are there more than 2 joint buyers of this property? -beds,How many bedrooms does the property have? -proptype,What type of unit is the property? -builtype,Which type of building is the property? -uprn,What is the UPRN of the property? -uprn_confirmed,We found an address that might be this property. Is this the property address? -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town/City -county,County -pcode1,Part 1 of the property's postcode -pcode2,Part 2 of the property's postcode -la,LA code -la_label,LA name -wchair,Is the property built or adapted to wheelchair-user standards? -noint,Did you interview the buyer to answer these questions? -privacynotice,Has the buyer seen the MHCLG privacy notice? -age1,What is buyer 1's age? -sex1,Which of these best describes buyer 1's gender identity? -ethnic_group,What is buyer 1's ethnic group? -ethnic,Which of the following best describes buyer 1's ethnic background? -national,What is buyer 1's nationality? -ecstat1,Which of these best describes buyer 1's working situation? -buy1livein,Will buyer 1 live in the property? -relat2,What is buyer 2 or person 2's relationship to buyer 1? -age2,What is buyer 2 or person 2's age? -sex2,Which of these best describes buyer 2 or person 2's gender identity? -ethnic_group2,What is buyer 2's ethnic group? -ethnicbuy2,Which of the following best describes buyer 2's ethnic background? -nationalbuy2,What is buyer 2's nationality? -ecstat2,What is buyer 2 or person 2's working situation? -buy2livein,Will buyer 2 live in the property? -hholdcount,Besides the buyer(s), how many other people live or will live in the property? -relat3,What is person 3's relationship to buyer 1? -age3,What is person 3's age? -sex3,What is person 3's gender identity? -ecstat3,What is person 3's working situation? -relat4,What is person 4's relationship to buyer 1? -age4,What is person 4's age? -sex4,What is person 4's gender identity? -ecstat4,What is person 4's working situation? -relat5,What is person 5's relationship to buyer 1? -age5,What is person 5's age? -sex5,What is person 5's gender identity? -ecstat5,What is person 5's working situation? -relat6,What is person 6's relationship to buyer 1? -age6,What is person 6's age? -sex6,What is person 6's gender identity? -ecstat6,What is person 6's working situation? -prevten,What was buyer 1's previous tenure? -ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? -ppostc1,Part 1 of postcode of buyer 1's last settled accommodation -ppostc2,Part 2 of postcode of buyer 1's last settled accommodation -previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? -prevloc,The local authority code of buyer 1's last settled accommodation -prevloc_label,The local authority name of buyer 1's last settled accommodation -pregyrha,Was the buyer registered with their PRP (HA)? -pregother,Was the buyer registered with another PRP (HA)? -pregla,Was the buyer registered with the local authority? -pregghb,Was the buyer registered with a Help to Buy agent? -pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank -buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? -prevtenbuy2,What was buyer 2's previous tenure? -hhregres,Have any of the buyers ever served as a regular in the UK armed forces? -hhregresstill,Is the buyer still serving in the UK armed forces? -armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? -disabled,Does anyone in the household consider themselves to have a disability? -wheel,Does anyone in the household use a wheelchair? -income1nk,Is buyer 1's annual income known? -income1,What is buyer 1's annual income? -inc1mort,Was buyer 1's income used for a mortgage application? -income2nk,Is buyer 2's annual income known? -income2,What is buyer 2's annual income? -inc2mort,Was buyer 2's income used for a mortgage application? -hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? -savingsnk,Is the the total amount the buyers had in savings known? -savings,What is the total amount the buyers had in savings before they paid any deposit for the property? -prevown,Have any of the buyers previously owned a property? -prevshared,Was the previous property under shared ownership? -proplen,How long did the buyer(s) live in the property before purchasing it? -staircase,Is this a staircasing transaction? -stairbought,What percentage of the property has been bought in this staircasing transaction? -stairowned,What percentage of the property do the buyers now own in total? -staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? -resale,Is this a resale? -exday,Day of the exchange of contracts -exmonth,Month of the exchange of contracts -exyear,Year of the exchange of contracts -hoday,Day of the practical completion or handover date -homonth,Month of the practical completion or handover date -hoyear,Year of the practical completion or handover date -lanomagr,Was the household rehoused under a local authority nominations agreement? -soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? -frombeds,How many bedrooms did the buyer's previous property have? -fromprop,What was the previous property type? -socprevten,What was the rent type of buyer's previous tenure? -value,What is the full purchase price? -equity,What was the initial percentage equity stake purchased? -mortgageused,Was a mortgage used to buy this property? -mortgage,What is the mortgage amount? -mortgagelender,What is the name of the mortgage lender? -mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? -mortlen,What is the length of the mortgage in years? -extrabor,Does this include any extra borrowing? -deposit,How much was the cash deposit paid on the property? -cashdis,How much cash discount was given through Social Homebuy? -mrent,What is the basic monthly rent? -has_mscharge,Does the property have any monthly leasehold charges? -mscharge,What are the total monthly leasehold charges for the property? -discount,What was the percentage discount? -grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/config/csv/definitions/sales_user_download_24_25.csv b/config/csv/definitions/sales_user_download_24_25.csv deleted file mode 100644 index f52018f6e..000000000 --- a/config/csv/definitions/sales_user_download_24_25.csv +++ /dev/null @@ -1,136 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -created_at,Time and date the log was created -updated_at,Time and date the log was last updated -old_form_id,The ID on the old service -collection_start_year,Year collection period opened -creation_method,Was the log submitted in-service or via bulk upload? -is_dpo,Is the user in the assigned_to column the data protection officer? -owning_organisation_name,Which organisation owned this property before the sale? -managing_organisation_name,Which organisation reported the sale? -assigned_to,User the log is assigned to -day,Day of sale completion date -month,Month of sale completion date -year,Year of sale completion date -purchid,What is the purchaser code? -ownershipsch,Was this purchase made through an ownership scheme? -type,What is the type of shared ownership/discounted ownership/outright sale? -othtype,If type = 'Other', what is the type of outright sale? -companybuy,Is the buyer a company? -buylivein,Will the buyer(s) live in the property? -jointpur,Is this a joint purchase? -jointmore,Are there more than 2 joint buyers of this property? -beds,How many bedrooms does the property have? -proptype,What type of unit is the property? -builtype,Which type of building is the property? -uprn,What is the UPRN of the property? -uprn_confirmed,We found an address that might be this property. Is this the property address? -address_line1_input,Address line 1 input from address matching feature -postcode_full_input,Postcode input from address matching feature -uprn_selection,UPRN of the address selected -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town/City -county,County -pcode1,Part 1 of the property's postcode -pcode2,Part 2 of the property's postcode -la,LA code -la_label,LA name -wchair,Is the property built or adapted to wheelchair-user standards? -noint,Did you interview the buyer to answer these questions? -privacynotice,Has the buyer seen the MHCLG privacy notice? -age1,What is buyer 1's age? -sex1,Which of these best describes buyer 1's gender identity? -ethnic_group,What is buyer 1's ethnic group? -ethnic,Which of the following best describes buyer 1's ethnic background? -nationality_all,What is buyer 1's nationality? -ecstat1,Which of these best describes buyer 1's working situation? -buy1livein,Will buyer 1 live in the property? -relat2,What is buyer 2 or person 2's relationship to buyer 1? -age2,What is buyer 2 or person 2's age? -sex2,Which of these best describes buyer 2 or person 2's gender identity? -ethnic_group2,What is buyer 2's ethnic group? -ethnicbuy2,Which of the following best describes buyer 2's ethnic background? -nationality_all_buyer2,What is buyer 2's nationality? -ecstat2,What is buyer 2 or person 2's working situation? -buy2livein,Will buyer 2 live in the property? -hholdcount,Besides the buyer(s), how many other people live or will live in the property? -relat3,What is person 3's relationship to buyer 1? -age3,What is person 3's age? -sex3,What is person 3's gender identity? -ecstat3,What is person 3's working situation? -relat4,What is person 4's relationship to buyer 1? -age4,What is person 4's age? -sex4,What is person 4's gender identity? -ecstat4,What is person 4's working situation? -relat5,What is person 5's relationship to buyer 1? -age5,What is person 5's age? -sex5,What is person 5's gender identity? -ecstat5,What is person 5's working situation? -relat6,What is person 6's relationship to buyer 1? -age6,What is person 6's age? -sex6,What is person 6's gender identity? -ecstat6,What is person 6's working situation? -prevten,What was buyer 1's previous tenure? -ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? -ppostc1,Part 1 of postcode of buyer 1's last settled accommodation -ppostc2,Part 2 of postcode of buyer 1's last settled accommodation -previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? -prevloc,The local authority code of buyer 1's last settled accommodation -prevloc_label,The local authority name of buyer 1's last settled accommodation -pregyrha,Was the buyer registered with their PRP (HA)? -pregother,Was the buyer registered with another PRP (HA)? -pregla,Was the buyer registered with the local authority? -pregghb,Was the buyer registered with a Help to Buy agent? -pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank -buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? -prevtenbuy2,What was buyer 2's previous tenure? -hhregres,Have any of the buyers ever served as a regular in the UK armed forces? -hhregresstill,Is the buyer still serving in the UK armed forces? -armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? -disabled,Does anyone in the household consider themselves to have a disability? -wheel,Does anyone in the household use a wheelchair? -income1nk,Is buyer 1's annual income known? -income1,What is buyer 1's annual income? -inc1mort,Was buyer 1's income used for a mortgage application? -income2nk,Is buyer 2's annual income known? -income2,What is buyer 2's annual income? -inc2mort,Was buyer 2's income used for a mortgage application? -hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? -savingsnk,Is the the total amount the buyers had in savings known? -savings,What is the total amount the buyers had in savings before they paid any deposit for the property? -prevown,Have any of the buyers previously owned a property? -prevshared,Was the previous property under shared ownership? -proplen,How long did the buyer(s) live in the property before purchasing it? -staircase,Is this a staircasing transaction? -stairbought,What percentage of the property has been bought in this staircasing transaction? -stairowned,What percentage of the property do the buyers now own in total? -staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? -resale,Is this a resale? -exday,Day of the exchange of contracts -exmonth,Month of the exchange of contracts -exyear,Year of the exchange of contracts -hoday,Day of the practical completion or handover date -homonth,Month of the practical completion or handover date -hoyear,Year of the practical completion or handover date -lanomagr,Was the household rehoused under a local authority nominations agreement? -soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? -frombeds,How many bedrooms did the buyer's previous property have? -fromprop,What was the previous property type? -socprevten,What was the rent type of buyer's previous tenure? -value,What is the full purchase price? -equity,What was the initial percentage equity stake purchased? -mortgageused,Was a mortgage used to buy this property? -mortgage,What is the mortgage amount? -mortgagelender,What is the name of the mortgage lender? -mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? -mortlen,What is the length of the mortgage in years? -extrabor,Does this include any extra borrowing? -deposit,How much was the cash deposit paid on the property? -cashdis,How much cash discount was given through Social Homebuy? -mrent,What is the basic monthly rent? -has_mscharge,Does the property have any monthly leasehold charges? -mscharge,What are the total monthly leasehold charges for the property? -discount,What was the percentage discount? -grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb index 7d515b712..accc01f73 100644 --- a/config/initializers/rails_admin.rb +++ b/config/initializers/rails_admin.rb @@ -28,6 +28,10 @@ RailsAdmin.config do |config| config.show_gravatar = false config.included_models = %w[LogValidation CsvVariableDefinition] + config.model "LogValidation" do + label "Log Validation" + end + config.model "CsvVariableDefinition" do label "CSV Variable Definition" edit do @@ -41,11 +45,6 @@ RailsAdmin.config do |config| end end - config.model "LogValidation" do - label "Log Validation" - hide - end - config.actions do dashboard # mandatory index # mandatory diff --git a/spec/fixtures/variable_definitions/lettings_support_download_23_24.csv b/spec/fixtures/variable_definitions/lettings_download_23_24.csv similarity index 100% rename from spec/fixtures/variable_definitions/lettings_support_download_23_24.csv rename to spec/fixtures/variable_definitions/lettings_download_23_24.csv diff --git a/spec/fixtures/variable_definitions/lettings_support_download_24_25.csv b/spec/fixtures/variable_definitions/lettings_download_24_25.csv similarity index 100% rename from spec/fixtures/variable_definitions/lettings_support_download_24_25.csv rename to spec/fixtures/variable_definitions/lettings_download_24_25.csv diff --git a/spec/fixtures/variable_definitions/lettings_user_download_23_24.csv b/spec/fixtures/variable_definitions/lettings_user_download_23_24.csv deleted file mode 100644 index 33313fbe7..000000000 --- a/spec/fixtures/variable_definitions/lettings_user_download_23_24.csv +++ /dev/null @@ -1,170 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -is_dpo,Is the user in the assigned_to column the data protection officer? -created_at,Time and date the log was created -updated_by,User who last updated the log -updated_at,Time and date the log was last updated -creation_method,Was the log submitted in-service or via bulk upload? -collection_start_year,Year collection period opened -assigned_to,User the log is assigned to -owning_organisation_name,Which organisation owns this property? -managing_organisation_name,Which organisation manages this letting? -needstype,What is the needs type? -lettype,What is the letting type? -renewal,Is this letting a renewal? -startdate,What is the tenancy start date? -renttype,What is the rent type? (grouped into SR, IR or AR) -renttype_detail,What is the rent type? -irproduct,Which type of Intermediate Rent is this letting? -irproduct_other,Which 'Other' type of Intermediate Rent is this letting? -lar,Is this a London Affordable Rent letting? -tenancycode,What is the tenant code? -propcode,What is the property reference? -uprn_known,Is the UPRN known? -uprn,If known, property's UPRN -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town or City -county,County -postcode_full,Postcode -la_label,What is the property's local authority? -first_time_property_let_as_social_housing,Is this the first time the property has been let as social housing? -unitletas,What rent product was the property most recently let as? -rsnvac,What is the reason for the property being vacant? -newprop,Is this property new to the social rented sector? -offered,How many times was the property offered between becoming vacant and this letting? -unittype_gn,What type of unit is the property? -builtype,Which type of building is the property? -wchair,Is the property built or adapted to wheelchair-user standards? -beds,How many bedrooms does the property have? -voiddate,What is the void date? -vacdays,Number of days the property was vacant -majorrepairs,Were any major repairs carried out during the void period? -mrcdate,What date were any major repairs completed on? -joint,Is this a joint tenancy? -startertenancy,Is this a starter tenancy? -tenancy,What is the type of tenancy? -tenancyother,If 'Other', what is the type of tenancy? -tenancylength,What is the length of the fixed-term tenancy to the nearest year? -sheltered,Is this letting in sheltered accommodation? -declaration,Has the tenant seen the MHCLG privacy notice? -hhmemb,How many people live in the household at this letting? -refused,Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8 -age1,What is the lead tenant's age? -sex1,Which of these best describes the lead tenant's gender identity? -ethnic_group,What is the lead tenant's ethnic group? -ethnic,Which of these best describes the lead tenant's ethnic background? -national,What is the lead tenant's nationality? -ecstat1,Which of these best describes the lead tenant's working situation? -relat2,What is person 2's relationship to the lead tenant? -age2,What is person 2's age? -sex2,Which of these best describes person 2's gender identity? -ecstat2,Which of these best describes person 2's working situation? -relat3,What is person 3's relationship to the lead tenant? -age3,What is person 3's age? -sex3,Which of these best describes person 3's gender identity? -ecstat3,Which of these best describes person 3's working situation? -relat4,What is person 4's relationship to the lead tenant? -age4,What is person 4's age? -sex4,Which of these best describes person 4's gender identity? -ecstat4,Which of these best describes person 4's working situation? -relat5,What is person 5's relationship to the lead tenant? -age5,What is person 5's age? -sex5,Which of these best describes person 5's gender identity? -ecstat5,Which of these best describes person 5's working situation? -relat6,What is person 6's relationship to the lead tenant? -age6,What is person 6's age? -sex6,Which of these best describes person 6's gender identity? -ecstat6,Which of these best describes person 6's working situation? -relat7,What is person 7's relationship to the lead tenant? -age7,What is person 7's age? -sex7,Which of these best describes person 7's gender identity? -ecstat7,Which of these best describes person 7's working situation? -relat8,What is person 8's relationship to the lead tenant? -age8,What is person 8's age? -sex8,Which of these best describes person 8's gender identity? -ecstat8,Which of these best describes person 8's working situation? -armedforces,Does anybody in the household have links to the UK armed forces? -leftreg,Is this person still serving in the UK armed forces? -reservist,Was this person seriously injured or ill as a result of serving in the UK armed forces? -preg_occ,Is anybody in the household pregnant? -housingneeds,Does anybody in the household have any disabled access needs? -housingneeds_type,What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms) -housingneeds_a,Disabled access needs a) Fully wheelchair-accessible housing -housingneeds_b,Disabled access needs b) Wheelchair access to essential rooms -housingneeds_c,Disabled access needs c) Level access housing -housingneeds_f,Disabled access needs f) Other disabled access needs -housingneeds_g,Disabled access needs g) No disabled access needs -housingneeds_h,Disabled access needs h) Don't know -housingneeds_other,Do they have any other disabled access needs? -illness,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more? -illness_type_4,Does this person's condition affect their dexterity? -illness_type_5,Does this person's condition affect their learning or understanding or concentrating? -illness_type_2,Does this person's condition affect their hearing? -illness_type_6,Does this person's condition affect their memory? -illness_type_7,Does this person's condition affect their mental health? -illness_type_3,Does this person's condition affect their mobility? -illness_type_9,Does this person's condition affect them socially or behaviourally? -illness_type_8,Does this person's condition affect their stamina or breathing or fatigue? -illness_type_1,Does this person's condition affect their vision? -illness_type_10,Does this person's condition affect them in another way? -layear,How long has the household continuously lived in the local authority area of the new letting? -waityear,How long has the household been on the local authority waiting list for the new letting? -reason,What is the tenant's main reason for the household leaving their last settled home? -reasonother,If 'Other', what was the main reason for leaving their last settled home? -prevten,Where was the household immediately before this letting? -homeless,Did the household experience homelessness immediately before this letting? -ppcodenk,Previous postcode unknown or previous accommodation was temporary -ppostcode_full,What is the postcode of the household's last settled home? -prevloc_label,Previous location LA name -reasonpref,Was the household given reasonable preference by the local authority? -rp_homeless,Reasonable preference reason - They were homeless or about to lose their home (within 56 days) -rp_insan_unsat,Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing -rp_medwel,Reasonable preference reason - They needed to move on medical and welfare reasons (including disability) -rp_hardship,Reasonable preference reason - They needed to move to avoid hardship to themselves or others -rp_dontknow,Reasonable preference reason - Don't Know -cbl,Was the letting made under Choice-Based Lettings (CBL)? -cap,Was the letting made under the Common Allocation Policy (CAP)? -chr,Was the letting made under the Common Housing Register (CHR)? -letting_allocation_none,The letting was not allocated under CBL, CAP, CHR or Accessible Register. -referral,What was the source of referral for this letting? -incref,Was the household income refused? -earnings,How much income does the household have in total? -incfreq,How often does the household receive income? -hb,Is the tenant likely to be receiving any of these housing-related benefits? -has_benefits,Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank -benefits,How much of the household's income is from Universal Credit, state pensions or benefits? -household_charge,Does the household pay rent or other charges for the accommodation? -nocharge,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no -period,How often does the household pay rent and other charges? -is_carehome,Is this accommodation a care home? -chcharge,If this is a care home, how much does the household pay every [time period]? -wchchrg,Weekly care home charge -brent,What is the basic rent? -scharge,What is the service charge? -pscharge,What is the personal service charge? -supcharg,What is the support charge? -tcharge,Total charge to the tenant -hbrentshortfall,After the household has received any housing-related benefits, will they still need to pay for rent and charges? -tshortfall,Estimated outstanding amount -scheme_code,What scheme does this letting belong to? -scheme_service_name,From scheme code, we map to the scheme name -scheme_confidential,Does the scheme contain confidential information? -SCHTYPE,What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing -scheme_registered_under_care_act,Is this scheme registered under the Care Standards Act 2000? -scheme_owning_organisation_name,Which organisation owns the housing stock for this scheme? -scheme_primary_client_group,What client group is this scheme intended for? -scheme_has_other_client_group,Does this scheme provide for another client group? -scheme_secondary_client_group,What is the other client group? -scheme_support_type,What support does this scheme provide? -scheme_intended_stay,Intended length of stay -scheme_created_at,Date scheme was created -location_code,Which location is this letting for? -location_postcode,What is the postcode for this location? -location_name,What is the name of this location? -location_units,How many units are at this location? -location_type_of_unit,What is the most common type of unit at this location? -location_mobility_type,What are the mobility standards for the majority of the units in this location? -location_local_authority,What is the local authority of this postcode? -location_startdate,When did the first property in this location become available under this scheme? diff --git a/spec/fixtures/variable_definitions/lettings_user_download_24_25.csv b/spec/fixtures/variable_definitions/lettings_user_download_24_25.csv deleted file mode 100644 index 70e61c6ee..000000000 --- a/spec/fixtures/variable_definitions/lettings_user_download_24_25.csv +++ /dev/null @@ -1,171 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -is_dpo,Is the user in the assigned_to column the data protection officer? -created_at,Time and date the log was created -updated_by,User who last updated the log -updated_at,Time and date the log was last updated -creation_method,Was the log submitted in-service or via bulk upload? -collection_start_year,Year collection period opened -bulk_upload_id,ID of a set of bulk uploaded logs -assigned_to,User the log is assigned to -owning_organisation_name,Which organisation owns this property? -managing_organisation_name,Which organisation manages this letting? -needstype,What is the needs type? -lettype,What is the letting type? -renewal,Is this letting a renewal? -startdate,What is the tenancy start date? -renttype,What is the rent type? (grouped into SR, IR or AR) -renttype_detail,What is the rent type? -irproduct,Which type of Intermediate Rent is this letting? -irproduct_other,Which 'Other' type of Intermediate Rent is this letting? -lar,Is this a London Affordable Rent letting? -tenancycode,What is the tenant code? -propcode,What is the property reference? -uprn_known,Is the UPRN known? -uprn,If known, property's UPRN -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town or City -county,County -postcode_full,Postcode -la_label,What is the property's local authority? -first_time_property_let_as_social_housing,Is this the first time the property has been let as social housing? -unitletas,What rent product was the property most recently let as? -rsnvac,What is the reason for the property being vacant? -newprop,Is this property new to the social rented sector? -unittype_gn,What type of unit is the property? -builtype,Which type of building is the property? -wchair,Is the property built or adapted to wheelchair-user standards? -beds,How many bedrooms does the property have? -voiddate,What is the void date? -vacdays,Number of days the property was vacant -majorrepairs,Were any major repairs carried out during the void period? -mrcdate,What date were any major repairs completed on? -joint,Is this a joint tenancy? -startertenancy,Is this a starter tenancy? -tenancy,What is the type of tenancy? -tenancyother,If 'Other', what is the type of tenancy? -tenancylength,What is the length of the fixed-term tenancy to the nearest year? -sheltered,Is this letting in sheltered accommodation? -declaration,Has the tenant seen the MHCLG privacy notice? -hhmemb,How many people live in the household at this letting? -refused,Where household characteristics have a 'Refused' option for some or all of: AGE1-AGE8, SEX1-SEX8, RELAT2-RELAT8, ECSTAT1-ECSTAT8 -age1,What is the lead tenant's age? -sex1,Which of these best describes the lead tenant's gender identity? -ethnic_group,What is the lead tenant's ethnic group? -ethnic,Which of these best describes the lead tenant's ethnic background? -nationality_all,What is the lead tenant's nationality? -ecstat1,Which of these best describes the lead tenant's working situation? -relat2,What is person 2's relationship to the lead tenant? -age2,What is person 2's age? -sex2,Which of these best describes person 2's gender identity? -ecstat2,Which of these best describes person 2's working situation? -relat3,What is person 3's relationship to the lead tenant? -age3,What is person 3's age? -sex3,Which of these best describes person 3's gender identity? -ecstat3,Which of these best describes person 3's working situation? -relat4,What is person 4's relationship to the lead tenant? -age4,What is person 4's age? -sex4,Which of these best describes person 4's gender identity? -ecstat4,Which of these best describes person 4's working situation? -relat5,What is person 5's relationship to the lead tenant? -age5,What is person 5's age? -sex5,Which of these best describes person 5's gender identity? -ecstat5,Which of these best describes person 5's working situation? -relat6,What is person 6's relationship to the lead tenant? -age6,What is person 6's age? -sex6,Which of these best describes person 6's gender identity? -ecstat6,Which of these best describes person 6's working situation? -relat7,What is person 7's relationship to the lead tenant? -age7,What is person 7's age? -sex7,Which of these best describes person 7's gender identity? -ecstat7,Which of these best describes person 7's working situation? -relat8,What is person 8's relationship to the lead tenant? -age8,What is person 8's age? -sex8,Which of these best describes person 8's gender identity? -ecstat8,Which of these best describes person 8's working situation? -armedforces,Does anybody in the household have links to the UK armed forces? -leftreg,Is this person still serving in the UK armed forces? -reservist,Was this person seriously injured or ill as a result of serving in the UK armed forces? -preg_occ,Is anybody in the household pregnant? -housingneeds,Does anybody in the household have any disabled access needs? -housingneeds_type,What access needs do they have? (Fully wheelchair-accessible housing, Level access housing or Wheelchair access to essential rooms) -housingneeds_a,Disabled access needs a) Fully wheelchair-accessible housing -housingneeds_b,Disabled access needs b) Wheelchair access to essential rooms -housingneeds_c,Disabled access needs c) Level access housing -housingneeds_f,Disabled access needs f) Other disabled access needs -housingneeds_g,Disabled access needs g) No disabled access needs -housingneeds_h,Disabled access needs h) Don't know -housingneeds_other,Do they have any other disabled access needs? -illness,Does anybody in the household have a physical or mental health condition (or other illness) expected to last 12 months or more? -illness_type_4,Does this person's condition affect their dexterity? -illness_type_5,Does this person's condition affect their learning or understanding or concentrating? -illness_type_2,Does this person's condition affect their hearing? -illness_type_6,Does this person's condition affect their memory? -illness_type_7,Does this person's condition affect their mental health? -illness_type_3,Does this person's condition affect their mobility? -illness_type_9,Does this person's condition affect them socially or behaviourally? -illness_type_8,Does this person's condition affect their stamina or breathing or fatigue? -illness_type_1,Does this person's condition affect their vision? -illness_type_10,Does this person's condition affect them in another way? -layear,How long has the household continuously lived in the local authority area of the new letting? -waityear,How long has the household been on the local authority waiting list for the new letting? -reason,What is the tenant's main reason for the household leaving their last settled home? -reasonother,If 'Other', what was the main reason for leaving their last settled home? -prevten,Where was the household immediately before this letting? -homeless,Did the household experience homelessness immediately before this letting? -ppcodenk,Previous postcode unknown or previous accommodation was temporary -ppostcode_full,What is the postcode of the household's last settled home? -prevloc_label,Previous location LA name -reasonpref,Was the household given reasonable preference by the local authority? -rp_homeless,Reasonable preference reason - They were homeless or about to lose their home (within 56 days) -rp_insan_unsat,Reasonable preference reason - They were living in insanitary, overcrowded or unisatisfactory housing -rp_medwel,Reasonable preference reason - They needed to move on medical and welfare reasons (including disability) -rp_hardship,Reasonable preference reason - They needed to move to avoid hardship to themselves or others -rp_dontknow,Reasonable preference reason - Don't Know -cbl,Was the letting made under Choice-Based Lettings (CBL)? -cap,Was the letting made under the Common Allocation Policy (CAP)? -chr,Was the letting made under the Common Housing Register (CHR)? -accessible_register,Was the letting made under the Accessible Register? -letting_allocation_none,The letting was not allocated under CBL, CAP, CHR or Accessible Register. -referral,What was the source of referral for this letting? -incref,Was the household income refused? -earnings,How much income does the household have in total? -incfreq,How often does the household receive income? -hb,Is the tenant likely to be receiving any of these housing-related benefits? -has_benefits,Does the tenant receive housing-related benefits? Yes if hb = Universal Credit housing element or Housing benefit, No if hb = Don't Know, Neither, Tenant prefers not to say or blank -benefits,How much of the household's income is from Universal Credit, state pensions or benefits? -household_charge,Does the household pay rent or other charges for the accommodation? -nocharge,Does the household pay rent or other charges for the accommodation? - flag for when household_charge is answered no -period,How often does the household pay rent and other charges? -is_carehome,Is this accommodation a care home? -chcharge,If this is a care home, how much does the household pay every [time period]? -wchchrg,Weekly care home charge -brent,What is the basic rent? -scharge,What is the service charge? -pscharge,What is the personal service charge? -supcharg,What is the support charge? -tcharge,Total charge to the tenant -hbrentshortfall,After the household has received any housing-related benefits, will they still need to pay for rent and charges? -tshortfall,Estimated outstanding amount -scheme_code,What scheme does this letting belong to? -scheme_service_name,From scheme code, we map to the scheme name -scheme_confidential,Does the scheme contain confidential information? -SCHTYPE,What is this type of scheme? (Direct access hostel), Foyer, Housing for older people or Other supported housing -scheme_registered_under_care_act,Is this scheme registered under the Care Standards Act 2000? -scheme_owning_organisation_name,Which organisation owns the housing stock for this scheme? -scheme_primary_client_group,What client group is this scheme intended for? -scheme_has_other_client_group,Does this scheme provide for another client group? -scheme_secondary_client_group,What is the other client group? -scheme_support_type,What support does this scheme provide? -scheme_intended_stay,Intended length of stay -scheme_created_at,Date scheme was created -location_code,Which location is this letting for? -location_postcode,What is the postcode for this location? -location_name,What is the name of this location? -location_units,How many units are at this location? -location_type_of_unit,What is the most common type of unit at this location? -location_mobility_type,What are the mobility standards for the majority of the units in this location? -location_local_authority,What is the local authority of this postcode? -location_startdate,When did the first property in this location become available under this scheme? diff --git a/config/csv/definitions/sales_support_download_23_24.csv b/spec/fixtures/variable_definitions/sales_download_23_24.csv similarity index 50% rename from config/csv/definitions/sales_support_download_23_24.csv rename to spec/fixtures/variable_definitions/sales_download_23_24.csv index c5955e2d4..ad596de6c 100644 --- a/config/csv/definitions/sales_support_download_23_24.csv +++ b/spec/fixtures/variable_definitions/sales_download_23_24.csv @@ -134,3 +134,136 @@ MSCHARGE,What are the total monthly leasehold charges for the property? MSCHARGE_VALUE_CHECK,Populated if a soft validation is confirmed. DISCOUNT,What was the percentage discount? GRANT,What was the amount of any loan, grant, discount or subsidy given? +id,Log ID +status,Status of log +duplicate_set_id,ID of a set of duplicate logs +created_at,Time and date the log was created +updated_at,Time and date the log was last updated +old_form_id,The ID on the old service +collection_start_year,Year collection period opened +creation_method,Was the log submitted in-service or via bulk upload? +is_dpo,Is the user in the assigned_to column the data protection officer? +owning_organisation_name,Which organisation owned this property before the sale? +managing_organisation_name,Which organisation reported the sale? +assigned_to,User the log is assigned to +day,Day of sale completion date +month,Month of sale completion date +year,Year of sale completion date +purchid,What is the purchaser code? +ownershipsch,Was this purchase made through an ownership scheme? +type,What is the type of shared ownership/discounted ownership/outright sale? +othtype,If type = 'Other', what is the type of outright sale? +companybuy,Is the buyer a company? +buylivein,Will the buyer(s) live in the property? +jointpur,Is this a joint purchase? +jointmore,Are there more than 2 joint buyers of this property? +beds,How many bedrooms does the property have? +proptype,What type of unit is the property? +builtype,Which type of building is the property? +uprn,What is the UPRN of the property? +uprn_confirmed,We found an address that might be this property. Is this the property address? +address_line1,Address line 1 +address_line2,Address line 2 +town_or_city,Town/City +county,County +pcode1,Part 1 of the property's postcode +pcode2,Part 2 of the property's postcode +la,LA code +la_label,LA name +wchair,Is the property built or adapted to wheelchair-user standards? +noint,Did you interview the buyer to answer these questions? +privacynotice,Has the buyer seen the MHCLG privacy notice? +age1,What is buyer 1's age? +sex1,Which of these best describes buyer 1's gender identity? +ethnic_group,What is buyer 1's ethnic group? +ethnic,Which of the following best describes buyer 1's ethnic background? +national,What is buyer 1's nationality? +ecstat1,Which of these best describes buyer 1's working situation? +buy1livein,Will buyer 1 live in the property? +relat2,What is buyer 2 or person 2's relationship to buyer 1? +age2,What is buyer 2 or person 2's age? +sex2,Which of these best describes buyer 2 or person 2's gender identity? +ethnic_group2,What is buyer 2's ethnic group? +ethnicbuy2,Which of the following best describes buyer 2's ethnic background? +nationalbuy2,What is buyer 2's nationality? +ecstat2,What is buyer 2 or person 2's working situation? +buy2livein,Will buyer 2 live in the property? +hholdcount,Besides the buyer(s), how many other people live or will live in the property? +relat3,What is person 3's relationship to buyer 1? +age3,What is person 3's age? +sex3,What is person 3's gender identity? +ecstat3,What is person 3's working situation? +relat4,What is person 4's relationship to buyer 1? +age4,What is person 4's age? +sex4,What is person 4's gender identity? +ecstat4,What is person 4's working situation? +relat5,What is person 5's relationship to buyer 1? +age5,What is person 5's age? +sex5,What is person 5's gender identity? +ecstat5,What is person 5's working situation? +relat6,What is person 6's relationship to buyer 1? +age6,What is person 6's age? +sex6,What is person 6's gender identity? +ecstat6,What is person 6's working situation? +prevten,What was buyer 1's previous tenure? +ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? +ppostc1,Part 1 of postcode of buyer 1's last settled accommodation +ppostc2,Part 2 of postcode of buyer 1's last settled accommodation +previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? +prevloc,The local authority code of buyer 1's last settled accommodation +prevloc_label,The local authority name of buyer 1's last settled accommodation +pregyrha,Was the buyer registered with their PRP (HA)? +pregother,Was the buyer registered with another PRP (HA)? +pregla,Was the buyer registered with the local authority? +pregghb,Was the buyer registered with a Help to Buy agent? +pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank +buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? +prevtenbuy2,What was buyer 2's previous tenure? +hhregres,Have any of the buyers ever served as a regular in the UK armed forces? +hhregresstill,Is the buyer still serving in the UK armed forces? +armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? +disabled,Does anyone in the household consider themselves to have a disability? +wheel,Does anyone in the household use a wheelchair? +income1nk,Is buyer 1's annual income known? +income1,What is buyer 1's annual income? +inc1mort,Was buyer 1's income used for a mortgage application? +income2nk,Is buyer 2's annual income known? +income2,What is buyer 2's annual income? +inc2mort,Was buyer 2's income used for a mortgage application? +hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? +savingsnk,Is the the total amount the buyers had in savings known? +savings,What is the total amount the buyers had in savings before they paid any deposit for the property? +prevown,Have any of the buyers previously owned a property? +prevshared,Was the previous property under shared ownership? +proplen,How long did the buyer(s) live in the property before purchasing it? +staircase,Is this a staircasing transaction? +stairbought,What percentage of the property has been bought in this staircasing transaction? +stairowned,What percentage of the property do the buyers now own in total? +staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? +resale,Is this a resale? +exday,Day of the exchange of contracts +exmonth,Month of the exchange of contracts +exyear,Year of the exchange of contracts +hoday,Day of the practical completion or handover date +homonth,Month of the practical completion or handover date +hoyear,Year of the practical completion or handover date +lanomagr,Was the household rehoused under a local authority nominations agreement? +soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? +frombeds,How many bedrooms did the buyer's previous property have? +fromprop,What was the previous property type? +socprevten,What was the rent type of buyer's previous tenure? +value,What is the full purchase price? +equity,What was the initial percentage equity stake purchased? +mortgageused,Was a mortgage used to buy this property? +mortgage,What is the mortgage amount? +mortgagelender,What is the name of the mortgage lender? +mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? +mortlen,What is the length of the mortgage in years? +extrabor,Does this include any extra borrowing? +deposit,How much was the cash deposit paid on the property? +cashdis,How much cash discount was given through Social Homebuy? +mrent,What is the basic monthly rent? +has_mscharge,Does the property have any monthly leasehold charges? +mscharge,What are the total monthly leasehold charges for the property? +discount,What was the percentage discount? +grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/config/csv/definitions/sales_support_download_24_25.csv b/spec/fixtures/variable_definitions/sales_download_24_25.csv similarity index 51% rename from config/csv/definitions/sales_support_download_24_25.csv rename to spec/fixtures/variable_definitions/sales_download_24_25.csv index e1144a0dd..cf5641921 100644 --- a/config/csv/definitions/sales_support_download_24_25.csv +++ b/spec/fixtures/variable_definitions/sales_download_24_25.csv @@ -143,3 +143,139 @@ MSCHARGE,What are the total monthly leasehold charges for the property? MSCHARGE_VALUE_CHECK,Populated if a soft validation is confirmed. DISCOUNT,What was the percentage discount? GRANT,What was the amount of any loan, grant, discount or subsidy given? +id,Log ID +status,Status of log +duplicate_set_id,ID of a set of duplicate logs +created_at,Time and date the log was created +updated_at,Time and date the log was last updated +old_form_id,The ID on the old service +collection_start_year,Year collection period opened +creation_method,Was the log submitted in-service or via bulk upload? +is_dpo,Is the user in the assigned_to column the data protection officer? +owning_organisation_name,Which organisation owned this property before the sale? +managing_organisation_name,Which organisation reported the sale? +assigned_to,User the log is assigned to +day,Day of sale completion date +month,Month of sale completion date +year,Year of sale completion date +purchid,What is the purchaser code? +ownershipsch,Was this purchase made through an ownership scheme? +type,What is the type of shared ownership/discounted ownership/outright sale? +othtype,If type = 'Other', what is the type of outright sale? +companybuy,Is the buyer a company? +buylivein,Will the buyer(s) live in the property? +jointpur,Is this a joint purchase? +jointmore,Are there more than 2 joint buyers of this property? +beds,How many bedrooms does the property have? +proptype,What type of unit is the property? +builtype,Which type of building is the property? +uprn,What is the UPRN of the property? +uprn_confirmed,We found an address that might be this property. Is this the property address? +address_line1_input,Address line 1 input from address matching feature +postcode_full_input,Postcode input from address matching feature +uprn_selection,UPRN of the address selected +address_line1,Address line 1 +address_line2,Address line 2 +town_or_city,Town/City +county,County +pcode1,Part 1 of the property's postcode +pcode2,Part 2 of the property's postcode +la,LA code +la_label,LA name +wchair,Is the property built or adapted to wheelchair-user standards? +noint,Did you interview the buyer to answer these questions? +privacynotice,Has the buyer seen the MHCLG privacy notice? +age1,What is buyer 1's age? +sex1,Which of these best describes buyer 1's gender identity? +ethnic_group,What is buyer 1's ethnic group? +ethnic,Which of the following best describes buyer 1's ethnic background? +nationality_all,What is buyer 1's nationality? +ecstat1,Which of these best describes buyer 1's working situation? +buy1livein,Will buyer 1 live in the property? +relat2,What is buyer 2 or person 2's relationship to buyer 1? +age2,What is buyer 2 or person 2's age? +sex2,Which of these best describes buyer 2 or person 2's gender identity? +ethnic_group2,What is buyer 2's ethnic group? +ethnicbuy2,Which of the following best describes buyer 2's ethnic background? +nationality_all_buyer2,What is buyer 2's nationality? +ecstat2,What is buyer 2 or person 2's working situation? +buy2livein,Will buyer 2 live in the property? +hholdcount,Besides the buyer(s), how many other people live or will live in the property? +relat3,What is person 3's relationship to buyer 1? +age3,What is person 3's age? +sex3,What is person 3's gender identity? +ecstat3,What is person 3's working situation? +relat4,What is person 4's relationship to buyer 1? +age4,What is person 4's age? +sex4,What is person 4's gender identity? +ecstat4,What is person 4's working situation? +relat5,What is person 5's relationship to buyer 1? +age5,What is person 5's age? +sex5,What is person 5's gender identity? +ecstat5,What is person 5's working situation? +relat6,What is person 6's relationship to buyer 1? +age6,What is person 6's age? +sex6,What is person 6's gender identity? +ecstat6,What is person 6's working situation? +prevten,What was buyer 1's previous tenure? +ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? +ppostc1,Part 1 of postcode of buyer 1's last settled accommodation +ppostc2,Part 2 of postcode of buyer 1's last settled accommodation +previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? +prevloc,The local authority code of buyer 1's last settled accommodation +prevloc_label,The local authority name of buyer 1's last settled accommodation +pregyrha,Was the buyer registered with their PRP (HA)? +pregother,Was the buyer registered with another PRP (HA)? +pregla,Was the buyer registered with the local authority? +pregghb,Was the buyer registered with a Help to Buy agent? +pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank +buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? +prevtenbuy2,What was buyer 2's previous tenure? +hhregres,Have any of the buyers ever served as a regular in the UK armed forces? +hhregresstill,Is the buyer still serving in the UK armed forces? +armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? +disabled,Does anyone in the household consider themselves to have a disability? +wheel,Does anyone in the household use a wheelchair? +income1nk,Is buyer 1's annual income known? +income1,What is buyer 1's annual income? +inc1mort,Was buyer 1's income used for a mortgage application? +income2nk,Is buyer 2's annual income known? +income2,What is buyer 2's annual income? +inc2mort,Was buyer 2's income used for a mortgage application? +hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? +savingsnk,Is the the total amount the buyers had in savings known? +savings,What is the total amount the buyers had in savings before they paid any deposit for the property? +prevown,Have any of the buyers previously owned a property? +prevshared,Was the previous property under shared ownership? +proplen,How long did the buyer(s) live in the property before purchasing it? +staircase,Is this a staircasing transaction? +stairbought,What percentage of the property has been bought in this staircasing transaction? +stairowned,What percentage of the property do the buyers now own in total? +staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? +resale,Is this a resale? +exday,Day of the exchange of contracts +exmonth,Month of the exchange of contracts +exyear,Year of the exchange of contracts +hoday,Day of the practical completion or handover date +homonth,Month of the practical completion or handover date +hoyear,Year of the practical completion or handover date +lanomagr,Was the household rehoused under a local authority nominations agreement? +soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? +frombeds,How many bedrooms did the buyer's previous property have? +fromprop,What was the previous property type? +socprevten,What was the rent type of buyer's previous tenure? +value,What is the full purchase price? +equity,What was the initial percentage equity stake purchased? +mortgageused,Was a mortgage used to buy this property? +mortgage,What is the mortgage amount? +mortgagelender,What is the name of the mortgage lender? +mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? +mortlen,What is the length of the mortgage in years? +extrabor,Does this include any extra borrowing? +deposit,How much was the cash deposit paid on the property? +cashdis,How much cash discount was given through Social Homebuy? +mrent,What is the basic monthly rent? +has_mscharge,Does the property have any monthly leasehold charges? +mscharge,What are the total monthly leasehold charges for the property? +discount,What was the percentage discount? +grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/spec/fixtures/variable_definitions/sales_user_download_23_24.csv b/spec/fixtures/variable_definitions/sales_user_download_23_24.csv deleted file mode 100644 index c1334130d..000000000 --- a/spec/fixtures/variable_definitions/sales_user_download_23_24.csv +++ /dev/null @@ -1,133 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -created_at,Time and date the log was created -updated_at,Time and date the log was last updated -old_form_id,The ID on the old service -collection_start_year,Year collection period opened -creation_method,Was the log submitted in-service or via bulk upload? -is_dpo,Is the user in the assigned_to column the data protection officer? -owning_organisation_name,Which organisation owned this property before the sale? -managing_organisation_name,Which organisation reported the sale? -assigned_to,User the log is assigned to -day,Day of sale completion date -month,Month of sale completion date -year,Year of sale completion date -purchid,What is the purchaser code? -ownershipsch,Was this purchase made through an ownership scheme? -type,What is the type of shared ownership/discounted ownership/outright sale? -othtype,If type = 'Other', what is the type of outright sale? -companybuy,Is the buyer a company? -buylivein,Will the buyer(s) live in the property? -jointpur,Is this a joint purchase? -jointmore,Are there more than 2 joint buyers of this property? -beds,How many bedrooms does the property have? -proptype,What type of unit is the property? -builtype,Which type of building is the property? -uprn,What is the UPRN of the property? -uprn_confirmed,We found an address that might be this property. Is this the property address? -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town/City -county,County -pcode1,Part 1 of the property's postcode -pcode2,Part 2 of the property's postcode -la,LA code -la_label,LA name -wchair,Is the property built or adapted to wheelchair-user standards? -noint,Did you interview the buyer to answer these questions? -privacynotice,Has the buyer seen the MHCLG privacy notice? -age1,What is buyer 1's age? -sex1,Which of these best describes buyer 1's gender identity? -ethnic_group,What is buyer 1's ethnic group? -ethnic,Which of the following best describes buyer 1's ethnic background? -national,What is buyer 1's nationality? -ecstat1,Which of these best describes buyer 1's working situation? -buy1livein,Will buyer 1 live in the property? -relat2,What is buyer 2 or person 2's relationship to buyer 1? -age2,What is buyer 2 or person 2's age? -sex2,Which of these best describes buyer 2 or person 2's gender identity? -ethnic_group2,What is buyer 2's ethnic group? -ethnicbuy2,Which of the following best describes buyer 2's ethnic background? -nationalbuy2,What is buyer 2's nationality? -ecstat2,What is buyer 2 or person 2's working situation? -buy2livein,Will buyer 2 live in the property? -hholdcount,Besides the buyer(s), how many other people live or will live in the property? -relat3,What is person 3's relationship to buyer 1? -age3,What is person 3's age? -sex3,What is person 3's gender identity? -ecstat3,What is person 3's working situation? -relat4,What is person 4's relationship to buyer 1? -age4,What is person 4's age? -sex4,What is person 4's gender identity? -ecstat4,What is person 4's working situation? -relat5,What is person 5's relationship to buyer 1? -age5,What is person 5's age? -sex5,What is person 5's gender identity? -ecstat5,What is person 5's working situation? -relat6,What is person 6's relationship to buyer 1? -age6,What is person 6's age? -sex6,What is person 6's gender identity? -ecstat6,What is person 6's working situation? -prevten,What was buyer 1's previous tenure? -ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? -ppostc1,Part 1 of postcode of buyer 1's last settled accommodation -ppostc2,Part 2 of postcode of buyer 1's last settled accommodation -previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? -prevloc,The local authority code of buyer 1's last settled accommodation -prevloc_label,The local authority name of buyer 1's last settled accommodation -pregyrha,Was the buyer registered with their PRP (HA)? -pregother,Was the buyer registered with another PRP (HA)? -pregla,Was the buyer registered with the local authority? -pregghb,Was the buyer registered with a Help to Buy agent? -pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank -buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? -prevtenbuy2,What was buyer 2's previous tenure? -hhregres,Have any of the buyers ever served as a regular in the UK armed forces? -hhregresstill,Is the buyer still serving in the UK armed forces? -armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? -disabled,Does anyone in the household consider themselves to have a disability? -wheel,Does anyone in the household use a wheelchair? -income1nk,Is buyer 1's annual income known? -income1,What is buyer 1's annual income? -inc1mort,Was buyer 1's income used for a mortgage application? -income2nk,Is buyer 2's annual income known? -income2,What is buyer 2's annual income? -inc2mort,Was buyer 2's income used for a mortgage application? -hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? -savingsnk,Is the the total amount the buyers had in savings known? -savings,What is the total amount the buyers had in savings before they paid any deposit for the property? -prevown,Have any of the buyers previously owned a property? -prevshared,Was the previous property under shared ownership? -proplen,How long did the buyer(s) live in the property before purchasing it? -staircase,Is this a staircasing transaction? -stairbought,What percentage of the property has been bought in this staircasing transaction? -stairowned,What percentage of the property do the buyers now own in total? -staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? -resale,Is this a resale? -exday,Day of the exchange of contracts -exmonth,Month of the exchange of contracts -exyear,Year of the exchange of contracts -hoday,Day of the practical completion or handover date -homonth,Month of the practical completion or handover date -hoyear,Year of the practical completion or handover date -lanomagr,Was the household rehoused under a local authority nominations agreement? -soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? -frombeds,How many bedrooms did the buyer's previous property have? -fromprop,What was the previous property type? -socprevten,What was the rent type of buyer's previous tenure? -value,What is the full purchase price? -equity,What was the initial percentage equity stake purchased? -mortgageused,Was a mortgage used to buy this property? -mortgage,What is the mortgage amount? -mortgagelender,What is the name of the mortgage lender? -mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? -mortlen,What is the length of the mortgage in years? -extrabor,Does this include any extra borrowing? -deposit,How much was the cash deposit paid on the property? -cashdis,How much cash discount was given through Social Homebuy? -mrent,What is the basic monthly rent? -has_mscharge,Does the property have any monthly leasehold charges? -mscharge,What are the total monthly leasehold charges for the property? -discount,What was the percentage discount? -grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/spec/fixtures/variable_definitions/sales_user_download_24_25.csv b/spec/fixtures/variable_definitions/sales_user_download_24_25.csv deleted file mode 100644 index f52018f6e..000000000 --- a/spec/fixtures/variable_definitions/sales_user_download_24_25.csv +++ /dev/null @@ -1,136 +0,0 @@ -id,Log ID -status,Status of log -duplicate_set_id,ID of a set of duplicate logs -created_at,Time and date the log was created -updated_at,Time and date the log was last updated -old_form_id,The ID on the old service -collection_start_year,Year collection period opened -creation_method,Was the log submitted in-service or via bulk upload? -is_dpo,Is the user in the assigned_to column the data protection officer? -owning_organisation_name,Which organisation owned this property before the sale? -managing_organisation_name,Which organisation reported the sale? -assigned_to,User the log is assigned to -day,Day of sale completion date -month,Month of sale completion date -year,Year of sale completion date -purchid,What is the purchaser code? -ownershipsch,Was this purchase made through an ownership scheme? -type,What is the type of shared ownership/discounted ownership/outright sale? -othtype,If type = 'Other', what is the type of outright sale? -companybuy,Is the buyer a company? -buylivein,Will the buyer(s) live in the property? -jointpur,Is this a joint purchase? -jointmore,Are there more than 2 joint buyers of this property? -beds,How many bedrooms does the property have? -proptype,What type of unit is the property? -builtype,Which type of building is the property? -uprn,What is the UPRN of the property? -uprn_confirmed,We found an address that might be this property. Is this the property address? -address_line1_input,Address line 1 input from address matching feature -postcode_full_input,Postcode input from address matching feature -uprn_selection,UPRN of the address selected -address_line1,Address line 1 -address_line2,Address line 2 -town_or_city,Town/City -county,County -pcode1,Part 1 of the property's postcode -pcode2,Part 2 of the property's postcode -la,LA code -la_label,LA name -wchair,Is the property built or adapted to wheelchair-user standards? -noint,Did you interview the buyer to answer these questions? -privacynotice,Has the buyer seen the MHCLG privacy notice? -age1,What is buyer 1's age? -sex1,Which of these best describes buyer 1's gender identity? -ethnic_group,What is buyer 1's ethnic group? -ethnic,Which of the following best describes buyer 1's ethnic background? -nationality_all,What is buyer 1's nationality? -ecstat1,Which of these best describes buyer 1's working situation? -buy1livein,Will buyer 1 live in the property? -relat2,What is buyer 2 or person 2's relationship to buyer 1? -age2,What is buyer 2 or person 2's age? -sex2,Which of these best describes buyer 2 or person 2's gender identity? -ethnic_group2,What is buyer 2's ethnic group? -ethnicbuy2,Which of the following best describes buyer 2's ethnic background? -nationality_all_buyer2,What is buyer 2's nationality? -ecstat2,What is buyer 2 or person 2's working situation? -buy2livein,Will buyer 2 live in the property? -hholdcount,Besides the buyer(s), how many other people live or will live in the property? -relat3,What is person 3's relationship to buyer 1? -age3,What is person 3's age? -sex3,What is person 3's gender identity? -ecstat3,What is person 3's working situation? -relat4,What is person 4's relationship to buyer 1? -age4,What is person 4's age? -sex4,What is person 4's gender identity? -ecstat4,What is person 4's working situation? -relat5,What is person 5's relationship to buyer 1? -age5,What is person 5's age? -sex5,What is person 5's gender identity? -ecstat5,What is person 5's working situation? -relat6,What is person 6's relationship to buyer 1? -age6,What is person 6's age? -sex6,What is person 6's gender identity? -ecstat6,What is person 6's working situation? -prevten,What was buyer 1's previous tenure? -ppcodenk,Do you know the postcode of buyer 1's last settled accommodation? -ppostc1,Part 1 of postcode of buyer 1's last settled accommodation -ppostc2,Part 2 of postcode of buyer 1's last settled accommodation -previous_la_known,Do you know the local authority of buyer 1's last settled accommodation? -prevloc,The local authority code of buyer 1's last settled accommodation -prevloc_label,The local authority name of buyer 1's last settled accommodation -pregyrha,Was the buyer registered with their PRP (HA)? -pregother,Was the buyer registered with another PRP (HA)? -pregla,Was the buyer registered with the local authority? -pregghb,Was the buyer registered with a Help to Buy agent? -pregblank,Populated if pregyrha, pregother, pregla and pregghb are blank -buy2living,At the time of purchase, was buyer 2 living at the same address as buyer 1? -prevtenbuy2,What was buyer 2's previous tenure? -hhregres,Have any of the buyers ever served as a regular in the UK armed forces? -hhregresstill,Is the buyer still serving in the UK armed forces? -armedforcesspouse,Are any of the buyers a spouse or civil partner of a UK armed forces regular who died in service within the last 2 years? -disabled,Does anyone in the household consider themselves to have a disability? -wheel,Does anyone in the household use a wheelchair? -income1nk,Is buyer 1's annual income known? -income1,What is buyer 1's annual income? -inc1mort,Was buyer 1's income used for a mortgage application? -income2nk,Is buyer 2's annual income known? -income2,What is buyer 2's annual income? -inc2mort,Was buyer 2's income used for a mortgage application? -hb,Were the buyers receiving any of these housing-related benefits immediately before buying this property? -savingsnk,Is the the total amount the buyers had in savings known? -savings,What is the total amount the buyers had in savings before they paid any deposit for the property? -prevown,Have any of the buyers previously owned a property? -prevshared,Was the previous property under shared ownership? -proplen,How long did the buyer(s) live in the property before purchasing it? -staircase,Is this a staircasing transaction? -stairbought,What percentage of the property has been bought in this staircasing transaction? -stairowned,What percentage of the property do the buyers now own in total? -staircasesale,Was this transaction part of a back-to-back staircasing transaction to facilitate sale of the home on the open market? -resale,Is this a resale? -exday,Day of the exchange of contracts -exmonth,Month of the exchange of contracts -exyear,Year of the exchange of contracts -hoday,Day of the practical completion or handover date -homonth,Month of the practical completion or handover date -hoyear,Year of the practical completion or handover date -lanomagr,Was the household rehoused under a local authority nominations agreement? -soctenant,Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale? -frombeds,How many bedrooms did the buyer's previous property have? -fromprop,What was the previous property type? -socprevten,What was the rent type of buyer's previous tenure? -value,What is the full purchase price? -equity,What was the initial percentage equity stake purchased? -mortgageused,Was a mortgage used to buy this property? -mortgage,What is the mortgage amount? -mortgagelender,What is the name of the mortgage lender? -mortgagelenderother,If mortgagelender = 'Other', what is the name of the mortgage lender? -mortlen,What is the length of the mortgage in years? -extrabor,Does this include any extra borrowing? -deposit,How much was the cash deposit paid on the property? -cashdis,How much cash discount was given through Social Homebuy? -mrent,What is the basic monthly rent? -has_mscharge,Does the property have any monthly leasehold charges? -mscharge,What are the total monthly leasehold charges for the property? -discount,What was the percentage discount? -grant,What was the amount of any loan, grant, discount or subsidy given? diff --git a/spec/helpers/filters_helper_spec.rb b/spec/helpers/filters_helper_spec.rb index d214dca85..a2b658cdf 100644 --- a/spec/helpers/filters_helper_spec.rb +++ b/spec/helpers/filters_helper_spec.rb @@ -175,16 +175,6 @@ RSpec.describe FiltersHelper do context "with a support user" do let(:user) { FactoryBot.create(:user, :support, organisation: child_organisation) } - it "returns a list of all organisations" do - expect(owning_organisation_filter_options(user)).to match_array([ - OpenStruct.new(id: "", name: "Select an option"), - OpenStruct.new(id: child_organisation.id, name: "Child organisation"), - OpenStruct.new(id: absorbed_organisation.id, name: "Absorbed organisation"), - OpenStruct.new(id: parent_organisation.id, name: "Parent organisation"), - OpenStruct.new(id: 9_999_999, name: "Other organisation"), - ]) - end - context "when no organisation is selected in the filters" do it "returns an empty list" do expect(owning_organisation_filter_options(user.reload, "lettings_logs")).to eq([ @@ -343,16 +333,6 @@ RSpec.describe FiltersHelper do context "with a support user" do let(:user) { FactoryBot.create(:user, :support, organisation: parent_organisation) } - it "returns a list of all organisations" do - expect(managing_organisation_filter_options(user)).to eq([ - OpenStruct.new(id: "", name: "Select an option"), - OpenStruct.new(id: parent_organisation.id, name: "Parent organisation"), - OpenStruct.new(id: absorbed_organisation.id, name: "Absorbed organisation"), - OpenStruct.new(id: child_organisation.id, name: "Child organisation"), - OpenStruct.new(id: 9_999_999, name: "Other organisation"), - ]) - end - context "when no organisation is selected in the filters" do it "returns an empty list" do expect(managing_organisation_filter_options(user.reload, "lettings_logs")).to eq([ diff --git a/spec/services/csv/scheme_csv_service_spec.rb b/spec/services/csv/scheme_csv_service_spec.rb index 6dceb31c5..57f009c65 100644 --- a/spec/services/csv/scheme_csv_service_spec.rb +++ b/spec/services/csv/scheme_csv_service_spec.rb @@ -13,12 +13,14 @@ RSpec.describe Csv::SchemeCsvService do before do Timecop.freeze(fixed_time) + Singleton.__init__(FormHandler) create(:scheme_deactivation_period, scheme:, deactivation_date: scheme.created_at + 1.year, reactivation_date: scheme.created_at + 2.years) create(:location_deactivation_period, location:, deactivation_date: location.created_at + 6.months) end after do Timecop.return + Singleton.__init__(FormHandler) end it "returns a string" do diff --git a/spec/services/imports/variable_definitions_service_spec.rb b/spec/services/imports/variable_definitions_service_spec.rb index d509bb4ae..f3420ca0a 100644 --- a/spec/services/imports/variable_definitions_service_spec.rb +++ b/spec/services/imports/variable_definitions_service_spec.rb @@ -26,7 +26,7 @@ RSpec.describe Imports::VariableDefinitionsService, type: :service do end describe "#process_file" do - let(:file) { "spec/fixtures/variable_definitions/lettings_user_download_23_24.csv" } + let(:file) { "spec/fixtures/variable_definitions/lettings_download_23_24.csv" } let(:csv_content) { [["id", "Log ID"], ["status", "Status of log"], ["duplicate_set_id", "ID of a set of duplicate logs"]] } before do