Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module helps you compare two revisions of an entity and identify which fields have changed. It can also specifically list the values that have changed within a particular field and display this information inline with optional custom labels.

Provides helpers (for use in other contrib modules or custom code) to get the list of fields changed between two given revisions of an entity.

Features

  • List the changed fields between two revisions of a content entity.
  • List the values changed in a specified field.
  • For a given field, show its label (optionally overridable) and the values changed inline.

Post-Installation

Enable and use one of Revision Summary's helper methods in your custom code.

You can use it like this to list the fields that have changed between the current revision of a node and an arbitrary version ID.

\Drupal::service('revision_summary.compare_revisions')->listChangedFields($node, $version_id, ['field_example', 'field_other_example']);

or:

$build['field_reasonable_accommodation'] = \Drupal::service('revision_summary.compare_revisions')->giveFieldNameWithChangesInlineAsMarkup(
  entity: $node,
  version_id: $revision_id,
  field_name: 'field_reasonable_accommodation', 
  field_label: "R.A."
);

(Field label here is optional; if it is not provided the field's display name will be taken from the provided entity.)

Note that the underlying Diff module displays most fields like you would expect by default, but Drupal core list fields (numeric lists, text lists) show only the key, not the label value. So to have the field say "R.A. added Wheelchair Full Access, incl. Roll-in Shower" instead of perhaps "R.A. added 3" you will want to go to /admin/config/content/diff/fields and edit the settings (gear icon) for the relevant field, leaving the plugin set to List Field Diff but changing the Comparison method from only "Key" to "Label" or both— "Label (key)".

Additional Requirements

No recommended modules but extremely vaguely related is Revision Helper.

Similar projects

If you are not aware of it, certainly see what Diff module can do in its own right, with additional entity types supported by Entity Diff UI.

Supporting this Module

You can support Agaric's overall contributions to Drupal and a bit beyond by supporting Drutopia at opencollective.com/drutopia. Thanks!

Community Documentation

Documentation help always welcome; right now this module page is mostly it.

Activity

Total releases
2
First release
Apr 2025
Latest release
10 months ago
Releases (12 mo)
1
Maintenance
Slowing

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Sep 4, 2025
1.0.x-dev Dev Apr 6, 2025