specify / specify6

Source Code for Specify 6, Biological Collections Management Platform
https://specifysoftware.org
GNU General Public License v2.0
14 stars 6 forks source link

Improve BatchEdit Auditing #524

Open maxpatiiuk opened 4 years ago

maxpatiiuk commented 4 years ago

In its current form Auditing in BatchEdit creates a separate record for each cell modified, all of its related cells and this way for each row of data modified

This means that editing 4 columns in a Locality query can produce 7 records of Auditing per one record of data

If there are 7 000 records of data, the resulting edit creates 49 000 records of auditing log

Needless to say that this is quite wasteful and affects performance negatively (As shown here)

A much smarter way would be to log the change of an entire column as only one row in auditing

This may cause a problem if the user has also decided to log the old and new values of each cell. A possible workaround would be to concatenate all new values in the single New Value cell and the same way for Old Value. Or we can give users a choice, whereas by editing their preferences, they can decide whether to save all values or allow for a better performance

realVinayak commented 2 months ago

Curious if this is still relevant in sp7 implementation. I'm doing field-level auditing, but only for changed fields. Thoughts?