Feature #12281

CSV import roundtrip feature

Added by Steve Breker 5 months ago.

Status:NewStart date:06/19/2018
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:-Estimated time:20.00 hours
Target version:-
Sponsored:No Tested version:

Description

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.

https://groups.google.com/forum/#!topic/ica-atom-users/6gZjcgBl6q0

These records failed to import because:
  • 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.

Also available in: Atom PDF