Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 bogus fields being added to some CSV file headers #2760

Open
stsccfr opened this issue Oct 27, 2024 · 0 comments
Open

3 bogus fields being added to some CSV file headers #2760

stsccfr opened this issue Oct 27, 2024 · 0 comments
Assignees
Labels

Comments

@stsccfr
Copy link
Collaborator

stsccfr commented Oct 27, 2024

I have found many CSV files in the database that contain 3 invalid extended CSV fields. These fields are sometimes being added by the FreeREG server to those supplied by the transcriber. The invalid fields are 'county', 'place', and 'record_type', and all are redundant, because we are already using 'chapman_code' and 'place_name' and the record type is the event type and is specified in the first line of the header. These 3 fields are not always being added, however, which suggests that it was not intentional to do so, but because they are not part of the extended CSV specification, their presence will cause problems for FreeComETT if we use that program to make corrections to the files. They are defined in the Free1CsvFile class, where a comment seems to acknowledge that they are redundant, but they are not defined in lib/freereg_options_constants.rb

An example is STSKISBU.csv in the live database (user JenniferLawson). The 6th line of the header containing the FlexCSV field names, and the first record, are as follows:

chapman_code,place_name,church_name,register_type,register_entry_number,death_date,burial_person_forename,burial_person_surname,burial_person_title,burial_person_abode,burial_date,person_age,person_title,notes,notes_from_transcriber,county,place,record_type
STS,Kingstone,St John the Baptist,PR,1,"",Richard,BENTLEY,"",Heatley,1 Feb 1813,19,"","","",STS,Kingstone,bu

As we see, the 3 redundant fields have been added to the list of fields in the header and to the end of each record in the file.

I am not sure where in the code these 3 extra fields are being added. It might be when we do setup_batch_for_processing() in ./lib/new_freereg_csv_update_processor.rb, but even if that is true, there is still the question of why they aren't always in downloaded files. Are we only adding them sometimes, or are we always adding them but then sometimes removing them when the file is downloaded? We will need to fix this for FreeComETT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants