1

We installed a new TFS 2017.2 with new SQL 2016 Server and one new Collection. After moving old TFS 2015.1 collections to this new server, we got schema conflict errors in TFS reports.

Most of them were name conflicts with localization language names and could be resolved with “witadmin changefield” command. However, the last conflict with “System.IsDeleted” field cannot be resolved, because the “witadmin listfields” command does not list this field. The “witadmin changefield” command says “TF26027: A field definition System.IsDeleted 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.”

In the content collection databases at the new SQL server I found a table dbo.tbl_Field with a Value “System.IsDeleted” in the “ReferenceName” column in one row. This row has different values in the “Name” column in the new and the old collection Databases. So looks like this type exists and has a similar name conflict to the other fields, but witadmin doesn’t list this field and I don’t think it’s a good idea to change values directly in SQL for TFS...

Some idea how to fix this? Thanks in advance for your help!

Rich
  • 2,207
  • 1
  • 23
  • 27
Paul S.
  • 35
  • 6
  • Did you rebuild the warehouse? – Daniel Mann Oct 25 '17 at 15:50
  • Yes, with the client UI and then with the Web UI ProcessAnalysisDatabase and ProcessWarehouse. After rebuilds i could see other conflicts dissapearing, only this one with "System.IsDeleted " stays. – Paul S. Oct 26 '17 at 07:02

1 Answers1

1

Determine in which of the following ways you want to resolve the schema conflicts:

  • Change the attribute for the field in one project collection to match the assignments that are made in other project collections. You should take this action when teams use the field in the same ways in similar reports or for cross-project reporting.
  • Relabel the reporting reference name of the field in conflict. You should take this action when the fields are used in different ways or you must maintain a different field. In this case, the field is not used by teams that work in different project collections for cross-project reporting.
  • Mark a field as non-reportable for one or more collections. You should take this action when the field is not used for reports about those project collections.
  • Remove the field from the team project collection. You should take this action if the field is not used by any team projects or reports.

If you want to dig into TFS database and modify the data. You could ask the help of TFS support, or do it under their guidance.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • How can I realize the option 3 without to dig into the SQL database? Witadmin doesn't show this field and I dont know another tool. Thanks for your help! – Paul S. Oct 26 '17 at 14:45
  • @PaulS. Sorry forgot this field even couldn't list by the Witadmin command. I got the same result as you when use `witadmin listfields /collection:http://xxx/tfs/DefaultCollection /n:System.IsDeleted`. By the way, not all fields could be managed by Witadmin command. You can change the field name, the index, and the report attributes for any field except **system fields** by using the witadmin command-line tool. You could take a look at this [Related notes](https://learn.microsoft.com/en-us/vsts/work/work-items/guidance/work-item-field#related-notes) under TFS. – PatrickLu-MSFT Oct 27 '17 at 05:49
  • @PaulS. I'm afraid you have to deal with the SQL database to solve the conflicts. Either change the name or "IsReportingEnable" column. To realize the option, change the value from default 1 to 0. – PatrickLu-MSFT Oct 27 '17 at 05:52
  • 1
    I tested this in my test environment. Changing IsReportingEnable in SQL was not anough. Its looks like there are 3 fields playing together. After run this sql statement "UPDATE [dbo].[tbl_Field] SET [IsReportingEnabled] = 0, [ReportingType] = 0, [ReportingFormula] = 0 WHERE ReferenceName = 'System.IsDeleted'" for all content collection DBs, then ProcessAnalysisDatabase and ProcessWarehouse, then iisreset at TFS server i could see all reports again without conflicts. – Paul S. Oct 27 '17 at 10:14
  • I will observe the test lab for some days and if there no issues accur, then i will apply this changes to the product environment. Thanks for your help! – Paul S. Oct 27 '17 at 10:15
  • @PaulS. Glad to here the issue fixed. Always better when you fix it yourself; as you understand how it works!:) – PatrickLu-MSFT Oct 27 '17 at 10:16