You have created a custom computer filter and after adding a resource the 2nd time into the same filter, the following error is observed:
"An error has occurred while displaying data. Check server logs for details."
Steps for reproducing the issue:
In a Profiler trace you can see that we try to add the same GUID a second time. Something like this:
EXECUTE spCollectionIncludesResourceInsert @CollectionGuid='f49a25e1-3cd3-4f39-b7a3-d2d05a7b4846', @ResourceGuidList=N'e6d221d0-10c6-44b5-b6d0-e999a1bcb684e6d221d0-10c6-44b5-b6d0-e999a1bcb684', @cleanImport=1
Thus the full error is actually:
Item save to DB failed: f49a25e1-3cd3-4f39-b7a3-d2d05a7b4846, (fromClone=False, user=example\smpservice)
Violation of PRIMARY KEY constraint 'PK_CCollectionIncludeResource'. Cannot insert duplicate key in object 'dbo.CollectionIncludeResource'. The duplicate key value is (f49a25e1-3cd3-4f39-b7a3-d2d05a7b4846, a116b6b0-d314-4a91-b7a6-4d9fcdebcf00).The statement has been terminated.
This might require you to review the Stored Procedure to exclude existing resources to be re-added and/or provide a more detailed error/explanation as to why it fails (as this resource have been already added into this filter).
ITMS 8.5 RU3, RU4
Known issue. There was an issue with ensuring the uniqueness for all include/exclude values.
A fix for this was added to the ITMS 8.6 Release.
There is a workaround for this issue. There are 4 updated stored procedures that needs to be applied:
Download the attached "UpdatedStoredProcedures.zip" and run them in Microsoft SQL Management Studio. These will drop the existing ones and recreate them with the necessary fixes.