Unable to Update the Resource OBS

book

Article ID: 198047

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

The error appears in the UI when updating the Administration > Resources > OBS and Partitions > Resource OBS field:
System error. Contact System administrator.

The APP log shows :

ERROR 2020-08-24 10:12:22,054 [http-nio-80-exec-21] niku.xql2 (clarity:admin:xxx__xxxx:nmc.updateUserObsAndPartitions) ServiceHandler.postProcess failed.
com.niku.union.persistence.PersistenceException: 
SQL error code: 0
Error message: ERROR: null value in column "transaction_id" violates not-null constraint
  Detail: Failing row contains (6033735, resource, 5054004, odf_ctr__1097754082, SRM_RESOURCES, , null, /Corporate/A/B/C - Staff, null, 5000054, U, 2020-08-24 10:12:22.026, 1, 2020-08-24 10:12:22.026, 1, null).
  Where: SQL statement "INSERT INTO CMN_AUDITS( ID, OBJECT_CODE, OBJECT_ID,  ATTRIBUTE_CODE,  TABLE_NAME,  COLUMN_NAME, VALUE_BEFORE ,
                  VALUE_AFTER, RAW_VALUE_BEFORE, RAW_VALUE_AFTER, OPERATION_CODE, CREATED_DATE, CREATED_BY, LAST_UPDATED_DATE, LAST_UPDATED_BY, TRANSACTION_ID )
        SELECT nextval('cmn_audits_s1'), V_OBJECT_CODE, V_OBJECT_ID, V_ATTRIBUTE_CODE, NEW.table_name, '',null, OBS_UNIT_FULL_PATH(NEW.unit_id) , null, NEW.unit_id, 'U', V_LAST_UPDATED_DATE, V_LAST_UPDATED_BY, V_LAST_UPDATED_DATE, V_LAST_UPDATED_BY, V_TRANSACTION_ID"
PL/pgSQL function trigger_fct_audit_obs_attributes() line 160 at SQL statement

 

Cause

This is reported as DE56620 and is resolved in 15.8.1.1

The trigger function can be checked in the file: AUDIT_OBS_ATTRIBUTES.xml
or trigger function: trigger_fct_audit_obs_attributes

 

Environment

Release : 15.8.1

Component : CA PPM SAAS APPLICATION

Resolution

The new trigger function should have changes, e.g. line 32 should have
SELECT txid_current() INTO STRICT V_TRANSACTION_ID; (is updated) 
whereas
SELECT txid_current_if_assigned() INTO STRICT V_TRANSACTION_ID; (is old)

If the updated trigger function is needed, please open a case with Support as there is a mismatch between the app XML and database stored procedure.