From 45630a33efae523b93b71fd4513497336a973338 Mon Sep 17 00:00:00 2001 From: SepehrYahyaee <7heycallmegray@gmail.com> Date: Wed, 29 Jul 2026 09:49:01 +0330 Subject: [PATCH] YARA-1181 --- .../request-management.service.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/request-management/request-management.service.ts b/src/request-management/request-management.service.ts index 20b6175..23005a7 100644 --- a/src/request-management/request-management.service.ts +++ b/src/request-management/request-management.service.ts @@ -10467,6 +10467,25 @@ export class RequestManagementService { "workflow.nextStep": ClaimWorkflowStep.EXPERT_DAMAGE_ASSESSMENT, "workflow.locked": false, }, + // Clear all stale lock fields and prior-cycle evaluation data so the + // FileReviewer starts a completely clean lock cycle: + // - workflow lock fields left over from the completed review cycle + // - damageExpertReply / damageExpertResend / ownerInsurerApproval / + // ownerPricedPartsApproval — all belong to the rejected cycle and + // must not bleed into the new one (resend fulfilledAt would block + // submitResendDocsV2; stale reply would mislead the frontend) + // - assignedForReviewBy is intentionally kept so the same reviewer + // is still scoped to this file on re-lock + $unset: { + "workflow.lockedAt": "", + "workflow.expiredAt": "", + "workflow.lockedBy": "", + "workflow.preLockQueueSnapshot": "", + "evaluation.damageExpertReply": "", + "evaluation.damageExpertResend": "", + "evaluation.ownerInsurerApproval": "", + "evaluation.ownerPricedPartsApproval": "", + }, $push: { history: { type: "V5_FILE_MAKER_REJECTED",