Skip to content

Commit 1907129

Browse files
committed
Enhance validation logging and documentation for WorkItemTypeValidatorTool
1 parent 59bc659 commit 1907129

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"azureFunctions.projectLanguage": "C#",
44
"azureFunctions.projectRuntime": "~4",
55
"debug.internalConsoleOptions": "neverOpen",
6-
"azureFunctions.preDeployTask": "publish (functions)"
6+
"azureFunctions.preDeployTask": "publish (functions)",
7+
"dotnet.defaultSolution": "MigrationTools.slnx"
78
}

docs/content/docs/reference/tools/tfs-workitemtype-validator-tool/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dataFile: reference.tools.tfsworkitemtypevalidatortool.yaml
55
schemaFile: schema.tools.tfsworkitemtypevalidatortool.json
66
slug: work-item-type-validator-tool
77
aliases:
8+
- /TfsWorkItemTypeValidatorTool
89
- /docs/Reference/Tools/WorkItemTypeValidatorTool
910
- /Reference/Tools/WorkItemTypeValidatorTool
1011
- /learn/azure-devops-migration-tools/Reference/Tools/WorkItemTypeValidatorTool

src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ protected override void InternalExecute()
249249

250250
private void ValidateWorkItemTypes()
251251
{
252+
Log.LogInformation("[ValidateWorkItemTypes]");
253+
Log.LogInformation("------------------------------------");
254+
Log.LogInformation("Starting Pre-Validation: Validating work item types and fields with `WorkItemTypeValidatorTool`.");
255+
Log.LogInformation("Refer to https://devopsmigration.io/TfsWorkItemTypeValidatorTool/ for configuration.");
256+
Log.LogInformation("------------------------------------");
252257
if (CommonTools.WorkItemTypeValidatorTool.Enabled)
253258
{
254259
var sourceWits = Source.WorkItems.Project
@@ -264,6 +269,7 @@ private void ValidateWorkItemTypes()
264269
if (!CommonTools.WorkItemTypeValidatorTool.ValidateWorkItemTypes(
265270
sourceWits, targetWits, Target.Options.ReflectedWorkItemIdField))
266271
{
272+
Log.LogError("Validation of work item types failed.");
267273
Environment.Exit(-1);
268274
}
269275
}
@@ -275,6 +281,8 @@ private void ValidateWorkItemTypes()
275281
+ " or migration may not work at all.";
276282
Log.LogWarning(msg);
277283
}
284+
Log.LogInformation("------------------------------------");
285+
Log.LogInformation("[/ValidateWorkItemTypes]");
278286
}
279287

280288
private void ValidateAllUsersExistOrAreMapped(List<WorkItemData> sourceWorkItems)

src/MigrationTools.Clients.TfsObjectModel/Tools/TfsWorkItemTypeValidatorTool.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
namespace MigrationTools.Tools
1212
{
13+
/// <summary>
14+
/// This tool checks if the work item types in the source system have corresponding types in the target system,
15+
/// and validates their fields and mappings.
16+
/// </summary>
1317
public class TfsWorkItemTypeValidatorTool : Tool<TfsWorkItemTypeValidatorToolOptions>
1418
{
1519
private readonly IWorkItemTypeMappingTool _witMappingTool;

0 commit comments

Comments
 (0)