feat(tickets): sweep all project boards for assigned tickets and tasks

This commit is contained in:
mika kuns
2026-10-01 08:36:11 +02:00
parent a0b234fe10
commit 47583ab1fe
5 changed files with 473 additions and 25 deletions
@@ -106,6 +106,20 @@ public sealed class TicketImportServiceTests : IDisposable
Assert.Equal(1, await ctx.Tasks.CountAsync(t => t.TicketRef == "bandel:1"));
}
[Fact]
public async Task Ticket_already_imported_into_another_list_is_not_imported_again()
{
var (import, ctx) = await HarnessAsync();
ctx.Lists.Add(new ListEntity { Id = "l2", Name = "Other", CreatedAt = DateTime.UtcNow, DefaultCommitType = "chore" });
await ctx.SaveChangesAsync();
await SeedExistingTaskAsync(ctx, "l2", "bandel:1");
var result = await import.ImportAsync(ListId, CancellationToken.None);
Assert.Equal(1, result.Created); // only #3
Assert.Equal(1, await ctx.Tasks.CountAsync(t => t.TicketRef == "bandel:1"));
}
[Fact]
public async Task Throws_when_the_list_has_no_ticket_project()
{