CSV import roundtrip feature
|Category:||-||Estimated time:||20.00 hours|
This ticket stems from a Groups discussion where a user attempted to export a CSV of descriptions, modified the identifier values in the CSV, and attempted to re-import the CSV back into AtoM.
- Keymap matching is not applicable, and will fail because legacyId in the CSV will be the AtoM information object id and not the original source_id.
- secondary matching on the combination of title, identifier and repo name will fail because the identifier was changed in the CSV.
This change will add new matching logic specifically to support CSV round-tripping:
- Add logic to lib/QubitFlatfileImport.class.php to directly match from legacyId to informationObject.id when a new CLI param is set (--roundtrip).
- This feature will be available on the CLI only.
- When --roundtrip is set, display a warning like the upgrade-sql warning indicating to the user they should only use this if it's actually a round trip, and that they have made a DB backup beforehand.
- Allow a 'force-silent' option to suppress this warning in case it needs to be scripted.
- Update the AtoM docs to include this feature and provide some detail on how matching works, and when each type of matching is used.
- When --roundtrip is set, do not attempt keymap matching or secondary title, identifier, reponame matching - only match legacyId to info obj id.
- Do not create a keymap record when --roundtrip is set.
- Audit log should reflect this record update when the CSV is loaded (e.g. "description was updated").
- Ensure CSV records that are still unmatched even when using --roundtrip are not imported.