diff --git a/Api.SeaHavenIndustries.Tests/DashboardUnassignedTests.cs b/Api.SeaHavenIndustries.Tests/DashboardUnassignedTests.cs
index 81649e6..996b53c 100644
--- a/Api.SeaHavenIndustries.Tests/DashboardUnassignedTests.cs
+++ b/Api.SeaHavenIndustries.Tests/DashboardUnassignedTests.cs
@@ -12,7 +12,7 @@ using Xunit;
namespace Api.SeaHavenIndustries.Tests;
///
-/// SH-392: the Dashboard "Unassigned" count is open work orders with no
+/// The Dashboard "Unassigned" count is open work orders with no
/// dispatcher in the selected period, and it equals the Work Orders list the
/// tile drills into (GET /board/search, Dispatcher = Unassigned).
///
@@ -84,7 +84,8 @@ public class DashboardUnassignedTests
Wo(15, inRange, status: null), // counted: no status at all
Wo(16, inRange, status: null, legacyStatus: "Done", statusText: "Open"), // closed: LegacyStatus wins
Wo(17, inRange, status: null, statusText: " Cancelled "), // canceled
- Wo(18, inRange, assignTo: "disp-1", status: null, statusText: "Open")); // assigned
+ Wo(18, inRange, assignTo: "disp-1", status: null, statusText: "Open"), // assigned
+ Wo(19, inRange, status: null, legacyStatus: "Open", statusText: "Done")); // counted: LegacyStatus wins
ctx.SaveChanges();
}
@@ -141,9 +142,9 @@ public class DashboardUnassignedTests
var allTime = await NewDashboard(ctx).GetStatsAsync(
AccountUser(1), new DashboardStatsQueryDTO(), CancellationToken.None);
- // 1, 2, 3 plus legacy 13, 14 and 15.
- inRange.Unassigned.Should().Be(6);
- allTime.Unassigned.Should().Be(8);
+ // 1, 2, 3 plus legacy 13, 14, 15 and 19.
+ inRange.Unassigned.Should().Be(7);
+ allTime.Unassigned.Should().Be(9);
}
[Fact]
@@ -241,5 +242,8 @@ public class DashboardUnassignedTests
}, user, "admin-1");
stats.Unassigned.Should().Be(list.TotalCount);
+ var listed = list.Items.Select(row => row.Id).ToList();
+ listed.Should().Contain(new[] { 13, 14, 15, 19 });
+ listed.Should().NotContain(new[] { 16, 17, 18 });
}
}
diff --git a/SeaHaven.DataServices/Implementation/DashboardDataService.cs b/SeaHaven.DataServices/Implementation/DashboardDataService.cs
index 02362a2..33957fc 100644
--- a/SeaHaven.DataServices/Implementation/DashboardDataService.cs
+++ b/SeaHaven.DataServices/Implementation/DashboardDataService.cs
@@ -62,7 +62,7 @@ namespace SeaHaven.DataServices.Implementation
query, new[] { "__unassigned__" }, myWorkOrders: false, currentUserId: null);
query = WorkOrderBoardQueryFilters.ApplyStatusFilter(query, OpenLifecycleStatuses);
// All time counts what the board lists with no range: every week plus
- // undated work, so the tile and its drill-down agree (SH-392).
+ // undated work, so the tile and its drill-down agree.
query = dateFrom is DateOnly from && dateTo is DateOnly to
? WorkOrderBoardQueryFilters.ApplyDateRangeFilter(query, from, to)
: WorkOrderBoardQueryFilters.ApplyDateRangeFilter(
diff --git a/SeaHaven.DataServices/Interfaces/IDashboardDataService.cs b/SeaHaven.DataServices/Interfaces/IDashboardDataService.cs
index d55bdea..ee1932d 100644
--- a/SeaHaven.DataServices/Interfaces/IDashboardDataService.cs
+++ b/SeaHaven.DataServices/Interfaces/IDashboardDataService.cs
@@ -16,7 +16,7 @@ namespace SeaHaven.DataServices.Interfaces
///
/// Open work orders with no dispatcher in the period, counted with the
- /// same filters as GET /board/search for Dispatcher=Unassigned (SH-392),
+ /// same filters as GET /board/search for Dispatcher=Unassigned,
/// so the Dashboard number matches the list it drills into.
///
Task CountOpenUnassignedAsync(
diff --git a/SeaHaven.Services/DTOs/DashboardDTOs.cs b/SeaHaven.Services/DTOs/DashboardDTOs.cs
index 146c491..7e4438f 100644
--- a/SeaHaven.Services/DTOs/DashboardDTOs.cs
+++ b/SeaHaven.Services/DTOs/DashboardDTOs.cs
@@ -106,7 +106,7 @@ namespace SeaHaven.Services.DTOs
public int ScheduledTomorrow { get; set; }
public int PendingUplifts { get; set; }
public int AvetaPending { get; set; }
- /// Open work orders with no dispatcher in the selected period (SH-392).
+ /// Open work orders with no dispatcher in the selected period.
public int Unassigned { get; set; }
public DashboardBreakdownDTO Breakdown { get; set; } = new();
public int DueCount { get; set; }