-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
Feature workspace/Draft #1527
Feature workspace/Draft #1527
Conversation
This means a lot of small changes in several places where metadata is used. This also means a big change on how GeonetEntity creates xml (asXml). All the tests pass. Not warranteed that all the functionalities remain stable, because now there are database searches that have to handle two tables at the same time. Lot of room for improvement.
…intain and to *enhance*. All this utility classes are pluggable by xml bean definition, so if you want to modify how a metadata is stored or extracted, you can.
…ing works. Still pending more tests. No tests on multinode yet.
…nction to load them from context. MultiNode tested.
Now, when you try to edit a published record, a draft is created and showed instead.
Pending: * Redirect to draft when trying to edit published metadata * If draft is published, replace metadata * If metadata is unpublished... what happens with the draft?
…. Keeps original id.
…r not draft depending on the privileges)
…ocessing of publication
…efault (to see how tests behave on Travis)
…feature_workspace
b597545
to
3f3e803
Compare
So, Travis does not agree with me. Also, it fails on places I haven't modified 🤔 Locally, all tests run fine: [INFO] Reactor Summary: |
…ting in memory database.
…feature_workspace
Ok this is a nightmare. I'm giving up on this branch. Starting from scratch. Wait for my smaller but concatenated PR in the following days... |
The idea is simple:
When a published metadata is edited, a new copy is saved on both the database and the index marked with the draft flag. This way a user with enough privileges can view, search and edit published metadata without modifying what the rest of the users see about this metadata. This is specially useful for long editings (that last more than one session) or edits that need some kind of review from several users before getting published.
This draft is blocked while a user is editing it to prevent other concurrent editing with other users. This block is released either when the editor is closed or after a timeout of inactivity. Once the draft copy is published, the original published metadata gets replaced with the draft copy and the draft is removed from the system.
Drafts will be saved on a different table on the database, so we can keep a unique identifier by uuid on the metadata table. The lucene index will be the same, just adding the "draft" flag.