Hello,
is there a proper / safe way to enable the audit for modules that are not audited ? for instance, documents ?
Many thanks,
Fred
Hello,
is there a proper / safe way to enable the audit for modules that are not audited ? for instance, documents ?
Many thanks,
Fred
I have not tried, but you should be able to do a vardef extension for the module:
in custom/Extension/modules/Documents/Ext/Vardefs/
$dictionary['Document']['audited'] = true;
QRR should then prompt you to create the _audit table for the module.
Then, of course, you will need to pick which fields you want audited.
FrancescaS
Hi Francesca Shiekh,
this is the way we proceeded but we want to be sure that we were not wrong.
Also, this is not enough because we have to add the VIEW AUDIT LOG entry in the record menu.
Fred
As I said I have not done this before but perhaps it's worth a try....
Did adding that dictionary definition create the audit table? If so I think that's a good start.
Did it allow you to make some fields in the module "auditable" in Studio? That would be another good sign.
You can try adding this to the actiondropdown in your record.php
array ( 'type' => 'rowaction', 'event' => 'button:audit_button:click', 'name' => 'audit_button', 'label' => 'LNK_VIEW_CHANGE_LOG', 'acl_action' => 'view', ),
And see if it works.
Not the most scientific approach but maybe you get lucky?
Or maybe someone much better than me, like André Lopes, or Chris Raffle has a better answer for you
FrancescaS
I have no advice to give because I think this is the most appropriate approach. I ran a quick test and confirmed the suggestion above should be sufficient to add the 'View Audit Log' option to the record view action menu. For Documents specifically, assigned user and team are already enabled for audit so it will start immediately tracking those changes in addition to any other fields you enable through Studio.
I have no advice to give because I think this is the most appropriate approach. I ran a quick test and confirmed the suggestion above should be sufficient to add the 'View Audit Log' option to the record view action menu. For Documents specifically, assigned user and team are already enabled for audit so it will start immediately tracking those changes in addition to any other fields you enable through Studio.