Skip to content

Commit 977d058

Browse files
authored
Small tweeks (#2932)
This pull request introduces several improvements to the development tooling and documentation, focusing on better support for Azure Functions, enhancements to the TfsWorkItemTypeValidatorTool configuration, and the addition of a solution structure file. The changes streamline Azure Functions development workflows, clarify configuration options for work item type validation, and add a solution index for better project organization. **Azure Functions Development Support:** * Added recommended VS Code extensions for Azure Functions and C# in `.vscode/extensions.json` to improve the developer experience. * Updated `.vscode/launch.json` with an "Attach to .NET Functions" configuration for easier debugging of Azure Functions. * Added Azure Functions-specific build, clean, and publish tasks to `.vscode/tasks.json`, along with improved task grouping and problem matching. * Added Azure Functions deployment settings to `.vscode/settings.json` for streamlined deployment and debugging. **TfsWorkItemTypeValidatorTool Configuration Enhancements:** * Changed configuration sample and documentation to replace `FieldMappings` with `SourceFieldMappings` and `FixedTargetFields` for more precise field validation control in `reference.tools.tfsworkitemtypevalidatortool.yaml`. [[1]](diffhunk://#diff-da5ac18f04180c03fadbab0437626313f55902c05ae7892b47008d8b99e0c20bL22-R23) [[2]](diffhunk://#diff-da5ac18f04180c03fadbab0437626313f55902c05ae7892b47008d8b99e0c20bL33-R45) * Updated JSON schema files to reflect the new configuration options, improving validation and documentation accuracy. [[1]](diffhunk://#diff-52f03d9f526916598fa826728ae4633eae3ac279b3dd76548f1e6fdb93686ae4L1829-R1839) [[2]](diffhunk://#diff-41441c39430d201576471f4d4960e0fe73e08770c51386e558f44a54d0c0f843L12-R22) **Project Structure and Miscellaneous:** * Added a new solution index file `MigrationTools.slnx` to organize projects, scripts, and sample configs for easier navigation and management. * Updated the default value for `TargetLinksToKeepProject` in `KeepOutboundLinkTargetProcessorOptions` for improved clarity and reproducibility in processor configuration.
2 parents 04353ca + bec8b70 commit 977d058

File tree

9 files changed

+203
-14
lines changed

9 files changed

+203
-14
lines changed

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"ms-dotnettools.csharp"
5+
]
6+
}

.vscode/launch.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,20 @@
1717
"request": "launch",
1818
"preLaunchTask": "build full framework",
1919
"program": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472/migration.exe",
20-
"args": ["execute", "-c", "configuration.json"],
20+
"args": [
21+
"execute",
22+
"-c",
23+
"configuration.json"
24+
],
2125
"cwd": "${workspaceFolder}/src/MigrationTools.ConsoleFull/bin/Debug/net472/",
2226
"console": "externalTerminal",
2327
"stopAtEntry": false
28+
},
29+
{
30+
"name": "Attach to .NET Functions",
31+
"type": "coreclr",
32+
"request": "attach",
33+
"processId": "${command:azureFunctions.pickProcess}"
2434
}
2535
]
2636
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"azureFunctions.deploySubpath": "src\\MigrationTools.Telemetery/bin/Release/net8.0/publish",
3+
"azureFunctions.projectLanguage": "C#",
4+
"azureFunctions.projectRuntime": "~4",
5+
"debug.internalConsoleOptions": "neverOpen",
6+
"azureFunctions.preDeployTask": "publish (functions)"
7+
}

