The email counts should come from the completed bulk action… not this iteration (#2271)

This commit is contained in:
Matt Aitken
2025-07-16 13:46:48 +01:00
committed by GitHub
parent c0b6c41afc
commit 569cecb675
@@ -274,7 +274,7 @@ export class BulkActionService extends BaseService {
});
// 4. Update the bulk action group
await this._prisma.bulkActionGroup.update({
const updatedGroup = await this._prisma.bulkActionGroup.update({
where: { id: bulkActionId },
data: {
cursor: runIdsToProcess.at(runIdsToProcess.length - 1),
@@ -323,9 +323,9 @@ export class BulkActionService extends BaseService {
friendlyId: group.friendlyId,
}
)}`,
totalCount: successCount + failureCount,
successCount,
failureCount,
totalCount: updatedGroup.totalCount,
successCount: updatedGroup.successCount,
failureCount: updatedGroup.failureCount,
type: group.type,
createdAt: formatDateTime(group.createdAt, "UTC", [], true, true),
completedAt: formatDateTime(group.completedAt ?? new Date(), "UTC", [], true, true),