From deb1ede405c241c083650306a094ee6c9e2b5458 Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 4 Apr 2024 16:44:37 +0100 Subject: [PATCH] Update XML exports --- app/services/exports/lettings_log_export_constants.rb | 1 - app/services/exports/lettings_log_export_service.rb | 4 ++-- spec/fixtures/exports/general_needs_log.xml | 1 + spec/fixtures/exports/general_needs_log_23_24.xml | 1 + spec/fixtures/exports/general_needs_log_24_25.xml | 2 +- spec/fixtures/exports/supported_housing_logs.xml | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/services/exports/lettings_log_export_constants.rb b/app/services/exports/lettings_log_export_constants.rb index 440a44955..809d832f2 100644 --- a/app/services/exports/lettings_log_export_constants.rb +++ b/app/services/exports/lettings_log_export_constants.rb @@ -188,7 +188,6 @@ module Exports::LettingsLogExportConstants "pscharge_value_check", "supcharg_value_check", "carehome_charges_value_check", - "assigned_to", ] PRE_2024_EXPORT_FIELDS = Set[ diff --git a/app/services/exports/lettings_log_export_service.rb b/app/services/exports/lettings_log_export_service.rb index 525a74ec1..f85fe8927 100644 --- a/app/services/exports/lettings_log_export_service.rb +++ b/app/services/exports/lettings_log_export_service.rb @@ -201,7 +201,7 @@ module Exports end attribute_hash["log_id"] = lettings_log.id - attribute_hash["assigned_to"] = lettings_log.assigned_to&.email + attribute_hash["created_by"] = lettings_log.created_by&.email attribute_hash["amended_by"] = lettings_log.updated_by&.email attribute_hash["la"] = lettings_log.la @@ -231,7 +231,7 @@ module Exports attribute_hash["renttype_detail"] = LettingsLog::RENTTYPE_DETAIL_MAPPING[lettings_log.rent_type] if lettings_log.rent_type.present? # field to be added in future - attribute_hash["assigned_to"] = nil + attribute_hash["assigned_to"] = lettings_log.assigned_to&.email attribute_hash end diff --git a/spec/fixtures/exports/general_needs_log.xml b/spec/fixtures/exports/general_needs_log.xml index 8fb2004e1..14a4ee185 100644 --- a/spec/fixtures/exports/general_needs_log.xml +++ b/spec/fixtures/exports/general_needs_log.xml @@ -158,6 +158,7 @@ test1@example.com 2 + test1@example.com 1 diff --git a/spec/fixtures/exports/general_needs_log_23_24.xml b/spec/fixtures/exports/general_needs_log_23_24.xml index 851ef53d4..f9368bb05 100644 --- a/spec/fixtures/exports/general_needs_log_23_24.xml +++ b/spec/fixtures/exports/general_needs_log_23_24.xml @@ -159,6 +159,7 @@ test1@example.com 2 + test1@example.com 1 diff --git a/spec/fixtures/exports/general_needs_log_24_25.xml b/spec/fixtures/exports/general_needs_log_24_25.xml index 45b33b8cd..5e79f3008 100644 --- a/spec/fixtures/exports/general_needs_log_24_25.xml +++ b/spec/fixtures/exports/general_needs_log_24_25.xml @@ -172,7 +172,7 @@ test1@example.com 2 - + test1@example.com 1 diff --git a/spec/fixtures/exports/supported_housing_logs.xml b/spec/fixtures/exports/supported_housing_logs.xml index 3572645fb..ca95e58c3 100644 --- a/spec/fixtures/exports/supported_housing_logs.xml +++ b/spec/fixtures/exports/supported_housing_logs.xml @@ -174,6 +174,7 @@ {location_id} active 2 + fake@email.com 1