Browse Source

Add new fields for user ids

pull/2661/head
Kat 2 years ago
parent
commit
5bbe855f3e
  1. 6
      app/services/exports/lettings_log_export_constants.rb
  2. 4
      app/services/exports/lettings_log_export_service.rb
  3. 6
      spec/fixtures/exports/general_needs_log.xml
  4. 6
      spec/fixtures/exports/general_needs_log_23_24.xml
  5. 6
      spec/fixtures/exports/general_needs_log_24_25.xml
  6. 6
      spec/fixtures/exports/supported_housing_logs.xml

6
app/services/exports/lettings_log_export_constants.rb

@ -131,7 +131,7 @@ module Exports::LettingsLogExportConstants
"log_id", "log_id",
"scheme_status", "scheme_status",
"location_status", "location_status",
"amended_by", "amended_by_id",
"duplicate_set_id", "duplicate_set_id",
"accessible_register", "accessible_register",
"nationality_all", "nationality_all",
@ -148,8 +148,8 @@ module Exports::LettingsLogExportConstants
"pscharge_value_check", "pscharge_value_check",
"supcharg_value_check", "supcharg_value_check",
"carehome_charges_value_check", "carehome_charges_value_check",
"assigned_to", "assigned_to_id",
"created_by", "created_by_id",
] ]
(1..8).each do |index| (1..8).each do |index|

4
app/services/exports/lettings_log_export_service.rb

@ -81,9 +81,7 @@ module Exports
end end
attribute_hash["log_id"] = lettings_log.id attribute_hash["log_id"] = lettings_log.id
attribute_hash["assigned_to"] = lettings_log.assigned_to_id attribute_hash["amended_by_id"] = lettings_log.updated_by_id
attribute_hash["created_by"] = lettings_log.created_by_id
attribute_hash["amended_by"] = lettings_log.updated_by_id
attribute_hash["la"] = lettings_log.la attribute_hash["la"] = lettings_log.la
attribute_hash["postcode_full"] = lettings_log.postcode_full attribute_hash["postcode_full"] = lettings_log.postcode_full

6
spec/fixtures/exports/general_needs_log.xml vendored

@ -131,6 +131,7 @@
<relat8/> <relat8/>
<lar>2</lar> <lar>2</lar>
<irproduct/> <irproduct/>
<assigned_to_id>{assigned_to}</assigned_to_id>
<sheltered/> <sheltered/>
<hhtype>4</hhtype> <hhtype>4</hhtype>
<new_old>2</new_old> <new_old>2</new_old>
@ -145,15 +146,14 @@
<discarded_at/> <discarded_at/>
<creation_method>1</creation_method> <creation_method>1</creation_method>
<duplicate_set_id/> <duplicate_set_id/>
<created_by_id>{created_by}</created_by_id>
<formid>{id}</formid> <formid>{id}</formid>
<owningorgid>{owning_org_id}</owningorgid> <owningorgid>{owning_org_id}</owningorgid>
<maningorgid>{managing_org_id}</maningorgid> <maningorgid>{managing_org_id}</maningorgid>
<createddate>2022-05-01T00:00:00+01:00</createddate> <createddate>2022-05-01T00:00:00+01:00</createddate>
<uploaddate>2022-05-01T00:00:00+01:00</uploaddate> <uploaddate>2022-05-01T00:00:00+01:00</uploaddate>
<log_id>{log_id}</log_id> <log_id>{log_id}</log_id>
<assigned_to>{assigned_to}</assigned_to> <amended_by_id/>
<created_by>{created_by}</created_by>
<amended_by/>
<renttype_detail>2</renttype_detail> <renttype_detail>2</renttype_detail>
</form> </form>
</forms> </forms>

6
spec/fixtures/exports/general_needs_log_23_24.xml vendored

