From e625c7dbcb0ca244ffd6f89f6cdae34c1ef3e2c1 Mon Sep 17 00:00:00 2001 From: Anne Vandervord <72746727+AnneV-Learn@users.noreply.github.com> Date: Thu, 15 Jun 2023 11:58:47 +0100 Subject: [PATCH 1/3] Update freecen_csv_file.rb Correct issue where ED not being output when Civil Parish has changed. --- app/models/freecen_csv_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/freecen_csv_file.rb b/app/models/freecen_csv_file.rb index c052531b1..85eae23cf 100644 --- a/app/models/freecen_csv_file.rb +++ b/app/models/freecen_csv_file.rb @@ -805,7 +805,7 @@ def check_for_british(notes) end def compute_enumeration_district(rec) - if rec['enumeration_district'] == @initial_line_hash['enumeration_district'] + if rec['enumeration_district'] == @initial_line_hash['enumeration_district'] && rec['civil_parish'] == @initial_line_hash['civil_parish'] && !@initial_line_hash['civil_parish'].blank? line = @blank @use_blank = true else From bb3e53368685fe151bb4fae04e962e172099f353 Mon Sep 17 00:00:00 2001 From: Anne Vandervord <72746727+AnneV-Learn@users.noreply.github.com> Date: Sun, 18 Jun 2023 10:30:57 +0100 Subject: [PATCH 2/3] Update freecen1_vld_file.rb When computing 'Where census taken' treat a hyphen in Ecclesiastical parish as if Ecclesiastical Parish is blank --- app/models/freecen1_vld_file.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/freecen1_vld_file.rb b/app/models/freecen1_vld_file.rb index 0f8b4c9ba..51f31dbfd 100644 --- a/app/models/freecen1_vld_file.rb +++ b/app/models/freecen1_vld_file.rb @@ -482,11 +482,11 @@ def compute_ecclesiastical_parish(rec) def compute_where_census_taken(rec) if !@use_blank - line = rec['ecclesiastical_parish'] if rec['ecclesiastical_parish'].present? - line = rec['civil_parish'] if rec['civil_parish'].present? && rec['ecclesiastical_parish'].blank? + line = rec['ecclesiastical_parish'] if rec['ecclesiastical_parish'].present? && rec['ecclesiastical_parish'] != '-' + line = rec['civil_parish'] if rec['civil_parish'].present? && (rec['ecclesiastical_parish'].blank? || rec['ecclesiastical_parish'] == '-') @initial_line_hash['where_census_taken'] = line else - if rec['ecclesiastical_parish'].present? && rec['ecclesiastical_parish'] == @initial_line_hash['where_census_taken'] + if rec['ecclesiastical_parish'].present? && rec['ecclesiastical_parish'] != '-' && rec['ecclesiastical_parish'] == @initial_line_hash['where_census_taken'] line = @blank elsif rec['civil_parish'].present? && rec['civil_parish'] == @initial_line_hash['where_census_taken'] line = @blank From 870e0e21fbbb5b1146aae552680a8272318210d3 Mon Sep 17 00:00:00 2001 From: Anne Vandervord <72746727+AnneV-Learn@users.noreply.github.com> Date: Wed, 28 Jun 2023 14:04:39 +0100 Subject: [PATCH 3/3] Update freecen2_pieces_controller.rb Remove debugging : lines 122-123 --- app/controllers/freecen2_pieces_controller.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/controllers/freecen2_pieces_controller.rb b/app/controllers/freecen2_pieces_controller.rb index d008433fb..dc80d4fa4 100644 --- a/app/controllers/freecen2_pieces_controller.rb +++ b/app/controllers/freecen2_pieces_controller.rb @@ -119,8 +119,6 @@ def enter_number def export_csv @chapman_code = session[:chapman_code] @year = params[:csvdownload][:year] - p "AEV01 #{@chapman_code}" - p "AEV02 #{@year}" success, message, file_location, file_name = Freecen2Piece.create_csv_export_listing(@chapman_code, @year) if success