.vscode/tasks.json

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@
2525
"/consoleloggerparameters:NoSummary"
2626
],
2727
"problemMatcher": "$msCompile"
28-
},
28+
},
2929
{
3030
"label": "build full framework",
3131
"dependsOrder": "sequence",
3232
"dependsOn": [
3333
"build only",
34-
"test only", "build docs"
34+
"test only",
35+
"build docs"
3536
],
3637
"group": {
3738
"kind": "build",
@@ -53,7 +54,6 @@
5354
"console;verbosity=normal",
5455
"--filter",
5556
"(TestCategory=L0|TestCategory=L1)"
56-
5757
],
5858
"group": "test",
5959
"presentation": {
@@ -71,12 +71,12 @@
7171
"/property:GenerateFullPaths=true",
7272
"/consoleloggerparameters:NoSummary"
7373
],
74-
"group": "build",
74+
"group": "build",
7575
"presentation": {
7676
"reveal": "silent"
7777
},
7878
"problemMatcher": "$msCompile"
79-
},
79+
},
8080
{
8181
"label": "build docs",
8282
"type": "shell",
@@ -87,6 +87,82 @@
8787
"panel": "new"
8888
},
8989
"problemMatcher": "$msCompile"
90+
},
91+
{
92+
"label": "clean (functions)",
93+
"command": "dotnet",
94+
"args": [
95+
"clean",
96+
"/property:GenerateFullPaths=true",
97+
"/consoleloggerparameters:NoSummary"
98+
],
99+
"type": "process",
100+
"problemMatcher": "$msCompile",
101+
"options": {
102+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
103+
}
104+
},
105+
{
106+
"label": "build (functions)",
107+
"command": "dotnet",
108+
"args": [
109+
"build",
110+
"/property:GenerateFullPaths=true",
111+
"/consoleloggerparameters:NoSummary"
112+
],
113+
"type": "process",
114+
"dependsOn": "clean (functions)",
115+
"group": {
116+
"kind": "build",
117+
"isDefault": true
118+
},
119+
"problemMatcher": "$msCompile",
120+
"options": {
121+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
122+
}
123+
},
124+
{
125+
"label": "clean release (functions)",
126+
"command": "dotnet",
127+
"args": [
128+
"clean",
129+
"--configuration",
130+
"Release",
131+
"/property:GenerateFullPaths=true",
132+
"/consoleloggerparameters:NoSummary"
133+
],
134+
"type": "process",
135+
"problemMatcher": "$msCompile",
136+
"options": {
137+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
138+
}
139+
},
140+
{
141+
"label": "publish (functions)",
142+
"command": "dotnet",
143+
"args": [
144+
"publish",
145+
"--configuration",
146+
"Release",
147+
"/property:GenerateFullPaths=true",
148+
"/consoleloggerparameters:NoSummary"
149+
],
150+
"type": "process",
151+
"dependsOn": "clean release (functions)",
152+
"problemMatcher": "$msCompile",
153+
"options": {
154+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery"
155+
}
156+
},
157+
{
158+
"type": "func",
159+
"dependsOn": "build (functions)",
160+
"options": {
161+
"cwd": "${workspaceFolder}/src\\MigrationTools.Telemetery/bin/Debug/net8.0"
162+
},
163+
"command": "host start",
164+
"isBackground": true,
165+
"problemMatcher": "$func-dotnet-watch"
90166
}
91167
]
92168
}