@ -132,6 +132,7 @@
<lar>2</lar> <lar>2</lar>
<irproduct/> <irproduct/>
<joint>3</joint> <joint>3</joint>
<assigned_to_id>{assigned_to}</assigned_to_id>
<sheltered/> <sheltered/>
<hhtype>4</hhtype> <hhtype>4</hhtype>
<new_old>2</new_old> <new_old>2</new_old>
@ -146,15 +147,14 @@
<discarded_at/> <discarded_at/>
<creation_method>1</creation_method> <creation_method>1</creation_method>
<duplicate_set_id/> <duplicate_set_id/>
<created_by_id>{created_by}</created_by_id>
<formid>{id}</formid> <formid>{id}</formid>
<owningorgid>{owning_org_id}</owningorgid> <owningorgid>{owning_org_id}</owningorgid>
<maningorgid>{managing_org_id}</maningorgid> <maningorgid>{managing_org_id}</maningorgid>
<createddate>2023-04-03T00:00:00+01:00</createddate> <createddate>2023-04-03T00:00:00+01:00</createddate>
<uploaddate>2023-04-03T00:00:00+01:00</uploaddate> <uploaddate>2023-04-03T00:00:00+01:00</uploaddate>
<log_id>{log_id}</log_id> <log_id>{log_id}</log_id>
<assigned_to>{assigned_to}</assigned_to> <amended_by_id/>
<created_by>{created_by}</created_by>
<amended_by/>
<renttype_detail>2</renttype_detail> <renttype_detail>2</renttype_detail>
</form> </form>
</forms> </forms>

6
spec/fixtures/exports/general_needs_log_24_25.xml vendored

@ -132,6 +132,7 @@
<lar>2</lar> <lar>2</lar>
<irproduct/> <irproduct/>
<joint>3</joint> <joint>3</joint>
<assigned_to_id>{assigned_to}</assigned_to_id>
<sheltered/> <sheltered/>
<hhtype>4</hhtype> <hhtype>4</hhtype>
<new_old>2</new_old> <new_old>2</new_old>
@ -159,15 +160,14 @@
<county_as_entered>county as entered</county_as_entered> <county_as_entered>county as entered</county_as_entered>
<postcode_full_as_entered>AB1 2CD</postcode_full_as_entered> <postcode_full_as_entered>AB1 2CD</postcode_full_as_entered>
<la_as_entered>la as entered</la_as_entered> <la_as_entered>la as entered</la_as_entered>
<created_by_id>{created_by}</created_by_id>
<formid>{id}</formid> <formid>{id}</formid>
<owningorgid>{owning_org_id}</owningorgid> <owningorgid>{owning_org_id}</owningorgid>
<maningorgid>{managing_org_id}</maningorgid> <maningorgid>{managing_org_id}</maningorgid>
<createddate>2024-04-03T00:00:00+01:00</createddate> <createddate>2024-04-03T00:00:00+01:00</createddate>
<uploaddate>2024-04-03T00:00:00+01:00</uploaddate> <uploaddate>2024-04-03T00:00:00+01:00</uploaddate>
<log_id>{log_id}</log_id> <log_id>{log_id}</log_id>
<assigned_to>{assigned_to}</assigned_to> <amended_by_id/>
<created_by>{created_by}</created_by>
<amended_by/>
<renttype_detail>2</renttype_detail> <renttype_detail>2</renttype_detail>
</form> </form>
</forms> </forms>

6
spec/fixtures/exports/supported_housing_logs.xml vendored

@ -130,6 +130,7 @@
<relat8/> <relat8/>
<lar>2</lar> <lar>2</lar>
<irproduct/> <irproduct/>
<assigned_to_id>{assigned_to}</assigned_to_id>
<sheltered>1</sheltered> <sheltered>1</sheltered>
<hhtype>4</hhtype> <hhtype>4</hhtype>
<new_old>2</new_old> <new_old>2</new_old>
@ -144,15 +145,14 @@
<discarded_at/> <discarded_at/>
<creation_method>1</creation_method> <creation_method>1</creation_method>
<duplicate_set_id/> <duplicate_set_id/>
<created_by_id>{created_by}</created_by_id>
<formid>{id}</formid> <formid>{id}</formid>
<owningorgid>{owning_org_id}</owningorgid> <owningorgid>{owning_org_id}</owningorgid>
<maningorgid>{managing_org_id}</maningorgid> <maningorgid>{managing_org_id}</maningorgid>
<createddate>2022-05-01T00:00:00+01:00</createddate> <createddate>2022-05-01T00:00:00+01:00</createddate>
<uploaddate>2022-05-01T00:00:00+01:00</uploaddate> <uploaddate>2022-05-01T00:00:00+01:00</uploaddate>
<log_id>{log_id}</log_id> <log_id>{log_id}</log_id>
<assigned_to>{assigned_to}</assigned_to> <amended_by_id>{amended_by}</amended_by_id>
<created_by>{created_by}</created_by>
<amended_by>{amended_by}</amended_by>
<unittype_sh>7</unittype_sh> <unittype_sh>7</unittype_sh>
<confidential>1</confidential> <confidential>1</confidential>
<cligrp1>G</cligrp1> <cligrp1>G</cligrp1>

Loading…
Cancel
Save