metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

Fixing a pop-up window that causes confusion after submitting a dataset

Open angelchen7 opened this issue 5 years ago • 5 comments

Describe the bug After clicking "Submit Dataset" on the site, green text appears stating, "Thank you, your changes have been saved. Your data set is under review by the Arctic Data Center team." However, if you click "View your dataset," a small pop-up window appears saying that if you leave the page, any unsaved changes will be lost. This may confuse PIs because they may be unsure if their data is actually saved or not. I think the pop-up window should be deleted or say something different.

To Reproduce Steps to reproduce the behavior:

  1. Click on any dataset at ADC and click "Edit"
  2. Make any edits
  3. Click "Submit dataset" when you're done
  4. Click "View your dataset"
  5. Pop-up window should appear saying that if you leave the page, any unsaved changes will be lost.

Additional context A PI was confused when this happened to her here: https://support.nceas.ucsb.edu/rt/Ticket/Display.html?id=20184

angelchen7 avatar Sep 02 '20 22:09 angelchen7

@laurenwalker this seems to have caused some confusion again on a separate ticket

laijasmine avatar May 04 '21 16:05 laijasmine

@laijasmine Thank you

laurenwalker avatar May 04 '21 16:05 laurenwalker

Documenting another case raised in RT.

laijasmine avatar Aug 24 '21 15:08 laijasmine

The same issue, except in portals: https://github.com/NCEAS/metacatui/issues/1267

robyngit avatar Oct 18 '23 12:10 robyngit

Notes from looking into this:

  • In EML211EditorView, the "unsaved changes will be lost" popup shows when the hasUnsavedChanges method returns true.
  • EML211EditorView.hasUnsavedChanges returns true if MetacatUI.rootDataPackage.getQueue() has any items in the queue (length > 0).
  • DataPackage.getQueue() simply filters the models in the collection for any that have uploadStatus set to q (queuing) or p (in progress).
  • In my tests, the metadata document in the package did in fact have uploadStatus set to q (thus giving a queue length of 1), even though it was already successfully uploaded.
  • So the fix involves investigating why that status doesn't change after a successful upload.

robyngit avatar Jul 24 '25 16:07 robyngit