How to remove a start timer stuck on a deleted Issue in Reports and Timesheets for Jira Data Center app
Overview
This article provides steps to resolve the issue where Appfire’s time tracking feature continues to track time on a deleted issue, preventing users from assigning the tracker to a new issue. The workaround involves identifying and removing the stuck timer entry from the database.
Steps to identify and remove the stuck timer
Find the user key for the affected user
Use the following query to get the
user_key
of the user whose timer is stuck:SELECT "user_key" FROM "app_user" WHERE "lower_user_name" = '<username>';
Retrieve the user ID for time tracking
Once you have the
user_key
, find the correspondingUSER_ID
in the time tracking system:SELECT "ID" FROM "AO_6B9F04_AIO_USER" WHERE "ACCOUNT_ID" = '<user_key>';
Identify the timer record
Use the
USER_ID
from the previous step to locate the active timer record.SELECT "ID", "ISSUE_KEY", "USER_ID" FROM "AO_6B9F04_AIO_TIMER" WHERE "USER_ID" = '<USER_ID>';
Verify that the retrieved records match the stuck timer.
Delete the stuck timer record
After confirming the stuck timer, delete the stuck timer entry:
DELETE FROM "AO_6B9F04_AIO_TIMER" WHERE "USER_ID" = '<USER_ID>';
Result
After running the queries and deleting the stuck timer record:
Time tracking will no longer be associated with the deleted issue.
Users can start a new timer for other issues.
Validate the queries in a test instance before executing them in the production database.