IQSS/10793 Improve Handling of Parallel Edit/Publish errors #10794
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.
What this PR does / why we need it: This PR catches the OptimisticLockExceptions caused by an edit or publish attempt on a dataset that has been changed since the dataset page view was created and provides clearer error messages indicating what happened and how to recover. In addition to the error messages:
Which issue(s) this PR closes:
Closes #10793
Special notes for your reviewer: I think the double refresh on the terms page was added when the check for file access requests allowed or terms of access required logic was added in #8308 where both the original commandButtons and the new remoteCommand for saving terms do update=":datasetForm,:messagePanel"
Suggestions on how to test this: Pretty easy to load two windows for the same dataset, make an edit in one and save and then make an edit to metadata/terms/etc. or try to publish in the other. Since this PR mostly updates the error messages, I hope that other changes on the page work ~as before/hopefully better with the new error messages, but I haven't tried all the buttons.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?: added
Additional documentation: I only saw one line in the user guide that says you can edit metadata (at the end of the Add New Dataset section) and it seems like this is too much of a corner case to add to that. If there was a whole edit section telling you how to do that, adding a sentence to say you should avoid editing in two windows might make more sense. Or maybe we need a FAQ?