From 845065d2d3b01e154b28bb42c17574bd91c3491c Mon Sep 17 00:00:00 2001 From: Robert Sullivan Date: Fri, 22 Mar 2024 16:00:56 +0000 Subject: [PATCH] CLDC-3297: Add assigned to field to xml exports (#2345) * feat: add fields to xml for 24/25 on * CLDC-3297: Add empty assigned to column to XML exports --------- Co-authored-by: natdeanlewissoftwire --- app/services/exports/lettings_log_export_constants.rb | 2 ++ app/services/exports/lettings_log_export_service.rb | 3 +++ spec/fixtures/exports/general_needs_log_24_25.xml | 1 + 3 files changed, 6 insertions(+) diff --git a/app/services/exports/lettings_log_export_constants.rb b/app/services/exports/lettings_log_export_constants.rb index 3a04c7fab..440a44955 100644 --- a/app/services/exports/lettings_log_export_constants.rb +++ b/app/services/exports/lettings_log_export_constants.rb @@ -154,6 +154,7 @@ module Exports::LettingsLogExportConstants "pscharge_value_check", "supcharg_value_check", "carehome_charges_value_check", + "assigned_to", ] (1..8).each do |index| @@ -187,6 +188,7 @@ 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 c12e188a2..49cf601c9 100644 --- a/app/services/exports/lettings_log_export_service.rb +++ b/app/services/exports/lettings_log_export_service.rb @@ -230,6 +230,9 @@ 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 end diff --git a/spec/fixtures/exports/general_needs_log_24_25.xml b/spec/fixtures/exports/general_needs_log_24_25.xml index bcdb8941c..45b33b8cd 100644 --- a/spec/fixtures/exports/general_needs_log_24_25.xml +++ b/spec/fixtures/exports/general_needs_log_24_25.xml @@ -172,6 +172,7 @@ test1@example.com 2 + 1