I was searching in the discussion forum for help regarding audit trail and document version controlling and I hit upon this link, https://github.com/aruizramon/frappe_analytics. I installed this app and followed the instructions and was really happy to see that it was creating a record with all the old information and the new information. The perfect solution for our requirements. A really good work on this. But, just wanted to check with you a couple of things. Though, it works on the development setup, can it be deployed on the production setup of the clients? Also, currently, all the history is being saved in Doc History Temp with a random name. Can the naming not be changed to the doctype and doc number or something?
Thanks a lot for this fantastic app and hoping to hear from you.
Uma
We have it deployed on our production setup, so it should work there as well! I believe I took care of all of the issues with installation, but that could be one potential roadblock. Iād take a db backup, deploy it locally, and test install /migrate it there. If that goes smoothly, itāll work in production as well.
As a side note - the way it works is as follows.
User saves a document.
a. Just before saving, a ādoc history tempā row is created in the database. The āold_docā field gets a copy of the pre-save document as a JSON blob.
b. Just after saving / validation, the same ādoc history tempā row above gets a copy of the updated doc in the ānew_docā field.
In a background task, all of the outstanding ādoc history tempā rows that have old and new doc data (including if a doc was deleted, created, etc) are compared. Any fields that have changed, save a few (such as modified, for example) have a row created in that docās specific history table (i.e. āLead Field Historyā).
In terms of naming - itās possible to create a name such as DocType/DocName/Hash. However, the improvements of doing something like this could be accomplished by changing the ātitleā field of the doc could be changed to show Doctype-Docname-Field or something similar. The hash is the primarykey of the table and needs to be unique (hence the jumbled characters).
Thanks a lot for your reply Alec. And, thanks for the response on my
queries. It works well on my laptop in the develop version but yes, will
take a backup before installing it on live.