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.

Issue fork webform-3482197

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

claudiu.cristea’s picture

Issue summary: View changes
claudiu.cristea’s picture

claudiu.cristea’s picture

Issue summary: View changes
jrockowitz’s picture

Status: Active » Closed (won't fix)

For 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.