FOLIO-FSE / folio_migration_tools

A Python module and CLI tool that transforms legacy ILS data into the native FOLIO formats and loads it into FOLIO
MIT License
11 stars 9 forks source link

Difference between data-import app and condition implementation #547

Open jermnelson opened 1 year ago

jermnelson commented 1 year ago

When doing record QA on our recent migration load, one of Stanford's staff members noted a difference between how the mod-data-import imports records using our Nolana mappings and how folio_migration_tools implements the same condition. For the remove_prefix_by_indicator condition for the indexTitle, the following 245 field:

=245 10$a!Abracadabra! :$ba novel /$cby Wolf Mankowitz.

is returned as '!Abracadabra! : a novel' without the trailing backslash due to the regular expression [substitution] (https://github.com/FOLIO-FSE/folio_migration_tools/blob/64f8519afe62418fcc47857f30ae3c6bdc691a00/src/folio_migration_tools/marc_rules_transformation/conditions.py#L236-L238).

Using the data-import app, the trailing slash for the indexTitle is retained when importing the MARC record into FOLIO. What is the reasoning behind this logic? It seems to extend beyond the intention of this condition and if institutions wish to remove the trailing backslash, they could just add the remove_ending_punc condition to this rule.

fontanka16 commented 1 year ago

Good point @jermnelson . I think this is a remnant of older times and ideas. I will check with the team.

branchedelac commented 1 year ago

I wonder if tweaking the custom implementation of conditions here, to make it behave like data import, would also solve https://github.com/FOLIO-FSE/folio_migration_tools/issues/197

jermnelson commented 1 year ago

At Stanford, our staff just discovered another example of differing implementation between how folio_migration_tools and FOLIO data-import-processing-core implement the remove_ending_punc condition.

In the list characters, "." and "-" are included but in FOLIO mod-data-import these characters are absent