From be1417307c8debde17639d74a3d5bcffc761d27e Mon Sep 17 00:00:00 2001
From: baarkerlounger <5101747+baarkerlounger@users.noreply.github.com>
Date: Wed, 30 Mar 2022 18:25:33 +0100
Subject: [PATCH] CLDC-649: Export provider type from owning organisation
(#436)
* Export provider type from owning org
* Export DB value rather than string
---
app/services/exports/case_log_export_service.rb | 1 +
spec/fixtures/exports/case_logs.xml | 1 +
2 files changed, 2 insertions(+)
diff --git a/app/services/exports/case_log_export_service.rb b/app/services/exports/case_log_export_service.rb
index f3967d9a1..258a3ed8b 100644
--- a/app/services/exports/case_log_export_service.rb
+++ b/app/services/exports/case_log_export_service.rb
@@ -63,6 +63,7 @@ module Exports
form << doc.create_element(key, value)
end
end
+ form << doc.create_element("providertype", case_log.owning_organisation.read_attribute_before_type_cast(:provider_type))
end
doc.write_xml_to(StringIO.new, encoding: "UTF-8")
end
diff --git a/spec/fixtures/exports/case_logs.xml b/spec/fixtures/exports/case_logs.xml
index 1e05d6dc7..d648045ab 100644
--- a/spec/fixtures/exports/case_logs.xml
+++ b/spec/fixtures/exports/case_logs.xml
@@ -174,5 +174,6 @@
+ 1