Does TFS support unique fields in work items?
I've created a new workitem type 开发者_Python百科that corresponds to tickets in our proprietary ticketing system.
One of the fields is the tickets id number. I'd like to make this unique. No two work items may have the same custom "ticket" field.
Is it possible to have TFS enforce this constraint?
I just want a unique index on a custom field.
I think this is not possible with the default WIT syntax currently, but what you can do is create a ticket alert service (or even tfs extension) that will check the field after saving and execute a WIQL query against all other tickets to find duplicates. you could then automatically link and close the new ticket as duplicate and/or inform the editing user by mail.
Not out of the box - in order to enforce this constraint, you'd need to create a custom control for your work item. This custom control would basically be a text field but would query other work items to ensure uniqueness.
精彩评论