fix(worker): fix Bandel ticket sync and reactivate the integration
The status PATCH needs statusName alongside statusId or the API 400s, so every write-back had been silently failing. The board's flat assigneeName is null on every live ticket; the real assignee list is ticketAssignees[]. Import now also picks up In Bearbeitung tickets, not just Offen ones. Both issues are live-verified against the real API, so the feature flag flips back on.
This commit is contained in:
@@ -28,6 +28,27 @@ public sealed class TicketStatusMapTests
|
||||
Assert.NotEqual(1, TicketStatusMap.ToTicketStatus(status));
|
||||
}
|
||||
|
||||
// Der PATCH-Body braucht statusName; ein leerer Name wäre ein 400 der API.
|
||||
[Fact]
|
||||
public void NameOf_is_never_empty_for_any_status_we_write()
|
||||
{
|
||||
foreach (var status in Enum.GetValues<TaskStatus>())
|
||||
{
|
||||
if (TicketStatusMap.ToTicketStatus(status) is not int id) continue;
|
||||
Assert.False(string.IsNullOrWhiteSpace(TicketStatusMap.NameOf(id)));
|
||||
}
|
||||
|
||||
Assert.False(string.IsNullOrWhiteSpace(TicketStatusMap.NameOf(99)));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(1, "Offen")]
|
||||
[InlineData(2, "InBearbeitung")]
|
||||
[InlineData(3, "Fertig")]
|
||||
[InlineData(4, "Archiviert")]
|
||||
public void NameOf_matches_the_api_status_list(int id, string expected)
|
||||
=> Assert.Equal(expected, TicketStatusMap.NameOf(id));
|
||||
|
||||
[Theory]
|
||||
[InlineData("bandel:1234", 1234)]
|
||||
[InlineData("BANDEL:7", 7)]
|
||||
|
||||
Reference in New Issue
Block a user