Merged
Conversation
Validates that source identifiers are present and unique. This addresses three situations which can occur with source identifiers: 1. A source identifier is missing from a row in the CSV file. 2. A source identifier is duplicated within the same CSV file. 3. A source identifier already exists in the repository, which would result in an update instead of a new record being created.
Finding existence in the entity table isn't adequate for determining if a record exists in the repository. Additionally the find by identifier wasn't using the correct term to look up.
Splits row validations into errors or warnings. This allows us to display warnings in the UI without preventing the user from proceeding with the import. The UI will display warnings in a different color and with a warning icon, while errors will still prevent the user from proceeding until they are resolved.
laritakr
commented
Apr 3, 2026
| def build_find_record(mapping_manager, mappings) | ||
| work_identifier = mapping_manager.resolve_column_name(flag: 'source_identifier', default: 'source').first&.to_s || 'source' | ||
| work_identifier_search = Array.wrap(mappings.dig(work_identifier, 'search_field')).first&.to_s || | ||
| def build_find_record |
Contributor
Author
There was a problem hiding this comment.
In order to find the correct identifier from the mappings, we have to load the mappings here. The mapping manager excluded the source_identifier and the find was falling back to the wrong search term.
kirkkwang
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Validates source identifiers
Screenshot
Exported as file
row-errors-and-warnings_errors (1).csv