Skip to content

Commit

Permalink
🔧 (configuration.json): correct typo in FieldMapType values
Browse files Browse the repository at this point in the history
♻️ (launchSettings.json): remove redundant configurations and add new ones
✨ (MigrationToolHost.cs): update field map configuration section

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.
  • Loading branch information
MrHinsh committed Aug 14, 2024
1 parent fbb4322 commit 8c3faf3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
16 changes: 8 additions & 8 deletions src/MigrationTools.ConsoleFull/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}
}
5 changes: 5 additions & 0 deletions src/MigrationTools.Host/MigrationToolHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ public static IHostBuilder CreateDefaultBuilder(string[] args, Action<IConfigura
// This code Converts the new config format to the v1 and v2 runtme format.
options.Version = configuration.GetValue<string>("MigrationTools:Version");
options.ChangeSetMappingFile = configuration.GetValue<string>("MigrationTools:CommonEnrichers:TfsChangeSetMapping:File");
//options.FieldMaps = configuration.GetSection("MigrationTools:FieldMaps").Get<IFieldMap[]>();
options.FieldMaps = configuration.GetSection("MigrationTools:CommonEnrichers:TfsFieldMappings:FieldMaps")?.ToMigrationToolsList<IFieldMapConfig>(child => child.GetMigrationToolsOption<IFieldMapConfig>("FieldMapType"));
options.GitRepoMapping = configuration.GetSection("MigrationTools:CommonEnrichers:TfsGitRepoMappings:WorkItemGitRepos").Get<Dictionary<string, string>>();
options.WorkItemTypeDefinition = configuration.GetSection("MigrationTools:CommonEnrichers:WorkItemTypeMappingEnricher:WorkItemTypeDefinition").Get<Dictionary<string, string>>();
Expand Down

0 comments on commit 8c3faf3

Please sign in to comment.