-
Notifications
You must be signed in to change notification settings - Fork 41
Don't trigger unload protect when re-opening to-one resource in dialog #6502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
CarolineDenis
approved these changes
May 12, 2025
sharadsw
approved these changes
May 12, 2025
alesan99
approved these changes
May 13, 2025
Contributor
alesan99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
- Ensure that the save button (unload protect) is not enabled on either the related record or base record
- Save the base record and ensure no out-of-date errors occur
Works! 👍👍👍
Tried on Collecting Events and Accessions.
chrome_fB2WnUJwPG.mp4
chrome_ID8AiCXzy4.mp4
Also seems to fix being able to save the readonly taxon parent form.
bronwyncombs
approved these changes
May 13, 2025
bronwyncombs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Ensure that the save button (unload protect) is not enabled on either the related record or base record
Screen.Recording.2025-05-13.at.9.13.38.AM.mov
- Save the base record and ensure no out-of-date errors occur
Screen.Recording.2025-05-13.at.9.14.24.AM.mov
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.
See #6488
The Issue
When rendering an independent
to-onerelationship (CollectionObject -> accession,CollectionObject -> collectingEventif shared, etc.) via Query Combo Box where the reverse relationship (Accession -> collectionObjects,CollectingEvent -> collectionObjects, etc.) was rendered as a Subview, opening the related record's form after the first time would cause Specify to internally think the related record's version of the "main" record had changed.If the related record is saved, Specify also modifies each of the
to-manyside of the relationship: which triggers their version and timestamp modified to be updated. The main form version of the record is not updated, which led to the (appropriate) out-of-date error.6488_out_of_date.mov
6488_unload_protect.mov
This PR addresses the first solution (provided below) mentioned in #6488 (comment)
Checklist
self-explanatory (or properly documented)
Testing instructions
Accession -> collectionObjects). For the to-one side of the relationship (e.g.,CollectionObject -> accession), make sure it is on the form either as a QueryComboBox or as a button and that the other table's form (e.g.,Accession) has theto-manyrelationship back to the base table as a Subview (Accession -> collectionObjects)All relationships for which the Issue can occur
To use this table, make sure the
To-One Fieldis rendered on the Base Table form as a Query Combo Box or (Subview) Button and the form of theTo-One Fieldhas theIndependent Back to Baseas a Subview