Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Tracking changes on field level on entities

Parent Feed: 

One of our clients had a request where he wanted to track and filter changes on some entities per field level so he can filter them and check new and old values and react only if they had some value that was interested to him.

Now if we're talking about revisions then we track everything and client wanted to track only changes on some fields and not on whole entity in general. This led us thinking and we created a module for tracking changes on entities. The module is called Entity log and you can find it on this link below:

https://www.drupal.org/project/entity_log

When you install the module you can go to /admin/config/entity-log and setup which fields you want to track in log and select where you want to log changes (watchdog or Entity log entity).

It is simple enough for user (admin or moderator) to select fields he wants to track. (Check the image below)

selected fields

After checking what you want you can create view that will be your log viewer. So lets do that below:

log view

We select fields we want in our view like below and we have new entity log tracker.

entity log tracker

Since this is a drupal entity you can create any kind of view that suits your needs for logging and with fields you want to be included. Hope you enjoy the module.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web