Skip to content

Commit

Permalink
Merge pull request #867 from nickn00/Branch-to-fix-attachments
Browse files Browse the repository at this point in the history
Fix Attachments fail to download from Jira
  • Loading branch information
Alexander-Hjelm authored Oct 18, 2023
2 parents 56a7600 + c6b7caf commit 1924b33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/WorkItemMigrator/JiraExport/JiraItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ private static void HandleAttachmentChange(JiraChangeItem item, List<RevisionAct

if (UndoAttachmentChange(attachmentChange, attachments))
{
attachmentChanges.Add(attachmentChange);
Logger.Log(LogLevel.Debug, $"Attachment {item.ToString ?? item.FromString} cannot be migrated because it was deleted.");
}
else
{
Logger.Log(LogLevel.Debug, $"Attachment {item.ToString ?? item.FromString} cannot be migrated because it was deleted.");
attachmentChanges.Add(attachmentChange);
}
}

Expand Down Expand Up @@ -258,9 +258,9 @@ private static bool UndoAttachmentChange(RevisionAction<JiraAttachment> attachme
if (attachmentChange.ChangeType == RevisionChangeType.Removed)
{
Logger.Log(LogLevel.Debug, $"Skipping undo for attachment '{attachmentChange.ToString()}'.");
return false;
return RemoveAttachment(attachmentChange, attachments);
}
return RemoveAttachment(attachmentChange, attachments);
return false;
}

private static bool RemoveAttachment(RevisionAction<JiraAttachment> attachmentChange, List<JiraAttachment> attachments)
Expand Down

0 comments on commit 1924b33

Please sign in to comment.