Skip to content

Commit

Permalink
Merge pull request #923 from solidify/bugfix/user-picker-on-prem
Browse files Browse the repository at this point in the history
Support for user picker fields for jira server
  • Loading branch information
Alexander-Hjelm authored Dec 1, 2023
2 parents 0489cb1 + 771e3a9 commit 6a33b0e
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 6a33b0e

Please sign in to comment.