-
Notifications
You must be signed in to change notification settings - Fork 535
Description
Author Name: Philip Durbin (@pdurbin)
Original Redmine Issue: 3795, https://redmine.hmdc.harvard.edu/issues/3795
Original Date: 2014-03-31
Original Assignee: Kevin Condon
So far, every dataset has had a single corresponding Solr document. Now that we have versioning of datasets, Solr documents of published studies are being overwritten by draft versions when they are saved. This needs to change.
From a discussion between Gustavo and Merce on 2014-04-02:
- It would be confusing to see multiple cards for the same dataset at once.
- Try introducing a facet as a toggle between "published" and "draft".
The idea is that you'd only never see two cards for the same dataset at once. By default, you would see the published version. If you click the toggle, you will see only draft versions of datasets. Under the covers there will be two Solr documents such as id:dataset_42 and id:dataset_42_draft. Once the draft study is released, there will again only be one Solr document (and one card) for the dataset.
At a technical level, here's some pseudocode from a whiteboard:
OnSave:
// if it's a draft
if latestVersion == workingCopy
// create the draft Solr document
index dataset_42_draft
else
// index the published version
index dataset_42
// delete the draft
delete dataset_42_draft
If there's a workingCopy, the penultimate version should always be the published version.
Related issue(s): #214, #394, #472, #483
Redmine related issue(s): 3628, 3809, 3887, 3898