Browse Source

Update XML exports

CLDC-3345-update-created-by-values
Kat 9 months ago
parent
commit
deb1ede405
  1. 1
      app/services/exports/lettings_log_export_constants.rb
  2. 4
      app/services/exports/lettings_log_export_service.rb
  3. 1
      spec/fixtures/exports/general_needs_log.xml
  4. 1
      spec/fixtures/exports/general_needs_log_23_24.xml
  5. 2
      spec/fixtures/exports/general_needs_log_24_25.xml
  6. 1
      spec/fixtures/exports/supported_housing_logs.xml

1
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[

4
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

1
spec/fixtures/exports/general_needs_log.xml vendored

@ -158,6 +158,7 @@
<created_by>test1@example.com</created_by>
<amended_by/>
<renttype_detail>2</renttype_detail>
<assigned_to>test1@example.com</assigned_to>
<providertype>1</providertype>
</form>
</forms>

1
spec/fixtures/exports/general_needs_log_23_24.xml vendored

@ -159,6 +159,7 @@
<created_by>test1@example.com</created_by>
<amended_by/>
<renttype_detail>2</renttype_detail>
<assigned_to>test1@example.com</assigned_to>
<providertype>1</providertype>
</form>
</forms>

2
spec/fixtures/exports/general_needs_log_24_25.xml vendored

@ -172,7 +172,7 @@
<created_by>test1@example.com</created_by>
<amended_by/>
<renttype_detail>2</renttype_detail>
<assigned_to/>
<assigned_to>test1@example.com</assigned_to>
<providertype>1</providertype>
</form>
</forms>

1
spec/fixtures/exports/supported_housing_logs.xml vendored

@ -174,6 +174,7 @@
<location_code>{location_id}</location_code>
<location_status>active</location_status>
<renttype_detail>2</renttype_detail>
<assigned_to>fake@email.com</assigned_to>
<providertype>1</providertype>
</form>
</forms>

Loading…
Cancel
Save