There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
UniqueColumnPolicy - not working with Lookup fields (including users)
The UniqueColumnPolicy doesn't work with looup fields (including users) although these fields are listed in UniqueColumnSettings.ascx.
THis is because the CAML query created in Validation.cs only returns the ID as the value.
There is a simple way to avoid this: detecting if the field type is "User" or "Lookup" and if so, add the following attribute to the FieldRef node LookupId="TRUE".
You will find attachedd the updated Validation.cs (modifications are from line 101 to line 116)