Created On:  21 November 2011

Problem:

When attempting to delete a group from SilkCentral Test Manager you may get the following error message:



There will also be the following error in your Frontendserver.log file:

The DELETE statement conflicted with the REFERENCE constraint "FK_SCC_UserGroup_IM_WorkGroup". The conflict occurred in database "SilkCentral", table "dbo.IM_WorkGroup", column 'WorkGroupID_fk'.

This means that the Group in question is being used by Issue Manager and so you need to remove the settings for this Group in Issue Manager before you can delete it. However you may find that when you navigate to Issue Manager - Configuration - Groups the group you wish to delete is not displayed (in this case the group is called "Test Group").

Resolution:

The reason that the group is not displayed in Issue Manager is because if you remove the group assignment to a project in User Management -> Groups, then Issue Manager groups are not visible in the UI anymore.

According to the log file message there is still an assignment between the user group and an Issue Manager group. You can execute following query to find the project and Issue Manager group where the assignment exists:

SELECT p.ProjectID_pk, p.ProjectName, p.IsArchived, p.IsActive, wg.WorkGroupID_fk
FROM IM_WorkGroup wg
INNER JOIN SCC_Projects p ON wg.ProjectID_fk = p.ProjectID_pk
WHERE wg.WorkGroupID_fk = GROUP_ID

Replace GROUP_ID with the ID of the user group you cannot delete. The ID is a hidden column in the groups grid, to display the ID you need to right-click on the column headers and go to Column and check ID.



In this example the results of the query are as follows:



Therefore this means that there is an assignment between the "MichaelB" project in SCTM and Issue Manager that utilises the group that I am trying to delete. Therefore you need to add the Project Assignment back to this group in Administration - User Management - Groups.

Now when you go back into Issue Manager - Configuration - Groups the "Test Group" group is displayed and the settings can be removed.



Now if you go back to Administration - User Management - Groups you will be able to successfully delete the group that you wish.



Incident #2547164