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

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

Related

Updating to TFS2017 BugWorkItems

After updating to TFS I tried to configure new features and I get the following error message:
[Error] TF400654: Unable to configure Planning Tools. The following element contains an error: BugWorkItems/BugWorkItems. TF400506: This element defines the states for work items that represent Bugs or Defects. Each state must exist in at least one of the work item types that are defined in: BugWorkItems. The following states do not exist in any of the work item types: Approved, Committed.
I read all about updating WIT and what not on the MSDN page but it is not the easiest way to go about.
Can someone help me out and point me into a direction on what I have to do?
TF400654 error means a mapping defined in the ProcessConfiguration file specifies a field or state that does not exist in the WIT defined for the team project.
You can either download the process template, modify the ProcessConfiguration file to correct the mapping, and then upload the process template, or export the WIT using witadmin exportwitd, add the missing field or state, and then import the WIT. Get more information from following links:
https://www.visualstudio.com/en-us/docs/work/customize/customize-agile-tools
https://msdn.microsoft.com/en-us/library/dd312129.aspx

Tfs project creation results in error: TF400930: Field 'System.ExternalLinkCount' is defined multiple times

I have recently upgraded an on-premises Team Foundation Server from Tfs 2015 to Tfs2015.Update3 (14.102.25423.0)
The upgrade was completed and all other functionality seems to work as usual.
A day or so ago I attempted to create a new Tfs project (TFVC) and that resulted in an error.
When I look at the application tier log files, I see the following:
[10:31:30.153] Executing step: Create the Team Project.
[10:31:30.167] Executing step: 'Create the Team Project.' WorkItemTracking.CreateTeamProject (4 of 13)
[10:31:30.183] Getting process template.
[10:31:31.463] Refreshing server caches.
[10:31:31.463] Importing work item link types.
[10:31:32.180] Importing work item types
[10:31:33.727] Importing work item types
[10:31:34.413] [Error] TF400930: Field 'System.ExternalLinkCount' is defined multiple times with different field definitions. Correct the field definition and try again.
[10:31:34.507] Microsoft.TeamFoundation.WorkItemTracking.Server.LegacyValidationException: TF400930: Field 'System.ExternalLinkCount' is defined multiple times with different field definitions. Correct the field definition and try again.
[10:31:34.507] at Microsoft.TeamFoundation.WorkItemTracking.Server.ProvisioningService.InternalImportWorkItemTypesOrGlobalWorkflows(IVssRequestContext requestContext, Int32 projectId, String methodologyName, IEnumerable`1 typeElements, ProvisioningActionType actionType, InternalSchemaType schemaType, Boolean overwrite, ProvisioningImportEventsCallback importEventCallback)
We are unfortunately making use of a customized template (which is based on the Scrum template) and it is exactly this template that causes the error.
When creating a new Tfs project (TFVC) based on the standard Scrum or Agile templates it works fine.
I downloaded the customized scrum template in question and did a grep search on “System.ExternalLinkCount”.
When I look at the fields they do seem to be of the same type.
Any ideas or suggestion why it is acting up in this way?
You can just remove the field definition from these work items, it's a standard field which will be added to all your work item types automatically.

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.

Unable to update field datatype

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

Problem related to TFS workItem.Fields

i am getting following error,while accessing teamfoundation defect tracking application
"A field definition Symptom in the work item type definition file does not exist. Add a definition for this field or remove the reference to the field and try again."
can any body help?
Thanks
Suneetha.
The work items types definition must have been modified : the "Symptom" type has probably been renamed or deleted.
This can be done using the TFS Power Tools, if you are the admin on the TFS server.

Resources