keystonejs / keystone

The superpowered headless CMS for Node.js — built with GraphQL and React
https://keystonejs.com
MIT License
9.25k stars 1.16k forks source link

Adding a "change log" for lists that records the version history of items #321

Closed molomby closed 3 years ago

molomby commented 6 years ago

Functionality by which all changes to items are logged. This would probably be configured on a list level.

Outstanding questions include:

Some of these questions need to be answered to design the common Keystone components (such as the Admin UI), others will end up being adapter-specific.

"We" have build functionality like this before (Bluetree had versioned tables). More recently, Hotel101 implemented similar functionality in userland (for rate cards); we add multiple records to a table that span a single "lineage" ID.

JedWatson commented 6 years ago

Keystone 4 had a feature that implemented this as well, using a second collection. It stored the diff of changes with each save to a document. It was never surfaced in the Admin UI, but you could enable it with the history option.

Implementation here: https://github.com/keystonejs/keystone/blob/master/lib/schemaPlugins/history.js

stale[bot] commented 5 years ago

It looks like you haven't had a response in over 3 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contributions. :)

stale[bot] commented 4 years ago

It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)

MadeByMike commented 4 years ago

We've got hooks as as well as the updatedAt/updatedBy list plugins.

This is probably more about having an option to turn delete into a "soft delete" where every version update to an item is a new version and the previous is soft deleted. - Probably a good idea.

charkour commented 1 year ago

Although this issue was closed, this feature does not exist, correct?

Is there a way to do this with Keystone 6?

Thank you.

dcousens commented 1 year ago

Hi @charkour, you are correct that this is not actively a feature in keystone-6, you can somewhat track the feature request using https://github.com/keystonejs/keystone/discussions/5998 if that fits for you.

I might lock this thread, it's somewhat misleading as none of the responses are relevant to keystone-6 as it stands today.