MigrationTools.slnx

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<Solution>
2+
<Folder Name="/.build/">
3+
<File Path="build/azure-pipeline.yml" />
4+
<File Path="build/build.ps1" />
5+
<File Path="build/buildDocs.ps1" />
6+
<File Path="build/compile-and-test.ps1" />
7+
<File Path="build/install-prerequsits.ps1" />
8+
<File Path="build/packageChocolatey.ps1" />
9+
<File Path="build/packageExecutable.ps1" />
10+
<File Path="build/packageExtension.ps1" />
11+
<File Path="build/packageNuget.ps1" />
12+
<File Path="build/packageWinget.ps1" />
13+
<File Path="build/releaseExtension.ps1" />
14+
<File Path="build/releaseGitHubRelease.ps1" />
15+
<File Path="build/releaseWingetPackage.ps1" />
16+
<File Path="build/versioning.ps1" />
17+
</Folder>
18+
<Folder Name="/Classic/">
19+
<Project Path="src/MigrationTools.Clients.TfsObjectModel/MigrationTools.Clients.TfsObjectModel.csproj" />
20+
<Project Path="src/MigrationTools.ConsoleFull/MigrationTools.ConsoleFull.csproj" />
21+
</Folder>
22+
<Folder Name="/Classic/Tests/">
23+
<Project Path="src/MigrationTools.Clients.TfsObjectModel.Tests/MigrationTools.Clients.TfsObjectModel.Tests.csproj" />
24+
</Folder>
25+
<Folder Name="/Modern/">
26+
<Project Path="src/MigrationTools.Clients.AzureDevops.Rest/MigrationTools.Clients.AzureDevops.Rest.csproj" />
27+
<Project Path="src/MigrationTools.Clients.FileSystem/MigrationTools.Clients.FileSystem.csproj" />
28+
<Project Path="src/MigrationTools.ConsoleCore/MigrationTools.ConsoleCore.csproj" />
29+
<Project Path="src/MigrationTools.ConsoleDataGenerator/MigrationTools.ConsoleDataGenerator.csproj" />
30+
<Project Path="src/MigrationTools.Host/MigrationTools.Host.csproj" />
31+
<Project Path="src/MigrationTools.Telemetery/MigrationTools.Telemetery.csproj" />
32+
<Project Path="src/MigrationTools/MigrationTools.csproj" />
33+
</Folder>
34+
<Folder Name="/Modern/Tests/">
35+
<Project Path="src/MigrationTools.Clients.AzureDevops.Rest.Tests/MigrationTools.Clients.AzureDevops.Rest.Tests.csproj" />
36+
<Project Path="src/MigrationTools.Clients.FileSystem.Tests/MigrationTools.Clients.FileSystem.Tests.csproj" />
37+
<Project Path="src/MigrationTools.Host.Tests/MigrationTools.Host.Tests.csproj" />
38+
<Project Path="src/MigrationTools.Shadows/MigrationTools.Shadows.csproj" />
39+
<Project Path="src/MigrationTools.Tests/MigrationTools.Tests.csproj" />
40+
</Folder>
41+
<Folder Name="/Solution Items/">
42+
<File Path=".editorconfig" />
43+
<File Path=".gitattributes" />
44+
<File Path=".gitignore" />
45+
<File Path="appsettings.json" />
46+
<File Path="Directory.Build.props" />
47+
<File Path="Directory.Packages.props" />
48+
<File Path="GitVersion.yml" />
49+
<File Path="mkdocs.yml" />
50+
<File Path="README.md" />
51+
</Folder>
52+
<Folder Name="/Solution Items/Distribution/" />
53+
<Folder Name="/Solution Items/Distribution/Chocolatey/">
54+
<File Path="src/MigrationTools.Chocolatey/chocolateyInstall.ps1" />
55+
<File Path="src/MigrationTools.Chocolatey/chocolateyUninstall.ps1" />
56+
<File Path="src/MigrationTools.Chocolatey/vstssyncmigration.nuspec" />
57+
</Folder>
58+
<Folder Name="/Solution Items/Distribution/Extension/">
59+
<File Path="src/MigrationTools.Extension/LICENSE.txt" />
60+
<File Path="src/MigrationTools.Extension/README.md" />
61+
<File Path="src/MigrationTools.Extension/vss-extension.json" />
62+
</Folder>
63+
<Folder Name="/Solution Items/Distribution/Extension/images/">
64+
<File Path="src/MigrationTools.Extension/images/azure-devops-migration-tools-naked-agility-martin-hinshelwood.png" />
65+
<File Path="src/MigrationTools.Extension/images/extension-icon.png" />
66+
<File Path="src/MigrationTools.Extension/images/screenshot-01.png" />
67+
</Folder>
68+
<Folder Name="/Solution Items/Distribution/SampleConfigs/">
69+
<File Path="src/MigrationTools.Samples/configuration.json" />
70+
<File Path="src/MigrationTools.Samples/demo-mapping-scrum2Agile.json" />
71+
<File Path="src/MigrationTools.Samples/demo-migration-reset.json" />
72+
<File Path="src/MigrationTools.Samples/demo-migration.json" />
73+
</Folder>
74+
<Properties Name="CodealikeProperties" Scope="PostLoad">
75+
<Property Name="SolutionGuid" Value="51c92075-0694-476b-8366-efd65c9a9b77" />
76+
</Properties>
77+
</Solution>

