Skip to content

Commit

Permalink
Merge pull request #899 from Jbekker/fix-user-picker
Browse files Browse the repository at this point in the history
Fix User-type fields for Jira Server on first revision
  • Loading branch information
Alexander-Hjelm authored Dec 25, 2023
2 parents 0383031 + 08e4baf commit 400849f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WorkItemMigrator/JiraExport/JiraItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,12 @@ private static Dictionary<string, object> ExtractFields(string key, JObject remo
{
value = prop.Value.Value<string>();
}
// User picker, cloud
else if (type == JTokenType.Object && prop.Value["accountId"] != null
// User picker, server ('name' check) + cloud ('accountId' check)
else if (type == JTokenType.Object && (prop.Value["accountId"] != null || prop.Value["name"] != null)
&& prop.Value["emailAddress"] != null && prop.Value["avatarUrls"] != null
&& prop.Value["displayName"] != null)
{
value = prop.Value["accountId"].ToString();
value = extractAccountIdOrUsername(prop.Value);
}
// User picker, on-prem
else if (type == JTokenType.Object && prop.Value["key"] != null
Expand Down

0 comments on commit 400849f

Please sign in to comment.