Problem/Motivation
Especially for the forms that allow users to update their submission, we need a way to keep the submissions history.
Proposed resolution
As webform_submission is a content entity, it's a good candidate to make it revisionable.
For inspiration, here are 2 issues from Drupal core that transformed taxonomy term entity into a revisionable entity
Remaining tasks
None.
User interface changes
- Webform settings will allow to enforce new revision (same as in node type form) but users with sufficient pernissions will be able to override
- All revision form elements will be present in the form, so on editing a submission user a decide whether to create a new revision (needs special permission) and add a revision log entry. Should follow all features provided for node entity
- Revision controller, route, links, etc. (same as for nodes)
- New revisions page, menu link, etc. (same as for nodes)
API changes
webform_submission entity type is revisionable
Data model changes
New appropriate tables to store revisions.
Comments
Comment #2
claudiu.cristeaComment #3
claudiu.cristeaComment #4
claudiu.cristeaComment #5
claudiu.cristeaComment #6
jrockowitz commentedFor now, you can use the submission log to track the history of a submission but you can't revert the data.
This feature would need to be built and maintained as a dedicated module. The challenge is supporting revisions while a webform can be changed which is going to really challenging.