Skip to content

Commit

Permalink
Merge pull request #1089 from solidify/bugfix/do-not-defer-work-items…
Browse files Browse the repository at this point in the history
…-with-100-attachments

Do not defer work items with 100 attachments
  • Loading branch information
Alexander-Hjelm authored Dec 21, 2024
2 parents 4cf74b3 + ecdbcc0 commit f356146
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,9 @@ private void CorrectImagePath(WorkItem wi, WiItem wiItem, WiRevision rev, ref st
textField = Regex.Replace(textField, imageSrcPattern, $"src=\"{tfsAtt.Url}\"");
isUpdated = true;
}
else
else if (wi.Relations.Where(r => r.Rel == "AttachedFile").Count() < 100) // Do not throw AttachmentNotFoundException if there are
// 100 attachments (ADO attachment count limit/work item).
// This means that some attachments could have been skipped.
{
Logger.Log(LogLevel.Warning, $"Attachment '{att}' referenced in text but is missing from work item {wiItem.OriginId}/{wi.Id}. This revision will be deferred until later.");
throw new AttachmentNotFoundException("Attachment not found on work item");
Expand Down

0 comments on commit f356146

Please sign in to comment.