Unable to Open Timesheet due to Lock or other Error
search cancel

Unable to Open Timesheet due to Lock or other Error

book

Article ID: 25510

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

Timesheet is locked preventing users from being able to edit the timesheet.

In Classic Clarity, a TMA-0111 error can occur when attempting to perform an operation that saves a timesheet, e.g populate, submit, add task, return.

One or more of the following symptoms are observed:

  1. When reviewing the PRLOCK table, there are timesheet locks that do not get released.
  2. Deadlock errors and database connection closed errors appear in the APP and/or BG log corresponding to the timesheet action
  3. Services are suddenly stopped during timesheet editing
  4. In the Modern UX, you may see errors including:
    • "Could not get existing time entry information"
    • "Unable to obtain the lock to create the timesheet. Please refresh the page and try again."

    • As an administrator "You do not have access to <Resource Name" timesheet."

     5. When data is saved, and user goes back to the timesheet to review the task hours, the save does not take place.

Example: 

  1. A  timesheet was submitted with 1 hour, but returned by the resource manager to enter additional hours. 
  2. Then, when trying to update the 1 hour to another number or to charge hours against other tasks in the time card, it appears to save the data
  3. But, when you back out and go back in, it only shows the original 1 hour. 

Environment

Release: All 

Cause

A time entry lock is temporary and should be released immediately from the the PRLOCK table. In some cases the lock may not be cleared on it's own, one known cause is if there is a Database disconnect/outage 

Resolution

If on 15.7 or higher, see TMA-0111 error when saving timesheet where Administrators can use security.locks to remove the timesheet lock.

If on 15.6.1 or lower, or if the above step does not help, see the below. 

SaaS / On Demand Customers:

  1. Please contact the Broadcom Support team for assistance in resolving the issue. DE45799 was reported to investigate the root cause of the timesheet locks. The root cause was with the SaaS load balancer health monitoring status check in combination with specific functions in Oracle 12c resulted in sessions being killed. This has helped in alleviating the issue.

On Premise Customers:

Use the following details to resolve the issue.

1. Run the following query:

--Oracle
select * from prlock
where (prtablename = 'PRTIMESHEET'
and prname = '~prTimeEntry') or (prtablename = 'SRM_RESOURCES' and prname = '~prTimesheetCreate')
and prlockedsince < sysdate - 0.042

--MSSQL
select * from prlock
where (prtablename = 'PRTIMESHEET'
and prname = '~prTimeEntry') or (prtablename = 'SRM_RESOURCES' and prname = '~prTimesheetCreate')
and prlockedsince < getdate() - 0.042


--PostgreSQL
select * from prlock
where (prtablename = 'PRTIMESHEET'
and prname = '~prTimeEntry') or (prtablename = 'SRM_RESOURCES' and prname = '~prTimesheetCreate')
and prlockedsince < now()::DATE


2. If the query returns any results, run this query:

--ORACLE
delete from prlock
where (prtablename = 'PRTIMESHEET'
and prname = '~prTimeEntry') or (prtablename = 'SRM_RESOURCES' and prname = '~prTimesheetCreate')
and prlockedsince < sysdate - 0.042;
commit;


--MSSQL
delete from prlock
where (prtablename = 'PRTIMESHEET'
and prname = '~prTimeEntry') or (prtablename = 'SRM_RESOURCES' and prname = '~prTimesheetCreate')
and prlockedsince < getdate() - 0.042

--PostgreSQL
delete from prlock
where (prtablename = 'PRTIMESHEET'
and prname = '~prTimeEntry') or (prtablename = 'SRM_RESOURCES' and prname = '~prTimesheetCreate')
and prlockedsince < now()::DATE

NOTE: **This error could also occur in Classic view due to duplicate timesheets in the database.  Please see below KB000004723 for steps to resolve.

WORKAROUNDS:

  1. Using account with administrative rights in versions 15.7+, change URL to action:security.locks to remove the timesheet lock.
  2. As a temporary workaround, adding tasks to the timesheet in Classic Clarity may help in certain scenarios.
  3. If that does not help, the query listed above will need to be run to clear all locks including on future closed timesheets.

Additional Information