Skip to content
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

IQSS/10793 Improve Handling of Parallel Edit/Publish errors #10794

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Aug 22, 2024

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:

  • for the Edit Metadata case, this PR causes the display to stay on the metadata edit/terms edit page to allow users to copy their text before it disappears.
  • for the Publish case, the Publish lock is removed if an OptimisticLock occurs, so the user is able to refresh the page and try again.

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?

This just causes a double refresh that removes any error message before
you can read it (like the OptimisticLock/parallel edits in this PR)
@qqmyers qqmyers added GDCC: DANS related to GDCC work for DANS Size: 3 A percentage of a sprint. 2.1 hours. labels Aug 22, 2024
@coveralls
Copy link

coveralls commented Sep 3, 2024

Coverage Status

coverage: 20.864% (-0.005%) from 20.869%
when pulling 8a3fe73 on GlobalDataverseCommunityConsortium:IQSS/10793-handle_optimisticlockexceptions
into a0cb73d on IQSS:develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GDCC: DANS related to GDCC work for DANS Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Parallel Edits/Publishing result in unclear errors/abandoned lock
2 participants