Skip to content

Commit

Permalink
Better warning message about users with missing emails/principal names
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Hjelm committed Sep 29, 2023
1 parent e023e82 commit 1995137
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/WorkItemMigrator/JiraExport/JiraProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,15 @@ public string GetUserEmail(string usernameOrAccountId)
{
Logger.Log(LogLevel.Warning,
Settings.UsingJiraCloud
? $"Email is not public for user '{usernameOrAccountId}' in Jira, using usernameOrAccountId '{usernameOrAccountId}' for mapping."
: $"Email for user '{usernameOrAccountId}' not found in Jira, using username '{usernameOrAccountId}' for mapping.");
? $"Email is not public for user '{usernameOrAccountId}' in Jira," +
$" using usernameOrAccountId '{usernameOrAccountId}' for mapping." +
$" You may safely ignore this warning, unless there is a subsequent warning about" +
$" the username/accountId being missing in the usermapping file." +
: $"Email for user '{usernameOrAccountId}' not found in Jira," +
$" using username '{usernameOrAccountId}' for mapping." +
$" You may safely ignore this warning, unless there is a subsequent warning about" +
$" the username/accountId being missing in the usermapping file." +
);
}
email = isUserEmailMissing ? usernameOrAccountId : user.Email;
_userEmailCache.Add(usernameOrAccountId, email);
Expand Down

0 comments on commit 1995137

Please sign in to comment.