Skip to content

Commit

Permalink
Merge pull request #873 from solidify/bugfix/fix-for-user-fields-on-f…
Browse files Browse the repository at this point in the history
…irst-revision

Fix for User-type fields on first revision
  • Loading branch information
Alexander-Hjelm authored Oct 9, 2023
2 parents be7b728 + 6bb7ae9 commit 2d334fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/WorkItemMigrator/JiraExport/JiraItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ private static Dictionary<string, object> ExtractFields(string key, JObject remo
{
value = prop.Value.Value<string>();
}
// User picker
else if (type == JTokenType.Object && prop.Value["accountId"] != null
&& prop.Value["emailAddress"] != null && prop.Value["avatarUrls"] != null
&& prop.Value["displayName"] != null)
{
value = prop.Value["accountId"].ToString();
}
else if (prop.Value.Type == JTokenType.Date)
{
value = prop.Value.Value<DateTime>();
Expand Down

0 comments on commit 2d334fb

Please sign in to comment.