Skip to content

[import] Warn before CSV update creates unmatched entities#2107

Open
frankrousseau wants to merge 1 commit into
cgwire:mainfrom
frankrousseau:fix-771-csv-import-confirmation
Open

[import] Warn before CSV update creates unmatched entities#2107
frankrousseau wants to merge 1 commit into
cgwire:mainfrom
frankrousseau:fix-771-csv-import-confirmation

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problems

Solutions

  • In the import preview modal, when "Update existing data" is checked and at least one line matches no existing entity, show a warning box listing the entries that will be created (with a count) and disable the confirm button until an explicit "I confirm that I want to create these new entries" checkbox is ticked
  • Extract the created-entries computation to csv.getNewEntityNames() in src/lib/csv.js and cover it with unit tests
  • Build filteredShots / filteredEdits from the full entity caches instead of the filtered display lists, mirroring the Assets fix for Importing CSV only checks loaded assets if already imported #927

When updating existing data from a CSV, lines whose names don't match
any existing entity (e.g. leading zeros stripped by the spreadsheet)
were silently created. The preview modal now lists the entries that
will be created and requires an explicit confirmation checkbox before
the import can run. The Shots and Edits pages also build the existing-
entity lookup from the full cache instead of the filtered display list,
mirroring the Assets fix for cgwire#927, so the check stays accurate.

Fixes cgwire#771

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When we update data with a CSV file, if the number of digits is wrong for the shots name, it will create unwanted shots

1 participant