Skip to content

Commit 1ed929f

Browse files
committed
moved SkipValidateAllUsersExistOrAreMapped to TfsUserMappingTool
1 parent 74e64d6 commit 1ed929f

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ protected override void InternalExecute()
215215

216216
private void ValidateAllUsersExistOrAreMapped(List<WorkItemData> sourceWorkItems)
217217
{
218-
if (this.Options.SkipValidateAllUsersExistOrAreMapped)
218+
if (CommonTools.UserMapping.Options.SkipValidateAllUsersExistOrAreMapped)
219219
{
220220
contextLog.Information("Skipped: Validating::Check that all users in the source exist in the target or are mapped!");
221221
return;

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ public class TfsWorkItemMigrationProcessorOptions : ProcessorOptions, IWorkItemP
113113
/// </summary>
114114
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
115115
public bool SkipRevisionWithInvalidAreaPath { get; set; } = false;
116-
117-
/// <summary>
118-
/// When set to true, this setting will skip a validation that all users exists or mapped
119-
/// </summary>
120-
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
121-
public bool SkipValidateAllUsersExistOrAreMapped { get; set; } = false;
122116
}
123117

124118

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using MigrationTools.Tools.Infrastructure;
3+
using Newtonsoft.Json;
34

45
namespace MigrationTools.Tools
56
{
@@ -21,12 +22,19 @@ public class TfsUserMappingToolOptions : ToolOptions, ITfsUserMappingToolOptions
2122
/// users will be mapped by their email address first. If no match is found, then the display name will be used.
2223
/// </summary>
2324
public bool MatchUsersByEmail { get; set; }
25+
26+
/// <summary>
27+
/// When set to true, this setting will skip a validation that all users exists or mapped
28+
/// </summary>
29+
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
30+
public bool SkipValidateAllUsersExistOrAreMapped { get; set; } = false;
2431
}
2532

2633
public interface ITfsUserMappingToolOptions
2734
{
2835
List<string> IdentityFieldsToCheck { get; set; }
2936
string UserMappingFile { get; set; }
3037
bool MatchUsersByEmail { get; set; }
38+
bool SkipValidateAllUsersExistOrAreMapped { get; set; }
3139
}
3240
}

0 commit comments

Comments
 (0)