Can a field in a Work Item Type be a reference to a different Work Item Type?  
Author Message
Brad Younge





PostPosted: Team Foundation Server - Process Templates, Can a field in a Work Item Type be a reference to a different Work Item Type? Top

Is it possible to create a “Work Item Type” in VSTS which has a *Field* which references another Work Item Type For example, let’s say I’m using the MSF Agile methodology out of the box, so I have the following work item types:

· Bug

· Task

· Quality of Service Requirement

· Scenario

· Risk

I want to create a new Work Item Type called “Requirement”. Part of this requirement work item type, I want a field called “Scenario” which is a reference to *Scenario* work item type. So, when I add a new requirement I’ll get a drop down of all of the Scenarios and can choose one.

If this is possible…




Visual Studio Team System24  
 
 
Sagar Sura





PostPosted: Team Foundation Server - Process Templates, Can a field in a Work Item Type be a reference to a different Work Item Type? Top

Hi

If I understand correctly, you want to associate a scenario type Work item to your Requirement type work item. And while adding new Requirementtype WI you want to select the Scenario type WI from a dropdown list. With the existing functionality we cannot do this. However, you can have a global list that has all the scenario work items and you can use this globallist in allowed values for Scenario field in Requirement WIT. However, the question is how to update the list when you add a new Scenario Work Item

One way of doing this is write a small application that uses OM to update the global list with all new Scenario IDs, and schedule it to run once in every 5mins/2mins/or as per your needs. The application is a simple one (not more than 30lines of code) and it works fine.

Please write back if you need any additional info

Thanks

Sagar



 
 
Luis Fraile





PostPosted: Team Foundation Server - Process Templates, Can a field in a Work Item Type be a reference to a different Work Item Type? Top

I agree with Sagar, only one thing, better than schedule a task, I would do a webservice for subscribing it to the event of creating a new workitem of "Scenario" type, and in that webservice I would update that global list, so you can be sure you have it inmediatly updated.

 
 
Brad Younge





PostPosted: Team Foundation Server - Process Templates, Can a field in a Work Item Type be a reference to a different Work Item Type? Top

Sounds like a great solution. However, what is this global list you are talking about Specifically:

a) is it defined in a process template, or across the entire TFS server

b) if it's defined in a process template, where

c) once I have data in this global list, how do I create a field within a work item type which uses this global list as a lookup

Thanks!



 
 
Luis Fraile





PostPosted: Team Foundation Server - Process Templates, Can a field in a Work Item Type be a reference to a different Work Item Type? Top

You can have global lists defined for the entire TFS server, and you can assign its values as "Allowed","sugested" or "Prohibited" values for example, I would recommend you download the Process Template Editor from Imaginets, and use ti to do this, as it will be so much easier.