Does TFSDeleteProject really delete?  
Author Message
Robert Kozak





PostPosted: Team Foundation Server - Process Templates, Does TFSDeleteProject really delete? Top

I changed one of my Fields and deleted my project and then deleted my process template and re uploaded it. But the old field seems to be there.

<!-- <FIELD name="Reason" refname="System.Reason" type="String">
<HELPTEXT>The reason why the bug is in the current state.</HELPTEXT>
</FIELD>
-->
<FIELD name="Reason" refname="Nowcom.Dash.Reason" type="String">
<WHEN field="System.State" value="Active">
<DEFAULT from ="value" value="New"/>
<REQUIRED />
<ALLOWEDVALUES>
<GLOBALLIST name="Suggestion.Reasons.Active" />
</ALLOWEDVALUES>
</WHEN>
<WHEN field="System.State" value="Resolved">
<REQUIRED />
<ALLOWEDVALUES>
<GLOBALLIST name="Suggestion.Reasons.Resolved" />
</ALLOWEDVALUES>
</WHEN>
</FIELD>

I removed the Reson field and added my own which used to be called DashReason so I wouldn't have the same name as the other Reason field. Then I changed my WorkItem type definition to comment out the original Reason field but now each time TFS reports an error with my field it still calls it DashReason. eg. TF20015: The field 'DashReason' contains a value that is not in the list of supported values.

The error is not important. It is reporting what I expected except that the name of the field is wrong. Also in the Query Builder I still have both Reason and DashReason.

What am I missing




Visual Studio Team System24  
 
 
Aliaksei Baturytski - MSFT





PostPosted: Team Foundation Server - Process Templates, Does TFSDeleteProject really delete? Top

System.Reason is a core field that cannot be deleted - it presents on every work item type even if it is not defined in the work item type definition. However, you can change System.Reason's friendly field name using `witfields` command line tool:

witfields rename /s:tfs refname newname

- Change System.Reason's friendly field name to something else

- Change Nowcom.Dash.Reason's friendly field name to Reason.

Thanks,

Alex


 
 
Robert Kozak





PostPosted: Team Foundation Server - Process Templates, Does TFSDeleteProject really delete? Top

Can't I just do this in each Work Item type definition

 
 
Robert Kozak





PostPosted: Team Foundation Server - Process Templates, Does TFSDeleteProject really delete? Top

After looking at my field using witfields it shows that it is used in two projects and over 10 different work item types. So basically all fields are global to all projects.

I thought each non System field was unique to each work item type.

 



 
 
Aliaksei Baturytski - MSFT





PostPosted: Team Foundation Server - Process Templates, Does TFSDeleteProject really delete? Top

Correct. All field definitions are global; that's a limitation of the current design. If more than one work item type uses the same field, they all actually refer to the same field definition.

Thanks,

Alex