Warn before editing shared records in QueryComboBox#7942
Open
foozleface wants to merge 1 commit intospecify:mainfrom
Open
Warn before editing shared records in QueryComboBox#7942foozleface wants to merge 1 commit intospecify:mainfrom
foozleface wants to merge 1 commit intospecify:mainfrom
Conversation
When Carry Forward copies foreign keys, multiple Collection Objects share the same related record. Clicking edit on a shared record now shows a warning dialog with record count, inspection links, and three choices: Cancel, Edit Shared, or Clone and Edit (safe default). - Generic for all table types (not just CO/CE) - Session memory checkbox to skip repeated warnings - Only shown when record is actually shared (count > 1)
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.
Fixes #597
Contributed by @foozleface
When Carry Forward copies foreign keys, multiple Collection Objects end up sharing the same related record (e.g., the same Locality via their Collecting Event). Clicking the pencil (edit) icon on a QueryComboBox field silently mutates the shared record, changing data for all referencing records without any warning. This PR adds a warning dialog that appears before editing non-dependent related records, showing how many records share the reference and offering three choices.
Implementation
Testing instructions
npx jest --testPathPattern sharedRecordWarning