Skip to content

[Bug]: TfsGitRepositoryTool not work in v16.1 #2662

@MicE44

Description

@MicE44

Version

  • I confirm that I am using the latest version

Source Version

Azure DevOps Service

Target Version

Azure DevOps Service

Relevant configuration

{
  "Serilog": {
    "MinimumLevel": "Debug"
  },
  "MigrationTools": {
    "Version": "16.1",
    "Endpoints": {
      "Source2": {
        "EndpointType": "TfsTeamProjectEndpoint",
        "Collection": "https://dev.azure.com/shsds",
        "Project": "CS-Cinematic-Anatomy",
        "AllowCrossProjectLinking": false,
        "ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
        "Authentication": {
          "AuthenticationMode": "AccessToken",
          "AccessToken": "XXX",
          "NetworkCredentials": {
            "UserName": "",
            "Password": "",
            "Domain": ""
          }
        },
        "LanguageMaps": {
          "AreaPath": "Area",
          "IterationPath": "Iteration"
        }
      },
      "Target2": {
        "EndpointType": "TfsTeamProjectEndpoint",
        "Collection": "https://dev.azure.com/SHS-CS-DDO",
        "Project": "CS-Cinematic-Anatomy",
        "TfsVersion": "AzureDevOps",
        "Authentication": {
          "AuthenticationMode": "AccessToken",
          "AccessToken": "XXX",
          "NetworkCredentials": {
            "UserName": "",
            "Password": "",
            "Domain": ""
          }
        },
        "ReflectedWorkItemIdField": "Custom.ReflectedWorkItemId",
        "AllowCrossProjectLinking": false,
        "LanguageMaps": {
          "AreaPath": "Area",
          "IterationPath": "Iteration"
        }
      }
    },
    "CommonTools": {
      "WorkItemTypeMappingTool": {
        "Enabled": true,
        "Mappings": {
	"ABB": "ABB",
	"Assumption": "Assumption",
    "Bug": "Bug",
	"Claim": "Claim",
	"Disclaimer": "Disclaimer",
	"Epic": "Epic",
	"Feature": "Feature",
	"Headline": "Headline",
	"Issue": "Issue",
	"Market Requirement": "Market Requirement",
	"OTS": "OTS",
	"Product Backlog Item": "Product Backlog Item",
	"Risk": "Risk",
	"Risk Mitigation": "Risk Mitigation",
	"Risk Safety": "Risk Safety",
	"Task": "Task",
	"Software Requirement": "Software Requirement",
	"SOP": "SOP",
	"Test Case": "Test Case",
	"User Story": "Work Package Item"
        }
      },
      "StringManipulatorTool": {
        "Enabled": true,
        "MaxStringLength": 1000000,
		//Fix SingleString "MaxStringLength": 255,
        "Manipulators": [
          {
            "$type": "RegexStringManipulator",
            "Enabled": true,
            "Pattern": "[^( -~)\n\r\t]+",
            "Replacement": "",
            "Description": "Remove invalid characters from the end of the string"
          }
        ]
      },
      "TfsAttachmentTool": {
        "RefName": "TfsAttachmentTool",
        "Enabled": true,
        "ExportBasePath": "c:\\temp\\WorkItemAttachmentExport",
        "MaxRevisions": 480000000
      },
      "TfsChangeSetMappingTool": {
        "Enabled": false,
        "File": "C:\\temp\\ChangeSetMappingFile.json"
      },
      "FieldMappingTool": {
        "Enabled": true,
        "FieldMaps": [
          {
            "FieldMapType": "FieldtoFieldMap",
            "ApplyTo": ["Defect"],
            "sourceField": "Siemens.Defect.Justification",
            "targetField": "Microsoft.VSTS.CMMI.Justification"
          },
			{
            "FieldMapType": "FieldValueMap",
            "ApplyTo": ["*"],
            "defaultValue": "New",
            "sourceField": "System.State",
            "targetField": "System.State",
            "valueMapping": 
			{
        "New": "New",
		"In Work": "In Work",
		"In Play": "In Play",
		"Active": "Active",
		"Closed": "Closed",
		"Resolved": "Resolved",
        "Removed": "Removed",
		"For Analysis": "For Analysis",
		"Qualified": "Qualified",
		"Done": "Done",
		"Blocked": "Blocked",
		"In Planning": "In Planning",
		"Design": "Design",
		"Inactive": "Inactive",
		"Next Up": "Next Up",
		"Ready": "Ready",
		"To Do": "To Do",
		"Completed": "Completed",
		"Proposed": "Proposed",
		"In Progress": "In Progress"
      }
		  }
        ]
      },
      "TfsGitRepositoryTool": {
        "Enabled": true,
        "Mappings": {
          "https://dev.azure.com/shsds/_git/CS-Cinematic-Anatomy": "https://dev.azure.com/SHS-CS-DDO/_git/CS-Cinematic-Anatomy"
        }
      },
      "TfsNodeStructureTool": {
        "Enabled": true,
        "Areas": {
          "Filters": [ " *\\Team 1,*\\Team 2\\**" ],
          "Mappings": {
            "CS-Cinematic-Anatomy([\\\\]?.*)$": "CS-Cinematic-Anatomy",
			"^1c78a84c-cf99-4d5b-8ba9-e0cb7d6d1f8e([\\\\]?.*)$": "Ultrasound"
          }
        },
        "Iterations": {
          "Filters": [],
          "Mappings": {
            "CS-Cinematic-Anatomy([\\\\]?.*)$": "CS-Cinematic-Anatomy",
			"^1c78a84c-cf99-4d5b-8ba9-e0cb7d6d1f8e([\\\\]?.*)$": "Ultrasound"
          } 
        }, 
        "ShouldCreateMissingRevisionPaths": true,
        "ReplicateAllExistingNodes": false
      },
      "TfsRevisionManagerTool": {
        "Enabled": true,
        "ReplayRevisions": true,
        "MaxRevisions": 0
		// Req Fix        "MaxRevisions": 7
		//EPIC/Feature Fix "MaxRevisions": 34
      },
      "TfsTeamSettingsTool": {
        "Enabled": true,
        "MigrateTeamSettings": true,
        "UpdateTeamSettings": true,
        "MigrateTeamCapacities": true,
        "Teams": [ "Team 1", "Team 2" ]
      }
    },
    "Processors": [
      {
        "ProcessorType": "TfsWorkItemMigrationProcessor",
        "Enabled": true,
        "UpdateCreatedDate": true,
        "UpdateCreatedBy": true,
        "WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject  AND [System.ID] IN ('140585','166912','167639','167652','167653','167667','190857','201043','201723','201724','201733','213756') AND [System.WorkItemType] NOT IN ('Test Plan','Test Suite') ORDER BY [System.ID] asc",
        // AND [System.ID] IN ('389','415','416','1032','4519','9574','9575','10520','10521','10813','61701','67214','67326','67325','67324','40618','40870','40906','40907','40921','40922','40871','40908','40913','40923','40924','40872','40909','40911','40914','40915','40925','40926','40928','40929','40877','40930','40911','40931','40878','40919','40933','40934','40879','40920')
		// AND [System.ID] NOT IN ('389','61700')
		// AND [System.ChangedDate] >= '2023-12-17T00:00:00.00Z'
		// AND [System.ID] NOT IN ('563419','674128')
	  // AND [Siemens.Defect.Product] = 'VSIM'
	  // AND [System.ID] >= '440407' 
	  // AND [System.AreaPath] UNDER 'XRay\\Hepton'		
	  // AND [System.Tags] Contains 'migrated'
	  // AND [System.IterationPath] UNDER 'XRay\\Hepton' OR [System.IterationPath] IN ('XRay\\Hepton\\AT2306','XRay\\Hepton\\AT2309','XRay\\Hepton\\AT2312','XRay\\Hepton\\AT2403','XRay\\Hepton\\AT2406')
	  // AND [System.WorkItemType] IN ('Epic','Task','User Story','Feature')
	  // AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan','Shared Steps','Shared Parameter','Feedback Request')
	  // AND [System.State] NOT IN ('Closed') 
	  // AND [System.ID]  IN ('63','64','65','68')
		"FixHtmlAttachmentLinks": false,
        "WorkItemCreateRetryLimit": 5,
        "FilterWorkItemsThatAlreadyExistInTarget": true,
        "PauseAfterEachWorkItem": false,
        "AttachRevisionHistory": false,
        "GenerateMigrationComment": false,
        "SourceName": "Source2",
        "TargetName": "Target2",
        //"WorkItemIDs": [ 12 ],
		"WorkItemIDs": null,
        "MaxGracefulFailures": 0,
        "SkipRevisionWithInvalidIterationPath": false,
        "SkipRevisionWithInvalidAreaPath": false
      },
	  {
      "ProcessorType": "TfsTestPlansAndSuitesMigrationProcessorOptions",
	  "Enabled": false,
      "ReplayRevisions": true,
      "PrefixProjectToNodes": false,
	  //This Part is for Test Plans and Suites (run 2nd)!!!
      //"TestPlanQueryBit": "Select '*' From TestPlan Where [System.ID] >= '58348' AND [System.AreaPath] UNDER 'SENSE\\Magellan Team'",
	  "TestPlanQueryBit": "AreaPath UNDER 'APEX AMListe (Raw Material Management)'",
	  // AND [System.ID] NOT IN ('77828')
	  //'Test Case','Test Plan','Test Suite' AND [System.State] NOT IN ('Closed') AND [System.WorkItemType] IN ('Test Plan','Test Suite') AND [System.AreaPath] UNDER 'SENSE\\Magellan Team',
	  "WIQLOrderBit": "[System.ID] asc",
	  "OnlyElementsWithTag": null,
	  "SourceName": "Source2",
      "TargetName": "Target2",
	  "RemoveInvalidTestSuiteLinks": false,
	  "UseCommonNodeStructureEnricherConfig": false,
	  "NodeBasePaths": ["123456"],
	  "AreaMaps": {},
      "IterationMaps": {}
    },
	{
		"ProcessorType": "TfsWorkItemDeleteProcessorOptions",
		"Enabled": false,
		"WIQLQuery": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.WorkItemType] IN ('Defect','Test Case','Test Plan','Test Suite') AND [System.AreaPath] UNDER 'syngo Application Software\\Migration_DefectsXRay'  ORDER BY [System.ChangedDate] desc",
		// DANGER!, but good for deleting Test Cases!
		// AND [System.WorkItemType] IN ('Test Case') AND [System.AreaPath] = 'BranchDa\\BranchDA'
		"WorkItemIDs": null,
		"SourceName": "Source2",
        "TargetName": "Target2",
		"FilterWorkItemsThatAlreadyExistInTarget": false,
		"PauseAfterEachWorkItem": false,
		"WorkItemCreateRetryLimit": 0
	}
    ]
  }
}

