Incorrect data in Audit Trail: Direct updates on an audited attribute
search cancel

Incorrect data in Audit Trail: Direct updates on an audited attribute

book

Article ID: 252189

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

The scenario is as below.

  • An attribute has been included in the Audit Trail, from the application
  • There is a process in the system that does direct updates to the column that corresponds to this attribute in the Database, via a Gel Script
  • In the cmn_audits table, a new record is included after the update statement
  • This new record however copies the created_by from the previous record in the cmn_audits table and writes it into the new record

Cause

Update queries running directly against an audited attribute's column.

Resolution

Note: Direct updates to Clarity PPM Data Model is not supported.

  • When data is updated from the application through XOG or REST API, the account making the update is captured in the last_updated_by column
  • This information is used by a trigger in the database to populate created_by column of cmn_audits table
  • A direct update that only touches the column of the audited attribute, and does not make any change to the last_updated_by column, results in the account that had updated data previously, being incorrectly captured in cmn_audits table
  • This might appear as if created_by has been picked up from the previous record of cmn_audits
  • Whereas, in reality, this data would have been picked up from the table of the attribute. From the last_updated_by column.