Updating TFS field names in more than 1 Team Project Collection - tfs

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.

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

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.

Tfs custom work item value migration

I have a task to create reports about various work items from a Team Foundation Server 2010 instance. They are looking for more information than the query tools seem to expose which is why I am not using the OOB reporting capabilities. The documentation on creating custom reports against TFS identify the Tfs_Analysis cube and the Tfs_Warehouse database as the intended sources for reporting.
They have created a custom work item, "Deployment Requests", to track requests for code migrations. This work item has custom urgency levels (critical, medium, low).
According to Manually Process the Data Warehouse and Analysis Services Cube for Team Foundation Server, every two minutes my ODS (Tfs_DefaultCollection) should sync with the Tfs_Warehouse and every 2 hours it hits the Tfs_Analysis cube. The basic work items correctly show up in my Tfs_Warehouse except not all of the data makes it over, in particular, the urgency isn't getting migrated.
As a concrete example, work item 19301 was a deployment request. This is what they can see using the native query tool from the web front-end.
I can find it in the Tfs_DefaultCollection and the "Urgency" is mapped to Fld10176.
SELECT
Fld10176 AS Urgency
, *
FROM Tfs_DefaultCollection.dbo.WorkItemsAre
WHERE ID = 19301
trimmed results...
Urgency Not A Field Changed Date
1 - Critical - (Right Away) 58 2011-09-07 15:52:29.613
If I query the warehouse, I see the deployment request and the "standard" data (people, time, area, etc)
SELECT
DWI.System_WorkItemType
, DWI.Microsoft_VSTS_Common_Priority
, DWI.Microsoft_VSTS_Common_Severity
, *
FROM
Tfw_Warehouse.dbo.DimWorkItem DWI
WHERE
DWI.System_Id = 19301
Trimmed results
System_WorkItemType Microsoft_VSTS_Common_Priority Microsoft_VSTS_Common_Severity
Deployment Request NULL NULL
I am not the TFS admin (first exposure to TFS is at this new gig) and thus far, they've been rather ...unhelpful.
Is there be a way to map that custom field over to an existing field in the Tfs_Warehouse? (Backfilling legacy values would be great but fixing current/future is all I need)
Is there a different approach I should be using?
Did you mark the field as reportable? See http://msdn.microsoft.com/en-us/library/ee921481.aspx for more information about this topic.
Based on Ewald Hofman's link, I ran
C:\Program Files\Microsoft Visual Studio 10.0\VC>witadmin listfields /collection:http://SomeServer/tfs > \tmp\witadmin.txt
and discovered a host of things not configured
Reportable As: None
At this point, I punted the ticket to the TFS admins and indicated they needed to fix things. In particular, examine these two fields
Field: Application.Changes
Name: ApplicationChanges
Type: PlainText
Use: Project1, Project2
Indexed: False
Reportable As: None
or
Field: Microsoft.VSTS.Common.ApplicationChanges
Name: Application Changes
Type: Html
Use: Project1, Project2
Indexed: False
Reportable As: None
It will be a while before the TFS Admins do anything but I'm happy to accept Edwald's answer.

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

Resources