Skip to content

Commit b79ba84

Browse files
authored
Merge branch 'main' into main
2 parents 62a6efc + e9ea86d commit b79ba84

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,16 @@ private void PopulateWorkItem(WorkItemData oldWorkItemData, WorkItemData newWork
422422
newWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].Value = oldWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].Value;
423423
}
424424
newWorkItem.State = oldWorkItem.State;
425-
if (newWorkItem.Fields.Contains("Microsoft.VSTS.Common.ClosedDate") && newWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].IsEditable)
425+
try
426426
{
427-
newWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].Value = oldWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].Value;
427+
if (newWorkItem.Fields.Contains("Microsoft.VSTS.Common.ClosedDate") && newWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].IsEditable)
428+
{
429+
newWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].Value = oldWorkItem.Fields["Microsoft.VSTS.Common.ClosedDate"].Value;
430+
}
431+
}
432+
catch (FieldDefinitionNotExistException ex)
433+
{
434+
// Eat exception coz the TFS API Sucks
428435
}
429436
newWorkItem.Reason = oldWorkItem.Reason;
430437

0 commit comments

Comments
 (0)