From 95ea8c280bdb7781f2e45476b6736d8242f2f982 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Wed, 16 Jul 2025 13:30:31 +0100 Subject: [PATCH] =?UTF-8?q?The=20email=20counts=20should=20come=20from=20t?= =?UTF-8?q?he=20completed=20bulk=20action=E2=80=A6=20not=20this=20iteratio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/webapp/app/v3/services/bulk/BulkActionV2.server.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/webapp/app/v3/services/bulk/BulkActionV2.server.ts b/apps/webapp/app/v3/services/bulk/BulkActionV2.server.ts index 8b0f23eb881..86ca632f242 100644 --- a/apps/webapp/app/v3/services/bulk/BulkActionV2.server.ts +++ b/apps/webapp/app/v3/services/bulk/BulkActionV2.server.ts @@ -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),