Unable to update field datatype - tfs

I had to create a work item template.In order to do it quickly.I created all the fields by opening the template in notepad and copy pasting them with differnent name but same datatype.
Then I import the template. Now I am trying to change the datatype form Open Wit from Server option , it is throwing me errors that datatype do not match . So I deleted those fields and reimported the templated.It is still throwing me the same error. I notice when I open work item field explorer then I can see the fields there. Even I have deleted them form workitem template.
So my question how can I delete Fields and work items.

For TFS 2008:
- To delete a work item type, use the "DestroyWITD" from the power tools
For TFS 2010:
Use WitAdmin DestroyWitd and WitAdmin DeleteField: http://msdn.microsoft.com/en-us/library/dd236914.aspx

Found the answer:
http://msdn.microsoft.com/en-us/library/dd236914.aspx

Related

TF400930: The reporting attribute is inconsistent between the imported XML and what is currently configured for the field

We've just upgraded from TFS 2015.2 to TFS 2017.3 and we're running in to an issue when creating new team projects.
For some reason, we're getting the following error in the error log when we try to create a new team project:
[09:54:24.797] Importing work item types
[09:54:25.663] [Error] TF400930: The reporting attribute for field Microsoft.VSTS.Common.StateChangeDate is inconsistent between the imported XML and what is currently configured for the field. Correct the field configuration in the XML and try again.
[09:54:25.667] Microsoft.TeamFoundation.WorkItemTracking.Server.LegacyValidationException: TF400930: The reporting attribute for field Microsoft.VSTS.Common.StateChangeDate is inconsistent between the imported XML and what is currently configured for the field. Correct the field configuration in the XML and try again.
[09:54:25.667] at Microsoft.TeamFoundation.WorkItemTracking.Server.ServerMetadataProvisioningHelper.ThrowValidationException(String message)
[09:54:25.667] at Microsoft.TeamFoundation.WorkItemTracking.Common.Provision.UpdatePackageField.CheckDefinitionConsistency(XmlElement fieldElement)
[09:54:25.667] at Microsoft.TeamFoundation.WorkItemTracking.Common.Provision.UpdatePackageField.Update(XmlElement fieldElement)
Here is the result from witadmin:
Field: Microsoft.VSTS.Common.StateChangeDate
Name: State Change Date
Type: DateTime
Use: --- (Bug, Shared Steps, Task, Test Case, User Story, Issue, Change Request)
Indexed: False
Reportable As: dimension
And from a search with Notepad++:
Notepad++ Search for Microsoft.VSTS.Common.StateChangeDate
As you can see from the search, it is being "reportable" as a dimension, which is what witadmin is saying the current attribute is.
Any idea on what we're doing wrong?
Thanks!
I checked on my side, by default the reportable attributes are not set in the Workitem definition files (.xml files).
So, please try to remove the attribute reportable = "dimension" from all the Wits. Then import the Wits and try it again.
If that still not work, you can try removing the Microsoft.VSTS.Common.StateChangeDatedefinition from these work items, it's a standard field which will be added to all your work item types automatically.
Reference this similar thread : Tfs project creation results in error: TF400930: Field 'System.ExternalLinkCount' is defined multiple times

Can we change the default description about the field that appears on hovering the field in vso?

i have 2 questions.
can we remove the default description(field name and type) of a field that appears on hovering the field ? After adding the description to the field, on hovering it some default text is displayed along with the description added.
can we add hyperlink in the desctiption of the field ?
If you are using VSTS (VSO), the answers for both questions are NO since you can only list WIT definitions but can’t change and import into VSTS.
If you are using TFS, the answers are yes for both. You can use witadmin to change a WIT.
With witadmin, you can modify XML definition files to support the
On-premises XML process model. For Hosted XML and Inheritance process
models, you can only use witadmin commands to list information.

Updating TFS field names in more than 1 Team Project Collection

I have two Team Project Collections -- DefaultCollection and ArchiveCollection. I need to update the display name for System.ExternalLinkCount from 'ExternalLinkCount' to 'External Link Count'.
This is the command I'm using to accomplish that on both collections:
witadmin changefield /collection:http://localhost:8080/tfs/<CollectionName> /n:System.ExternalLinkCount /name:"External Link Count"
I get no errors from the command and it tells me that the field is updated. However, after I process the Tfs Warehouse, I see a schema conflict on the field. The DefaultCollection has the updated name, but the ArchiveCollection still has the old name.
That's the part I don't understand. The update is getting made to the same field in both collections, but it isn't updating in the ArchiveCollection.
Not sure what I'm missing.

After upgrading to TFS2013 RTM, the search from the web interface returns "TF51535: Missing or unsupported field name."

After upgrading to TFS2013 RTM, the search from the web interface returns "TF51535: Missing or unsupported field name." It looks like the default fields to search changed.
How do you change the work item fields that are searched on by default in TFS2013?
What I have found so far:
It is searching on Title, Description, Repro Steps\
In TFS2010 you could follow the steps listed here to change the default (at least I assume... I didn't actually use that version)
This is likely to happen for anyone that started using bugs in an older process template and has continued to use and upgrade the template to work with the newer versions.
Microsoft is now searching on Description, Title, and "Repro Steps" by default. The error happens because "Repro Steps" is not in any of the work item types. This field maps to Microsoft.VSTS.TCM.ReproSteps the old similar field was Microsoft.VSTS.CMMI.StepsToReproduce
One way to fix the problem:
export the bug work item type
witadmin exportwitd /collection:CollectionName /p:projectName /n:Bug /f:"Bug.xml"
add the new field
FIELD name="Repro Steps" refname="Microsoft.VSTS.TCM.ReproSteps" type="HTML"
import the bug work item type
witadmin importwitd /collection:CollectionName /p:projectName /n:Bug /f:"Bug.xml"
This allows the search to find the field but with these minimum steps that field won't have anything in it. The search will effectively be on title and description only.
There are two other solutions:
- Change what fields are being searched on to not include reprosteps (I haven't figured out how to do this yet)
- Do the above, copy all the old data into the new field, show the new field on the WI. This would allow the search of the field as intended.

suggested values

I had added some suggested values to a field in a Work item, But now when i try to update the value, changes are not reflected.
If I delete the suggested values , then as expected it is not suggesting anything.But when I reenter the same values again. It is going back to old value and changes are not reflected.
Basically , I added a suggested value with some letter in upper case while some in lower and I want to fix this problem after the workitem is uploaded to the server.
Is it Ok to go in SQL server and updated the table, If so then can someone which table hold the suggested values.
In TFS2010, WitAdmin console application is used to Import\Export WorkItem Types, WitAdmin will be available in (Drive:\%Program Files%\Microsoft Visual Studio 10.0\Common7\IDE).
To modify a Work Item Type in TFS, first you have to download the Work Item Type using below exportwitd command.
witadmin exportwitd /collection:collectionurl /p:project /n:typename [/f:filename] [/e:encoding] [/exportgloballists]
ex: witadmin exportwitd /collection:”http://TFSServer:8080/tfs/DefaultCollection” /p:”Demo” /n:Bug/f:”c:\WorkItemTypes\Bug.xml”
Then you can perform the modification on the downloaded Work Item Type. You have to search the required field in xml file and under its suggested values you can add your new value and then save.
Now,you have to upload the xml to TFS Server using the Importwitd command.
witadmin importwitd /collection:collectionurl [/p:project] /f:filename [/e:encoding] [/v]
ex:
witadmin importwitd /collection:”http://TFSServer:8080/tfs/DefaultCollection” /p:” Demo” /f:” c:\WorkItemTypes\Bug.xml”

Resources