Relevant log output

TfsGitRepositoryTool is ignored:

[12:41:46 DBG] [16.1.0] Configuring 'MigrationTools:Processors:0:Enrichers'
[12:41:46 DBG] [16.1.0] ===================================
[12:41:46 DBG] [16.1.0] TfsWorkItemMigrationProcessorOptionsValidator::Validate::Success
[12:41:46 DBG] [16.1.0] ===================================
[12:41:46 DBG] [16.1.0] Configuring 'MigrationTools:Processors:1:Enrichers'
[12:41:46 DBG] [16.1.0] ===================================
[12:41:46 INF] [16.1.0] No validator found for processor type TfsTestPlansAndSuitesMigrationProcessorOptions
[12:41:46 DBG] [16.1.0] ===================================
[12:41:46 DBG] [16.1.0] Configuring 'MigrationTools:Processors:2:Enrichers'
[12:41:46 DBG] [16.1.0] ===================================
[12:41:46 INF] [16.1.0] No validator found for processor type TfsWorkItemDeleteProcessorOptions
[12:41:46 INF] [16.1.0] Creating Migration Engine 42f3ded4-eda9-4873-8873-5aec6a622d6e
[12:41:46 INF] [16.1.0] ProcessorContainer: Of 3 configured Processors only 1 are enabled
[12:41:46 INF] [16.1.0] ProcessorContainer: Adding Processor TfsWorkItemMigrationProcessor
[12:41:46 DBG] [16.1.0] Constructor found: IOptions`1, TfsCommonTools, ProcessorEnricherContainer, IServiceProvider, ITelemetryLogger, ILogger`1
[12:41:46 DBG] [16.1.0] Attempting to pass parameters: OptionsWrapper`1
[12:41:46 DBG] [16.1.0] TfsNodeStructureToolOptionsValidator::Validate::Success
[12:41:46 DBG] [16.1.0] ===================================
[12:41:46 DBG] [16.1.0] Configuring 'MigrationTools:CommonTools:FieldMappingTool:FieldMaps'
[12:41:46 DBG] [16.1.0] Configuring '0' as 'IFieldMapOptions' from 'MigrationTools:CommonTools:FieldMappingTool:FieldMaps'
[12:41:46 DBG] [16.1.0] Configuring '1' as 'IFieldMapOptions' from 'MigrationTools:CommonTools:FieldMappingTool:FieldMaps'
[12:41:46 DBG] [16.1.0] ===================================
[12:41:46 INF] [16.1.0] FieldMappingTool: Adding FieldMap FieldToFieldMap for Defect
[12:41:46 INF] [16.1.0] FieldMappingTool: Adding FieldMap FieldValueMap for *
[12:41:46 INF] [16.1.0] Logging has been configured and is set to: unknown.
[12:41:46 INF] [16.1.0]                               Max Logfile: Verbose.
[12:41:46 INF] [16.1.0]                               Max Console: Debug.
[12:41:46 INF] [16.1.0]                  Max Application Insights: Error.
[12:41:46 INF] [16.1.0] The Max log levels above show where to go look for extra info. e.g. Even if you set the log level to Verbose you will only see that info in the Log File, however everything up to Debug will be in the Console.
[12:41:46 INF] [16.1.0] Beginning run of 1 processors
[12:41:46 INF] [16.1.0] Processor: TfsWorkItemMigrationProcessor
[12:41:46 INF] [16.1.0] Migration Context Start: TfsWorkItemMigrationProcessor
[12:41:46 DBG] [16.1.0] WorkItemMigrationContext::InternalExecute
[12:41:47 DBG] [16.1.0] TfsLanguageMapOptions::Validate::Success
[12:41:47 DBG] [16.1.0] TfsAuthenticationOptions::Validate::Success
[12:41:47 DBG] [16.1.0] TfsEndpointOptionsValidator::Validate::Success
[12:41:47 DBG] [16.1.0] TfsNodeStrictureTool: Enabled=True
[12:41:47 DBG] [16.1.0] TfsLanguageMapOptions::Validate::Success
[12:41:47 DBG] [16.1.0] TfsAuthenticationOptions::Validate::Success
[12:41:47 DBG] [16.1.0] TfsEndpointOptionsValidator::Validate::Success
[12:41:47 DBG] [16.1.0] TfsMigrationClient::GetDependantTfsCollection:AuthenticationMode(AccessToken)
[12:41:47 INF] [16.1.0] Connecting with AccessToken

What happened?

TfsGitRepositoryTool is ignored.
Nothing happens.

Debug in Visual Studio

  • Visual Studio Debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions