Document status tracking

When looking at a document, I want to view the changes in the document status - i.e. changed from status a to b, at time c, by user d.

Is there anything like that already?

Or more generically, an audit table that records the changes to any property?

Many thanks.

There is no audit table, but the Submit action is not added to Comments.

So to do this, I think I would create an app that uses a server side hook, to register an “on save” hook for ALL doc types, and when that fires, create a new instance of a DocType “AuditRecord”, with appropriate columns (entity doctype, entity id, user, time, new value).

a) Does that sounds correct, and doable, within the framework?
b) Specifically, is the hook for ALL doc type changes possible?

If so, I will be happy to contribute it back.

Thanks.

I thint the best place to add this is in Comments. Comment already had a “type” property and we already log events like attachment added, removed, assigned, etc.

What we can do is:

In DocType, add a property Track Changes

If that is set, always add a comment on insert and every update (also save a diff of the properties changed).

This is how comments are added on submit

You can just modify this method and add a condition to check “track_changes” and then add comment also for “Save”

If you push your code, will be happy to guide you!

This will be a very useful functionality to have. We have been waiting for this for a while. Look forward to this being developed.

Kind regards,
MP

Has there been any updates on this? Has anyone implemented this successfully, I’ll be happy to get any pointers. I have also raised a similar issue at Status of Audit Trail or How to Implement

Regards,
Morris

Morris,

There has been upgrade on this front in ERPNext V5. In the Comments section, actions like Save, Submit, Cancel, attachments are updated.

The feature is implemented in Frappe 7.3