Skip to content

Commit e1fad0c

Browse files
authored
#2595 Added null value handling (#2605)
#2596 2595 Added null value handling and use the same behaviour as for "null"
2 parents 9ffd253 + b9d6112 commit e1fad0c

File tree

1 file changed

+5
-0
lines changed
  • src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps

1 file changed

+5
-0
lines changed

src/MigrationTools.Clients.TfsObjectModel/Tools/FieldMappingTool/FieldMaps/FieldValueMap.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ internal override void InternalExecute(WorkItemData source, WorkItemData target)
3838
targetWi.Fields[Config.targetField].Value = Convert.ChangeType(Config.valueMapping["null"], t);
3939
Log.LogDebug("FieldValueMap: [UPDATE] field value mapped {SourceId}:{SourceField} to {TargetId}:{TargetField}", source.Id, Config.sourceField, target.Id, Config.targetField);
4040
}
41+
else if (sourceVal != null && sourceVal.Value == null)
42+
{
43+
targetWi.Fields[Config.targetField].Value = Convert.ChangeType(Config.valueMapping["null"], t);
44+
Log.LogDebug("FieldValueMap: [UPDATE] field value mapped {SourceId}:{SourceField} to {TargetId}:{TargetField}", source.Id, Config.sourceField, target.Id, Config.targetField);
45+
}
4146
else if (sourceVal != null && Config.valueMapping.ContainsKey(sourceVal.Value.ToString()))
4247
{
4348
targetWi.Fields[Config.targetField].Value = Convert.ChangeType(Config.valueMapping[sourceVal.Value.ToString()], t);

0 commit comments

Comments
 (0)