Browse Source

CLDC-3985: Bug fix - In BU irproduct_other retains value for all rent types (#3036)

* Conditional assignment for irproduct_other based on rent type 2025

* Conditional assignment for irproduct_other based on rent type 2024

* Update irproduct_other attributes to include field_11 in test

* Update irproduct_other attributes to include field_11 in test
pull/3039/head v0.5.8
Manny Dinssa 2 weeks ago committed by GitHub
parent
commit
d62e4dcfdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/services/bulk_upload/lettings/year2024/row_parser.rb
  2. 2
      app/services/bulk_upload/lettings/year2025/row_parser.rb
  3. 2
      spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb
  4. 2
      spec/services/bulk_upload/lettings/year2025/row_parser_spec.rb

2
app/services/bulk_upload/lettings/year2024/row_parser.rb

@ -1313,7 +1313,7 @@ private
attributes["illness_type_9"] = field_92
attributes["illness_type_10"] = field_95
attributes["irproduct_other"] = field_12
attributes["irproduct_other"] = field_12 if RENT_TYPE_BU_MAPPING[field_11] == 5
attributes["propcode"] = field_14

2
app/services/bulk_upload/lettings/year2025/row_parser.rb

@ -1310,7 +1310,7 @@ private
attributes["illness_type_9"] = field_92
attributes["illness_type_10"] = field_95
attributes["irproduct_other"] = field_12
attributes["irproduct_other"] = field_12 if RENT_TYPE_BU_MAPPING[field_11] == 5
attributes["propcode"] = field_14

2
spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb

@ -2603,7 +2603,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
end
describe "#irproduct_other" do
let(:attributes) { { bulk_upload:, field_12: "some other product" } }
let(:attributes) { { bulk_upload:, field_11: 6, field_12: "some other product" } }
it "sets value to given free text string" do
expect(parser.log.irproduct_other).to eql("some other product")

2
spec/services/bulk_upload/lettings/year2025/row_parser_spec.rb

@ -2376,7 +2376,7 @@ RSpec.describe BulkUpload::Lettings::Year2025::RowParser do
end
describe "#irproduct_other" do
let(:attributes) { { bulk_upload:, field_12: "some other product" } }
let(:attributes) { { bulk_upload:, field_11: 6, field_12: "some other product" } }
it "sets value to given free text string" do
expect(parser.log.irproduct_other).to eql("some other product")

Loading…
Cancel
Save