Skip to content

Commit

Permalink
Merge pull request #864 from solidify/feature/friendlier-warnings
Browse files Browse the repository at this point in the history
Feature/friendlier warnings
  • Loading branch information
Alexander-Hjelm authored Sep 29, 2023
2 parents e023e82 + 7376614 commit e51efc6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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
4 changes: 3 additions & 1 deletion src/WorkItemMigrator/WorkItemImport/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,9 @@ private bool ApplyAndSaveLinks(WiRevision rev, WorkItem wi, bool addLinkComments
if (link.TargetWiId == -1)
{
var errorLevel = Settings.IgnoreFailedLinks ? LogLevel.Warning : LogLevel.Error;
Logger.Log(errorLevel, $"'{link}' - target work item for Jira '{link.TargetOriginId}' is not yet created in Azure DevOps/TFS.");
Logger.Log(errorLevel, $"'{link}' - target work item for Jira '{link.TargetOriginId}'" +
$" is not yet created in Azure DevOps/TFS. You can safely ignore this warning if" +
$" this work item is scheduled for import later in your migration.");
success = false;
continue;
}
Expand Down

0 comments on commit e51efc6

Please sign in to comment.