oeplatform icon indicating copy to clipboard operation
oeplatform copied to clipboard

keep track of OEKG modifications (insertions, deletions)

Open adelmemariani opened this issue 2 years ago • 2 comments

Description of the issue

For OEKG, the ability to see which users have taken which actions is essential.

Ideas of solution

At least we should maintain a history of:

  • Insertions and deletions that users made
  • Time of the actions

We should also be able to roll back the OEKG to a previous state based on:

  • Specific users
  • Time of the actions

Workflow checklist

adelmemariani avatar Nov 01 '23 10:11 adelmemariani

I have implemented a history feature that tracks each modification made by a user. Each time a user makes a change in a bundle, while the oekg gets updated, the changed part of the bundle is being logged. It means the previous state of the bundle (before change) along with the new state (after change) of the bundle is being tracked. For each modification, the bundle ID, date and time of the change, and the user who did the change is saved. This will let us filter the changes based on the specific bundle(s), a period of time, or specific user(s). The following is a screenshot of the feature so far:

Screenshot 2023-11-02 at 14 18 33

Do you have suggestions about how to filter and navigate the history? We can also explore options for filtering a specific part of a bundle such as 'study-name' or ...

adelmemariani avatar Nov 02 '23 13:11 adelmemariani

Discussion from oekg-meeting today:

  • changes made by two users at the same time: how to deal with?
    • lock entities that are being edited for other edits
    • implement time out to prevent permanent locks
    • add in-memory-database?
    • lock single entities, or whole bundles, too?
  • have all changes in one place is nice, filtering for bundles, users, time are helpful, too.

stap-m avatar Nov 09 '23 09:11 stap-m