Approved timesheet not posting: Error: "Couldn't post time entry..."
search cancel

Approved timesheet not posting: Error: "Couldn't post time entry..."

book

Article ID: 140154

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

After running the Post Timesheet job, you see there is an approved timesheet that is not moving to the Posted status
Looking at the bg-ca.log file, you see the following error:
ERROR 2019-10-16 16:04:29,377 [Dispatch pool-5-thread-10 : myPPMuser (tenant=clarity)] xql2.xbl (clarity:myuser:86301970__A09EC2EB-5DE9-4106-B399-27924200EAE4:Post Timesheets) ****POSTTIMESHEET: Couldn't post time entry-->timesheetID=5116383; timeEntryID=6549261; assignmentID= 

Cause

There is a data integrity issue where an orphan record exists. This issue may be due to a missing row at the PRTASK table where there is an assignment record that does not have a referenced entry on the PRTASK table.

Example:

The timesheet is showing 9 tasks in the UI and at the DB level on the PRASSIGNMENT table, you have 10 rows, 1 being orphan.

Resolution

  1. If you are facing this scenario, contact support. If you are On Premise, provide the output of the below two steps. 
  2. Run the below and note the data returned:

    Select * from PRTIMEENTRY where prtimesheetid = 5116383

    (The ID is taken form the log message)
  3. For the affected prtimentry row run:

    Select * from PRTIMEENTRY where prid = 6549261
    Ensure that the data returned on the first query has got a matching record at the PRASSIGNMENT and the PRTASK tables.

Additional Information

See also: Approved timesheets not posting - Master KB of known issues