Try ERPNext Buy Support Partners Foundation

Doc Field tracking history

I am trying to add field tracking feature to all the fields of a doctype. Just wanted to clarify one thing:

Where are the field history saved in the database. Like for example, if a lead is assigned to some other person, then this is shown on lead’s timeline. Where is this timeline data fetched from database?

Is there a configuration to put other fields on track?

I have figured out the database table in which the history is getting saved. Table name is tabCommunication.

All the logs (login , logout , assignments, document creation) are getting saved in this table.

Now if suppose I want to track change history of a docfield A, should I manually enter records into this table or is there any generic way to track field histories.

Yes, you need to write a code on change of doc field to maintain history.

Ref : https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/form/footer/timeline.js#L296

1 Like

@neeraj_yadav

have a look at:

https://github.com/aruizramon/frappe_analytics

2 Likes

Hello @saurabh6790 @JoEz

The link does not seem to be working now, is there any public link or could you please paste the code snippet here, thanks

Regards,
Darshan!