Summary:
When trying to delete an activity, a message says that there are time entries related to this activity and so cannot be deleted. Deleted all historical timesheets and rechecked, however the same message comes up.
The hierarchy filtering was not checked and a user was added to the department which is at the top most level. The timesheet was then generated and the time was entered against the activity. At a later stage, the hierarchy filtering was enabled and this user was moved from the department at the top most level to few levels below.

Resolution:
Due to the changes made to hierarchy filtering and the changes made to the department that the user belongs as explained in Additional Information, the timesheet that was initially generated where the user entered time against the activity was hidden. This timesheet was not visible with the other historical timesheets since it was linked with the top most department.

Steps to be performed to resolve this issue:

  • As an administrator, click on the 'Administration' tab and then on the left hand side pane under the heading 'System', click on 'System Preferences'
  • Un-check the option 'Enable Hierarchy Filtering'
  • Save the 'System Preferences'
  • Inside 'Administration' tab, click on 'Historical Timesheet'
  • Delete the timesheets that are now visible
  • Click on the 'Projects' tab and click on 'Activities'
  • Click on the red X mark next to the Activity that needs to be deleted and confirm the deletion
  • Now, go back to 'Enable Hierarchy Filtering' inside the System Preferences and put a check mark and check the option that says 'Restore the department visibility that was in place for each project before hierarchy filtering was disabled. '
  • Save the System Preferences.