'Add a unique custom field in Azure DevOps

Can I add an unique custom field inside a work item. So when a new work item is added, a validation error occurs if a previously added work item already contain a that value. I've tried inside the "Rule" section of work item customization, but without success



Solution 1:[1]

There is no built-in rule to enforce uniqueness. The only field that is guaranteed to be unique is the work item ID.

It is possible to create a custom control that uses the REST API to query whether the contents of a field are unique and have it enforce that uniqueness. But that has a few caveats. The rule will only be enforced in the UI, other experiences (like bulk changes, excel etc) won't triggr this validation. Direct manipulation through he REST API won't either. And I would expect concurrency problems when you venture in this direction.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jessehouwing