diff --git a/app/services/bulk_upload/sales/year2023/row_parser.rb b/app/services/bulk_upload/sales/year2023/row_parser.rb index c83c9161a..18634c859 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -896,6 +896,7 @@ private attributes["othtype"] = field_11 attributes["owning_organisation"] = owning_organisation + attributes["managing_organisation"] = owning_organisation attributes["created_by"] = created_by || bulk_upload.user attributes["hhregres"] = field_73 attributes["hhregresstill"] = field_74 diff --git a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb index 408ce099b..b66785afa 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -1162,6 +1162,14 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do end end end + + describe "#managing_organisation_id" do + let(:attributes) { setup_section_params } + + it "is correctly set" do + expect(parser.log.managing_organisation_id).to be(owning_org.id) + end + end end describe "#spreadsheet_duplicate_hash" do