Skip to content

Commit

Permalink
Support for user picker fields for jira server
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Hjelm committed Dec 1, 2023
1 parent 0489cb1 commit 771e3a9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/WorkItemMigrator/JiraExport/JiraItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,13 +485,20 @@ private static Dictionary<string, object> ExtractFields(string key, JObject remo
{
value = prop.Value.Value<string>();
}
// User picker
// User picker, cloud
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();
}
// User picker, on-prem
else if (type == JTokenType.Object && prop.Value["key"] != null
&& prop.Value["emailAddress"] != null && prop.Value["avatarUrls"] != null
&& prop.Value["displayName"] != null)
{
value = prop.Value["key"].ToString();
}
else if (prop.Value.Type == JTokenType.Date)
{
value = prop.Value.Value<DateTime>();
Expand Down

0 comments on commit 771e3a9

Please sign in to comment.