Object Audit Tab Error: System error. Contact System administrator
search cancel

Object Audit Tab Error: System error. Contact System administrator

book

Article ID: 234392

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

Object instances such as ideas, projects are no longer accessible. 
The generic error shows: System error. Contact System administrator.

APP logs show:

ERROR 2022-02-08 09:49:11,813 [http-nio-8080-exec-7487] niku.xql2 (clarity:user:session:odf.ideaAuditTrailReturn) 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
Executed:
 select  data.id, data.type, data.attribute_code, data.column_name,
                ODF_AUD_VALUE_FCT(data.value_before, data.attribute_type,?) value_before,
                ODF_AUD_VALUE_FCT(data.value_after, data.attribute_type,?) value_after,
                data.operation_code,
                data.created_by, data.created_date,
                data.attribute_type, data.audit_id, row_number() over (order by data.created_date) row_num, count(*) over () num_rows  , r.full_name from (
              select  audits.object_id id, audits.object_code as type, audits.attribute_code, audits.column_name column_name,
                      audits.value_before, audits.value_after,
                      audits.operation_code,
                      case when audits.operation_code=? then c.last_updated_date else audits.created_date end created_date,
                      case when audits.operation_code=? then c.last_updated_by else audits.created_by end created_by,
                      audits.attribute_type, audits.id audit_id
              from    odf_aud_obj_inst_context c,
                     (select  ai.object_id, ai.object_code, ai.attribute_code, ai.column_name column_name,
                              ai.value_before value_before,
                              ai.value_after value_after,
                              ai.operation_code, ai.created_date, ai.created_by, aa.audit_attribute_type attribute_type,
                              ai.id id
                      from    cmn_audits ai,odf_objects o,
                              (select distinct object_code, attribute_code,audit_attribute_type
                               from   odf_audited_attributes) aa
                      where   ai.object_code=aa.object_code
                      and     ai.attribute_code = aa.attribute_code
                      and     o.code=ai.object_code   and UPPER(ai.object_code) = UPPER(?)   and ai.object_id = ?    union all
        select  ai.object_id, ai.object_code, ai.attribute_code, ai.column_name column_name, NULL value_before,
                NULL value_after, ai.operation_code, ai.created_date, ai.created_by,
                aa.audit_attribute_type attribute_type, ai.id id
        from    cmn_audits_tsv ai, odf_objects o,
                ( select distinct object_code, attribute_code,audit_attribute_type
                  from  odf_audited_attributes) aa
         where  ai.object_code = aa.object_code
         and    ai.attribute_code = aa.attribute_code
         and    o.code=ai.object_code   and UPPER(ai.object_code) = UPPER(?)   and ai.object_id = ?    ) audits
        where   audits.object_id = c.object_instance_id
        and     audits.object_code=c.OBJECT_CODE  ) data, srm_resources r where r.user_id = data.created_by  order by data.created_date

Resolution

Please contact Support to have a check on the functions and tables related to the audit view.

In reported cases, the function (odf_aud_value_fct) was missing and needed to be created.