docs/data/classes/reference.tools.tfsworkitemtypevalidatortool.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ configurationSamples:
1919
"$type": "TfsWorkItemTypeValidatorToolOptions",
2020
"Enabled": true,
2121
"IncludeWorkItemtypes": [],
22-
"FieldMappings": {}
22+
"SourceFieldMappings": {},
23+
"FixedTargetFields": {}
2324
}
2425
sampleFor: MigrationTools.Tools.TfsWorkItemTypeValidatorToolOptions
2526
description: missing XML code comments
@@ -30,14 +31,18 @@ options:
3031
type: Boolean
3132
description: If set to `true` then the tool will run. Set to `false` and the processor will not run.
3233
defaultValue: missing XML code comments
33-
- parameterName: FieldMappings
34+
- parameterName: FixedTargetFields
3435
type: Dictionary
35-
description: Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.
36+
description: List of target fields, that are considered as fixed. It means, even if the field is different against source field, no warning will be triggered, jus information about the differences. Use this list, whan you know about the differences between fields, but resolved it for example by using . Key is target work item type name. As this name, you can use * to define fixed fields which will be applied to all work item types.
3637
defaultValue: missing XML code comments
3738
- parameterName: IncludeWorkItemtypes
3839
type: List
3940
description: List of work item types which will be validated. If this list is empty, all work item types will be validated.
4041
defaultValue: missing XML code comments
42+
- parameterName: SourceFieldMappings
43+
type: Dictionary
44+
description: Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.
45+
defaultValue: missing XML code comments
4146
status: missing XML code comments
4247
processingTarget: missing XML code comments
4348
classFile: src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemTypeValidatorTool.cs

docs/static/schema/configuration.schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,13 +1826,17 @@
18261826
"description": "If set to `true` then the tool will run. Set to `false` and the processor will not run.",
18271827
"type": "boolean"
18281828
},
1829-
"fieldMappings": {
1830-
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
1829+
"fixedTargetFields": {
1830+
"description": "List of target fields, that are considered as fixed. It means, even if the field is different against source field, no warning will be triggered, jus information about the differences. Use this list, whan you know about the differences between fields, but resolved it for example by using . Key is target work item type name. As this name, you can use * to define fixed fields which will be applied to all work item types.",
18311831
"type": "object"
18321832
},
18331833
"includeWorkItemtypes": {
18341834
"description": "List of work item types which will be validated. If this list is empty, all work item types will be validated.",
18351835
"type": "array"
1836+
},
1837+
"sourceFieldMappings": {
1838+
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
1839+
"type": "object"
18361840
}
18371841
}
18381842
},

docs/static/schema/schema.tools.tfsworkitemtypevalidatortool.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99
"description": "If set to `true` then the tool will run. Set to `false` and the processor will not run.",
1010
"type": "boolean"
1111
},
12-
"fieldMappings": {
13-
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
12+
"fixedTargetFields": {
13+
"description": "List of target fields, that are considered as fixed. It means, even if the field is different against source field, no warning will be triggered, jus information about the differences. Use this list, whan you know about the differences between fields, but resolved it for example by using . Key is target work item type name. As this name, you can use * to define fixed fields which will be applied to all work item types.",
1414
"type": "object"
1515
},
1616
"includeWorkItemtypes": {
1717
"description": "List of work item types which will be validated. If this list is empty, all work item types will be validated.",
1818
"type": "array"
19+
},
20+
"sourceFieldMappings": {
21+
"description": "Field reference name mappings. Key is work item type name, value is dictionary of mapping source filed name to target field name. Target field name can be empty string to indicate that this field will not be validated in target. As work item type name, you can use * to define mappings which will be applied to all work item types.",
22+
"type": "object"
1923
}
2024
}
2125
}

src/MigrationTools.Clients.AzureDevops.Rest/Processors/KeepOutboundLinkTargetProcessorOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public KeepOutboundLinkTargetProcessorOptions()
1717
{
1818
WIQLQuery = "Select [System.Id] From WorkItems Where [System.TeamProject] = @project and not [System.WorkItemType] contains 'Test Suite, Test Plan,Shared Steps,Shared Parameter,Feedback Request'";
1919
TargetLinksToKeepOrganization = "https://dev.azure.com/nkdagility";
20-
TargetLinksToKeepProject = Guid.NewGuid().ToString();
20+
TargetLinksToKeepProject = "950311ea-ec93-4bf3-be62-de5e7eaff847";
2121
DryRun = true;
2222
CleanupFileName = "c:/temp/OutboundLinkTargets.bat";
2323
PrependCommand = "start";

0 commit comments

Comments
 (0)