When clicking on the 'Delete Team' button in the New UX, I get an “Error deleting a Team” error. Why?

Document ID : KB000124417
Last Modified Date : 18/01/2019
Show Technical Document Details
Issue:
Steps To Reproduce: 

1. Click on 'Home' -> 'Link to new UX' 

2. Click on 'Administration' icon from the left side of the screen. 

3. Click on 'Teams'

4. Click on the team name

5. Click on 'Delete Team' button 

Expected Result: The team resource to be deleted
Actual Result: I get the "Error deleting a Team" error
Environment:
CA PPM 15.X
Cause:
Look at the app-ca.log file.
This is the key message on the logs on this scenario:

ERROR 2019-01-11 15:31:24,667 [http-###-#####-####-#] ####.########## (#######:#####@i#####.:########__########-####-####-####-########:PPM_REST_API) ExceptionInfo :: Could not delete resource. Resource name: teamdefinitions. Error code: resource.cannotDeleteActuals Error message: Cannot delete a team with pending or posted actuals.

As the error indicates: You can not delete a team with pending or posted actuals.

 
Resolution:
This is working as design.
A resource can not be deleted if Pending or Posted actuals exist
Additional Information:
New user experience documentation:

"Delete a Team 

To delete a team, select DELETE TEAM. The delete button appears when you have the required rights to delete a team. 

Important: When you delete a team, it is completely removed from the system including access rights to the team granted to the licensed users. 

You can delete a team only when the following conditions are true: 

• The team is not allocated to a project or another investment. 
• The team is not used in a financial plan. 
• The team has no actuals or pending actuals. 

The following messages can appear when trying to delete a team: 

• Cannot delete a team with pending or posted actuals. 

To preserve system integrity, the application does not allow you to delete teams with pending or posted actuals. If the team has only pending actuals but no posted actuals, you can delete all time entry rows for open or returned timesheets. If you can remove all time entry rows for all timesheets for the defined team, then you can delete the team. 

• Cannot delete a team that is staffed. 

If the allocations do not have actuals, you could remove the allocations from all projects and investments. You can then delete the team. Use the Allocations tab for a resource in classic PPM to locate all staffed investments. 

• Cannot delete a team that is on financial plans. 

You could try deleting rows from one or more cost plans grouped by resource. If the team that you want to delete is on an approved budget plan, you cannot delete any rows in the plan. 

Tip: If you are unable to delete a team, you can inactivate the team definition. An inactive team does not appear as an available resource."