diff --git a/app/services/csv/sales_log_csv_service.rb b/app/services/csv/sales_log_csv_service.rb index 07ccad82c..b386b070f 100644 --- a/app/services/csv/sales_log_csv_service.rb +++ b/app/services/csv/sales_log_csv_service.rb @@ -249,7 +249,7 @@ module Csv return @attributes unless @user.support? mappings = SUPPORT_ATTRIBUTE_NAME_MAPPINGS - mappings = mappings.merge(SUPPORT_ATTRIBUTE_NAME_MAPPINGS_2025) if @year == 2025 + mappings = mappings.merge(SUPPORT_ATTRIBUTE_NAME_MAPPINGS_2025) if @year >= 2025 @attributes.map do |attribute| mappings[attribute] || attribute.upcase @@ -297,11 +297,10 @@ module Csv end def attribute_mappings - mappings = case @year - when 2024 - ATTRIBUTE_MAPPINGS.merge(ATTRIBUTE_MAPPINGS_2024) - when 2025 + mappings = if @year >= 2025 ATTRIBUTE_MAPPINGS.merge(ATTRIBUTE_MAPPINGS_2024).merge(ATTRIBUTE_MAPPINGS_2025) + elsif @year == 2024 + ATTRIBUTE_MAPPINGS.merge(ATTRIBUTE_MAPPINGS_2024) else ATTRIBUTE_MAPPINGS end @@ -348,6 +347,8 @@ module Csv %w[id status duplicate_set_id created_at updated_at collection_start_year creation_method bulk_upload_id is_dpo] when 2025 %w[id status duplicate_set_id created_at created_by_id updated_at updated_by_id creation_method bulk_upload_id] + when 2026 + %w[id status duplicate_set_id created_at created_by_id updated_at updated_by_id creation_method bulk_upload_id] else %w[id status duplicate_set_id created_at updated_at collection_start_year creation_method bulk_upload_id is_dpo] end