Deletion of custom object causing Audit Trail "System Error"
search cancel

Deletion of custom object causing Audit Trail "System Error"

book

Article ID: 235142

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Deleting a Custom Object deletes all the records in the Captions table instead of specific records that are only related to the object being deleted. This can cause the Audit Trail functionality to fail on other fields associated with other objects that are still in the system. 

STEPS TO REPRODUCE: 

  1. Login to Clarity.
  2. Create a Custom Object with ID "z_test_object".
  3. Connect to database and run "select count(1) from ODF_AUD_LOOKUP_CAPTIONS" and take backup using "create table ODF_AUD_LOOKUP_CAPTIONS_bkp as select * from ODF_AUD_LOOKUP_CAPTIONS"
  4. Delete the custom object from Application.
  5. Run "select count(1) from ODF_AUD_LOOKUP_CAPTIONS" on database 

 

Expected Results: Only entries that pertain to the specific Custom Object should be deleted. 

Actual Results: All Caption records are deleted causing issues with Audit Trail if other object fields are being audited. The Audit Trail tab (Administration -->
Data Administration --> Audit Trail) shows the message: ERROR System error. Contact system administrator in PostgreSQL database only 

Audit Trail tab shows below error.

ERRORSystem error. Contact system administrator.

App- ca logs show the error stack .

CF4E5439886D:odf.auditTrail) Internal Processing exception
java.lang.Exception: Invalid expression audits: com.niku.union.persistence.PersistenceException: 
SQL error code: 0
Error message: ERROR: query returned no rows
  Where: PL/pgSQL function odf_aud_value_fct(text,numeric,text) line 25 at SQL statement

Environment

Release : 16.0.0, 16.0.1 

Component : CLARITY STUDIO

Cause

This is Caused by DE64154 which removed the data from ODF_AUD_LOOKUP_CAPTIONS when a custom object is deleted.

Resolution

Resolved in 16.0.2 and in 16.0.1 Patch #1 (16.0.1.1) 

  • The resolution covers both reported issues:
  • DE64154:  Deletion of custom object causing Audit Trail "System Error" 
  • DE63809:  Some audited attributes cause a System error on audit trail tab of project 

 

On Premise Customers: 

  • Reach out to Broadcom support for a fix till the patch is available 

GCP SaaS Customers:

  • The fix is now applied in all non production and production environments in SAAS

 

Additional Information

For DE63809, reference: Audit trail tab for the projects is throwing System Error