From 8c3faf3ba1428f261eef41d4bd4fd7d8bcba5ab1 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 14 Aug 2024 16:18:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20(configuration.json):=20correct?= =?UTF-8?q?=20typo=20in=20FieldMapType=20values=20=E2=99=BB=EF=B8=8F=20(la?= =?UTF-8?q?unchSettings.json):=20remove=20redundant=20configurations=20and?= =?UTF-8?q?=20add=20new=20ones=20=E2=9C=A8=20(MigrationToolHost.cs):=20upd?= =?UTF-8?q?ate=20field=20map=20configuration=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrects the typo in the "FieldMapType" values from "FieldToFieledMap" to "FieldtoFieldMap" to ensure proper configuration parsing. Removes redundant configurations in `launchSettings.json` and adds new configurations for better clarity and usability. Updates the field map configuration section in `MigrationToolHost.cs` to use the correct configuration path, ensuring the application reads the correct settings. --- configuration.json | 4 ++-- .../Properties/launchSettings.json | 16 ++++++++-------- src/MigrationTools.Host/MigrationToolHost.cs | 5 +++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/configuration.json b/configuration.json index 610babd4c..25e7c0d4d 100644 --- a/configuration.json +++ b/configuration.json @@ -59,13 +59,13 @@ "Enabled": true, "FieldMaps": [ { - "FieldMapType": "FieldToFieledMap", + "FieldMapType": "FieldtoFieldMap", "sourceField": "System.AcceptanceCriteria", "targetField": "System.AcceptanceCriteria2" }, { - "FieldMapType": "FieldToFieledMap", + "FieldMapType": "FieldtoFieldMap", "sourceField": "System.Description", "targetField": "System.Description2" diff --git a/src/MigrationTools.ConsoleFull/Properties/launchSettings.json b/src/MigrationTools.ConsoleFull/Properties/launchSettings.json index cc72cdf0f..e1cb40538 100644 --- a/src/MigrationTools.ConsoleFull/Properties/launchSettings.json +++ b/src/MigrationTools.ConsoleFull/Properties/launchSettings.json @@ -11,18 +11,10 @@ "commandName": "Project", "commandLineArgs": "execute -c \"configuration.json\"" }, - "Execute v3": { - "commandName": "Project", - "commandLineArgs": "execute -c \"configuration3.json\"" - }, "executepipe": { "commandName": "Project", "commandLineArgs": "execute -c configuration2-pipeline.json" }, - "execute2": { - "commandName": "Project", - "commandLineArgs": "execute -c configuration2.json" - }, "execute --help": { "commandName": "Project", "commandLineArgs": "execute --help" @@ -34,6 +26,14 @@ "init Options-Fullv2": { "commandName": "Project", "commandLineArgs": "init -c configuration2.json --options Fullv2" + }, + "Execute Classic": { + "commandName": "Project", + "commandLineArgs": "execute -c \"configuration-classic.json\"" + }, + "execute classic2": { + "commandName": "Project", + "commandLineArgs": "execute -c configuration-classic2.json" } } } \ No newline at end of file diff --git a/src/MigrationTools.Host/MigrationToolHost.cs b/src/MigrationTools.Host/MigrationToolHost.cs index 7115775c4..140bb47b2 100644 --- a/src/MigrationTools.Host/MigrationToolHost.cs +++ b/src/MigrationTools.Host/MigrationToolHost.cs @@ -130,7 +130,12 @@ public static IHostBuilder CreateDefaultBuilder(string[] args, Action("MigrationTools:Version"); options.ChangeSetMappingFile = configuration.GetValue("MigrationTools:CommonEnrichers:TfsChangeSetMapping:File"); + + //options.FieldMaps = configuration.GetSection("MigrationTools:FieldMaps").Get(); + + options.FieldMaps = configuration.GetSection("MigrationTools:CommonEnrichers:TfsFieldMappings:FieldMaps")?.ToMigrationToolsList(child => child.GetMigrationToolsOption("FieldMapType")); + options.GitRepoMapping = configuration.GetSection("MigrationTools:CommonEnrichers:TfsGitRepoMappings:WorkItemGitRepos").Get>(); options.WorkItemTypeDefinition = configuration.GetSection("MigrationTools:CommonEnrichers:WorkItemTypeMappingEnricher:WorkItemTypeDefinition").Get>();