Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Umbraco Audit Trail Report

Does anyone know if there is a package available for Umbraco 7 which will produce a report listing content changes that have been made in a specified date range?

I would like to be able to specify a date range and have a list of all content changes. Ideally I would like to have the date, time, user and content before and after the publish.

Does anyone know if this is possible?

like image 248
Jimbo Jones Avatar asked Feb 08 '23 03:02

Jimbo Jones


2 Answers

I stumbled across this post and thought you might like to know I've written such a package (for Umbraco 7.4 > ). You can filter by date range, log type and other parameters.

enter image description here

https://our.umbraco.org/projects/developer-tools/diplo-audit-log-viewer/

like image 169
Dan Diplo Avatar answered Mar 03 '23 02:03

Dan Diplo


I don't think there is any package related to audit trail.

However, it should not be too hard to achieve what you want by querying the database.

First of, according to your description, you would need to join three table

  1. umbracoLog - this is where audit trail information is stored
  2. umbracoUser - to get the name who perform the action
  3. umbracoNode - to get the node information which got action perform

So a sql could be:

SELECT TOP 1000 [umbracoLog].[id]
      ,[userId]
      , userName
      ,[NodeId]
      , umbracoNode.text
      ,[Datestamp]
      ,[logHeader]
      ,[logComment]
  FROM [molweb2].[dbo].[umbracoLog]
  inner join umbracoUser on userId = umbracoUser.id
  inner join umbracoNode on NodeId = umbracoNode.id

Then base on what you need to filter, just add the relevant where condition.

For Example,

Show only between 2015/11/02 to 2016/01/12:

where Datestamp > '20151102' and Datestamp < '20160112'

Be careful, the current sql does not filter out non content audit trail.

like image 27
Alan Tsai Avatar answered Mar 03 '23 01:03

Alan Tsai