openneuro
openneuro copied to clipboard
UI element to revert to latest snapshot
Is your feature request related to a problem? Please describe.
User story: A user makes several changes to a dataset, losing track of the full set of changes made. They want to see a comparison between the latest snapshot and the current draft, to decide if they have made all (and only) the changes they want for a new snapshot. They discover that some changes need to be reverted, and would like to start over at the latest snapshot.
Describe the solution you'd like
A "Revert to latest snapshot" button. This should not allow reversion to previous snapshots.
Describe alternatives you've considered
The current alternative is to either allow the draft to be removed after 28 days or file a support ticket so an admin can revert the dataset for the user.
Another alternative could be "restore version". For the latest version, it simply runs git reset --hard $TAG. For previous versions, it would run git reset --hard $LATEST; git checkout $TAG .; git reset HEAD CHANGES; git commit -m "Restore version $TAG".
This is basically implemented on the server side as an admin only API. Do we want to enable this without the diffing functionality? It has some potential for data loss but with confirmation and explanation I think it would be useful to just have the button available.
Yes, I think that's fine.