Skip to content

Commit bef8431

Browse files
committed
PR 24: Fixed bug in field mapp
- Fixed bug in field mapp
1 parent 2662496 commit bef8431

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

TfsWitMigrator.Core/FieldMaps/FieldMapBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void Execute(WorkItem source, WorkItem target)
2222
TelemetryClient tc = new TelemetryClient();
2323
tc.TrackException(ex);
2424
Trace.TraceWarning(string.Format(" [EXCEPTION] {0}", ex.Message));
25-
throw;
25+
//throw;
2626
}
2727
}
2828

TfsWitMigrator.Core/FieldMaps/FieldToFieldMap.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ public FieldToFieldMap(string sourceField, string targetField)
2121

2222
internal override void InternalExecute(WorkItem source, WorkItem target)
2323
{
24-
if (source.Fields.Contains(sourceField))
24+
if (source.Fields.Contains(sourceField) && target.Fields.Contains(targetField))
2525
{
26-
// to tag
2726
target.Fields[targetField].Value = source.Fields[sourceField].Value;
2827
Trace.WriteLine(string.Format(" [UPDATE] field mapped {0}:{1} to {2}:{3}", source.Id, sourceField, target.Id, targetField));
2928
}

0 commit comments

Comments
 (0)