From abe65ccdbe35e23fadc35b0a8bb9abd392fdff3b Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:06:24 +0100 Subject: [PATCH 01/10] optimistic nextStep on hold --- src/libs/actions/IOU/index.ts | 69 ++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/IOU/index.ts b/src/libs/actions/IOU/index.ts index 81388aa9074e..ab998541230f 100644 --- a/src/libs/actions/IOU/index.ts +++ b/src/libs/actions/IOU/index.ts @@ -12248,7 +12248,9 @@ function putOnHold(transactionID: string, comment: string, initialReportID: stri optimisticData.push(parentActionData); } - const successData: Array> = [ + const successData: Array< + OnyxUpdate + > = [ { onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, @@ -12259,7 +12261,13 @@ function putOnHold(transactionID: string, comment: string, initialReportID: stri ]; const failureData: Array< - OnyxUpdate + OnyxUpdate< + | typeof ONYXKEYS.COLLECTION.TRANSACTION + | typeof ONYXKEYS.COLLECTION.REPORT_ACTIONS + | typeof ONYXKEYS.COLLECTION.REPORT + | typeof ONYXKEYS.COLLECTION.REPORT_METADATA + | typeof ONYXKEYS.COLLECTION.NEXT_STEP + > > = [ { onyxMethod: Onyx.METHOD.MERGE, @@ -12363,6 +12371,63 @@ function putOnHold(transactionID: string, comment: string, initialReportID: stri ); } + if (iouReport) { + // buildOptimisticNextStep is used in parallel + // eslint-disable-next-line @typescript-eslint/no-deprecated + const optimisticNextStepDeprecated = buildNextStepNew({ + report: iouReport, + predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, + shouldFixViolations: true, + }); + const optimisticNextStep = buildOptimisticNextStep({ + report: iouReport, + predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, + shouldFixViolations: true, + }); + + optimisticData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${iouReport.reportID}`, + value: optimisticNextStepDeprecated, + }); + optimisticData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`, + value: { + nextStep: optimisticNextStep, + pendingFields: { + nextStep: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, + }, + }, + }); + + successData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`, + value: { + pendingFields: { + nextStep: null, + }, + }, + }); + + failureData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${iouReport.reportID}`, + value: null, + }); + failureData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`, + value: { + nextStep: iouReport.nextStep ?? null, + pendingFields: { + nextStep: null, + }, + }, + }); + } + const params: HoldMoneyRequestParams = { transactionID, comment, From 636eab1bc7c9ed9e7514be989ed66b037da88cf4 Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:13:54 +0100 Subject: [PATCH 02/10] optimistic nextStep on unhold --- src/libs/actions/IOU/index.ts | 78 +++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/src/libs/actions/IOU/index.ts b/src/libs/actions/IOU/index.ts index ab998541230f..cbf6e17c7a1a 100644 --- a/src/libs/actions/IOU/index.ts +++ b/src/libs/actions/IOU/index.ts @@ -12459,12 +12459,19 @@ function putTransactionsOnHold(transactionsID: string[], comment: string, report function unholdRequest(transactionID: string, reportID: string) { const createdReportAction = buildOptimisticUnHoldReportAction(); const transactionViolations = allTransactionViolations[`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`]; + const updatedTransactionViolations = transactionViolations?.filter((violation) => violation.name !== CONST.VIOLATIONS.HOLD) ?? []; const transaction = allTransactions[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`]; const iouReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${transaction?.reportID}`]; const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]; const optimisticData: Array< - OnyxUpdate + OnyxUpdate< + | typeof ONYXKEYS.COLLECTION.REPORT_ACTIONS + | typeof ONYXKEYS.COLLECTION.TRANSACTION + | typeof ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + | typeof ONYXKEYS.COLLECTION.REPORT + | typeof ONYXKEYS.COLLECTION.NEXT_STEP + > > = [ { onyxMethod: Onyx.METHOD.MERGE, @@ -12486,7 +12493,7 @@ function unholdRequest(transactionID: string, reportID: string) { { onyxMethod: Onyx.METHOD.SET, key: `${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`, - value: transactionViolations?.filter((violation) => violation.name !== CONST.VIOLATIONS.HOLD) ?? [], + value: updatedTransactionViolations, }, { onyxMethod: Onyx.METHOD.MERGE, @@ -12511,7 +12518,7 @@ function unholdRequest(transactionID: string, reportID: string) { }); } - const successData: Array> = [ + const successData: Array> = [ { onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, @@ -12525,7 +12532,13 @@ function unholdRequest(transactionID: string, reportID: string) { ]; const failureData: Array< - OnyxUpdate + OnyxUpdate< + | typeof ONYXKEYS.COLLECTION.REPORT_ACTIONS + | typeof ONYXKEYS.COLLECTION.TRANSACTION + | typeof ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS + | typeof ONYXKEYS.COLLECTION.REPORT + | typeof ONYXKEYS.COLLECTION.NEXT_STEP + > > = [ { onyxMethod: Onyx.METHOD.MERGE, @@ -12559,6 +12572,63 @@ function unholdRequest(transactionID: string, reportID: string) { }, ]; + if (iouReport) { + // buildOptimisticNextStep is used in parallel + // eslint-disable-next-line @typescript-eslint/no-deprecated + const optimisticNextStepDeprecated = buildNextStepNew({ + report: iouReport, + predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, + shouldFixViolations: updatedTransactionViolations.length > 1, + }); + const optimisticNextStep = buildOptimisticNextStep({ + report: iouReport, + predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, + shouldFixViolations: updatedTransactionViolations.length > 1, + }); + + optimisticData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${iouReport.reportID}`, + value: optimisticNextStepDeprecated, + }); + optimisticData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`, + value: { + nextStep: optimisticNextStep, + pendingFields: { + nextStep: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, + }, + }, + }); + + successData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`, + value: { + pendingFields: { + nextStep: null, + }, + }, + }); + + failureData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${iouReport.reportID}`, + value: null, + }); + failureData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`, + value: { + nextStep: iouReport.nextStep ?? null, + pendingFields: { + nextStep: null, + }, + }, + }); + } + API.write( WRITE_COMMANDS.UNHOLD_MONEY_REQUEST, { From 500d350303d11fa5d6b5b95111c1a0127df9ed29 Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:45:19 +0100 Subject: [PATCH 03/10] add missing param --- src/libs/actions/IOU/index.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/IOU/index.ts b/src/libs/actions/IOU/index.ts index cbf6e17c7a1a..e713ddab23cc 100644 --- a/src/libs/actions/IOU/index.ts +++ b/src/libs/actions/IOU/index.ts @@ -12378,11 +12378,15 @@ function putOnHold(transactionID: string, comment: string, initialReportID: stri report: iouReport, predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, shouldFixViolations: true, + currentUserAccountIDParam: userAccountID, + currentUserEmailParam: currentUserEmail, }); const optimisticNextStep = buildOptimisticNextStep({ report: iouReport, predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, shouldFixViolations: true, + currentUserAccountIDParam: userAccountID, + currentUserEmailParam: currentUserEmail, }); optimisticData.push({ @@ -12456,7 +12460,7 @@ function putTransactionsOnHold(transactionsID: string[], comment: string, report /** * Remove expense from HOLD */ -function unholdRequest(transactionID: string, reportID: string) { +function unholdRequest(transactionID: string, reportID: string, policy: OnyxEntry) { const createdReportAction = buildOptimisticUnHoldReportAction(); const transactionViolations = allTransactionViolations[`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`]; const updatedTransactionViolations = transactionViolations?.filter((violation) => violation.name !== CONST.VIOLATIONS.HOLD) ?? []; @@ -12577,13 +12581,19 @@ function unholdRequest(transactionID: string, reportID: string) { // eslint-disable-next-line @typescript-eslint/no-deprecated const optimisticNextStepDeprecated = buildNextStepNew({ report: iouReport, + policy, predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, shouldFixViolations: updatedTransactionViolations.length > 1, + currentUserAccountIDParam: userAccountID, + currentUserEmailParam: currentUserEmail, }); const optimisticNextStep = buildOptimisticNextStep({ report: iouReport, + policy, predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, shouldFixViolations: updatedTransactionViolations.length > 1, + currentUserAccountIDParam: userAccountID, + currentUserEmailParam: currentUserEmail, }); optimisticData.push({ From 777433a8afa50e5b0ee02e546d845f9c73d12270 Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:57:25 +0100 Subject: [PATCH 04/10] fix IOUTest --- tests/actions/IOUTest.ts | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts index 1ead6c2f45fc..55df4dae4377 100644 --- a/tests/actions/IOUTest.ts +++ b/tests/actions/IOUTest.ts @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ + /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import {renderHook, waitFor} from '@testing-library/react-native'; import {format} from 'date-fns'; @@ -5949,7 +5950,14 @@ describe('actions/IOU', () => { describe('unHoldRequest', () => { test("should update the transaction thread report's lastVisibleActionCreated to the optimistically added unhold report action created timestamp", () => { - const iouReport = buildOptimisticIOUReport(1, 2, 100, '1', 'USD'); + const policyID = '577'; + const policy: Policy = { + ...createRandomPolicy(Number(policyID)), + }; + const iouReport: Report = { + ...buildOptimisticIOUReport(1, 2, 100, '1', 'USD'), + policyID, + }; const transaction = buildOptimisticTransaction({ transactionParams: { amount: 100, @@ -5987,7 +5995,7 @@ describe('actions/IOU', () => { }) .then(() => { // When an expense is unhold - unholdRequest(transaction.transactionID, transactionThread.reportID); + unholdRequest(transaction.transactionID, transactionThread.reportID, policy); return waitForBatchedUpdates(); }) .then(() => { @@ -6015,7 +6023,14 @@ describe('actions/IOU', () => { }); test('should rollback unhold request on API failure', () => { - const iouReport = buildOptimisticIOUReport(1, 2, 100, '1', 'USD'); + const policyID = '577'; + const policy: Policy = { + ...createRandomPolicy(Number(policyID)), + }; + const iouReport: Report = { + ...buildOptimisticIOUReport(1, 2, 100, '1', 'USD'), + policyID, + }; const transaction = buildOptimisticTransaction({ transactionParams: { amount: 100, @@ -6054,7 +6069,7 @@ describe('actions/IOU', () => { .then(() => { mockFetch.fail(); mockFetch?.resume?.(); - unholdRequest(transaction.transactionID, transactionThread.reportID); + unholdRequest(transaction.transactionID, transactionThread.reportID, policy); return waitForBatchedUpdates(); }) .then(() => { From 5c68fe47f374e35ba4681f87b1be57ae9887d4ea Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sun, 4 Jan 2026 00:02:27 +0100 Subject: [PATCH 05/10] remove uncorrect autoReportingFrequency check (this value is never = manual) --- src/libs/NextStepUtils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/NextStepUtils.ts b/src/libs/NextStepUtils.ts index eccad5b3b9d2..6b644cea886c 100644 --- a/src/libs/NextStepUtils.ts +++ b/src/libs/NextStepUtils.ts @@ -139,7 +139,7 @@ function buildOptimisticNextStep(params: BuildNextStepNewParams): ReportNextStep }; // Scheduled submit enabled - if (policy?.harvesting?.enabled && autoReportingFrequency !== CONST.POLICY.AUTO_REPORTING_FREQUENCIES.MANUAL && isReportContainingTransactions) { + if (policy?.harvesting?.enabled && isReportContainingTransactions) { nextStep = { messageKey: CONST.NEXT_STEP.MESSAGE_KEY.WAITING_FOR_AUTOMATIC_SUBMIT, icon: CONST.NEXT_STEP.ICONS.HOURGLASS, @@ -183,7 +183,7 @@ function buildOptimisticNextStep(params: BuildNextStepNewParams): ReportNextStep } // Manual submission - if (report?.total !== 0 && !policy?.harvesting?.enabled && autoReportingFrequency === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.MANUAL) { + if (report?.total !== 0 && !policy?.harvesting?.enabled) { nextStep = { messageKey: CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_ADD_TRANSACTIONS, icon: CONST.NEXT_STEP.ICONS.HOURGLASS, @@ -499,7 +499,7 @@ function buildNextStepNew(params: BuildNextStepNewParams): ReportNextStepDepreca }; // Scheduled submit enabled - if (policy?.harvesting?.enabled && autoReportingFrequency !== CONST.POLICY.AUTO_REPORTING_FREQUENCIES.MANUAL && isReportContainingTransactions) { + if (policy?.harvesting?.enabled && isReportContainingTransactions) { optimisticNextStep.message = [ { text: 'Waiting for ', @@ -553,7 +553,7 @@ function buildNextStepNew(params: BuildNextStepNewParams): ReportNextStepDepreca } // Manual submission - if (report?.total !== 0 && !policy?.harvesting?.enabled && autoReportingFrequency === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.MANUAL) { + if (report?.total !== 0 && !policy?.harvesting?.enabled) { optimisticNextStep.message = [ { text: 'Waiting for ', From 7f5e3b8a950ebe49712044fc6e02d993457a6a93 Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sun, 4 Jan 2026 20:36:37 +0100 Subject: [PATCH 06/10] fix tests --- src/libs/NextStepUtils.ts | 2 +- tests/unit/NextStepUtilsTest.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/NextStepUtils.ts b/src/libs/NextStepUtils.ts index 6b644cea886c..7a0171153836 100644 --- a/src/libs/NextStepUtils.ts +++ b/src/libs/NextStepUtils.ts @@ -490,7 +490,7 @@ function buildNextStepNew(params: BuildNextStepNewParams): ReportNextStepDepreca text: ' to ', }, { - text: 'add', + text: isReportContainingTransactions ? 'submit' : 'add', }, { text: ' %expenses.', diff --git a/tests/unit/NextStepUtilsTest.ts b/tests/unit/NextStepUtilsTest.ts index 31fd3176089e..2a2a85e2e9c2 100644 --- a/tests/unit/NextStepUtilsTest.ts +++ b/tests/unit/NextStepUtilsTest.ts @@ -162,7 +162,7 @@ describe('libs/NextStepUtils', () => { test('self review', () => { optimisticNextStep.icon = CONST.NEXT_STEP.ICONS.HOURGLASS; - // Waiting for userSubmitter to add expense(s). + // Waiting for userSubmitter to submit expense(s). optimisticNextStep.message = [ { text: 'Waiting for ', @@ -175,7 +175,7 @@ describe('libs/NextStepUtils', () => { text: ' to ', }, { - text: 'add', + text: 'submit', }, { text: ' %expenses.', From 864da86a193054fc343dd0666571807587e8a641 Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sun, 4 Jan 2026 20:39:53 +0100 Subject: [PATCH 07/10] fix ts --- src/hooks/useSelectedTransactionsActions.ts | 2 +- src/libs/ReportUtils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hooks/useSelectedTransactionsActions.ts b/src/hooks/useSelectedTransactionsActions.ts index a50965e1e33f..fa2f6b3e857e 100644 --- a/src/hooks/useSelectedTransactionsActions.ts +++ b/src/hooks/useSelectedTransactionsActions.ts @@ -215,7 +215,7 @@ function useSelectedTransactionsActions({ if (!action?.childReportID) { continue; } - unholdRequest(transactionID, action?.childReportID); + unholdRequest(transactionID, action?.childReportID, policy); } clearSelectedTransactions(true); }, diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 7fc220ba1ee0..ad2abf9b8270 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4989,11 +4989,11 @@ const changeMoneyRequestHoldStatus = (reportAction: OnyxEntry): vo const transaction = allTransactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`] ?? ({} as Transaction); const isOnHold = isOnHoldTransactionUtils(transaction); - const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${moneyRequestReport.policyID}`] ?? null; + const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${moneyRequestReport.policyID}`]; if (isOnHold) { if (reportAction.childReportID) { - unholdRequest(transactionID, reportAction.childReportID); + unholdRequest(transactionID, reportAction.childReportID, policy); } else { Log.warn('Missing reportAction.childReportID during money request unhold'); } From 0efef37493431e72992bd95d3a899ab56b70aa6b Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Sun, 4 Jan 2026 20:59:41 +0100 Subject: [PATCH 08/10] fix test --- tests/unit/hooks/useSelectedTransactionsActions.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/hooks/useSelectedTransactionsActions.test.ts b/tests/unit/hooks/useSelectedTransactionsActions.test.ts index de954957ddf5..d3c8ccfd682f 100644 --- a/tests/unit/hooks/useSelectedTransactionsActions.test.ts +++ b/tests/unit/hooks/useSelectedTransactionsActions.test.ts @@ -518,7 +518,7 @@ describe('useSelectedTransactionsActions', () => { unholdOption?.onSelected?.(); - expect(unholdRequest).toHaveBeenCalledWith(transactionID, 'child123'); + expect(unholdRequest).toHaveBeenCalledWith(transactionID, 'child123', undefined); expect(mockClearSelectedTransactions).toHaveBeenCalledWith(true); }); From c42d09ddb3a077ede36450c2e8203efe913b0a11 Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Thu, 8 Jan 2026 00:47:04 +0100 Subject: [PATCH 09/10] style --- tests/actions/IOUTest.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/actions/IOUTest.ts b/tests/actions/IOUTest.ts index 458d2876497f..152e218d0a54 100644 --- a/tests/actions/IOUTest.ts +++ b/tests/actions/IOUTest.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ - /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import {renderHook, waitFor} from '@testing-library/react-native'; import {format} from 'date-fns'; From f6a1435db25031825bd8c416982628db034684d6 Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Fri, 9 Jan 2026 18:16:14 +0100 Subject: [PATCH 10/10] fix violations length check --- src/libs/actions/IOU/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/IOU/index.ts b/src/libs/actions/IOU/index.ts index 1a193b6cb711..b703815057e3 100644 --- a/src/libs/actions/IOU/index.ts +++ b/src/libs/actions/IOU/index.ts @@ -12158,7 +12158,7 @@ function unholdRequest(transactionID: string, reportID: string, policy: OnyxEntr report: iouReport, policy, predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, - shouldFixViolations: updatedTransactionViolations.length > 1, + shouldFixViolations: updatedTransactionViolations.length > 0, currentUserAccountIDParam: userAccountID, currentUserEmailParam: currentUserEmail, }); @@ -12166,7 +12166,7 @@ function unholdRequest(transactionID: string, reportID: string, policy: OnyxEntr report: iouReport, policy, predictedNextStatus: iouReport.statusNum ?? CONST.REPORT.STATUS_NUM.OPEN, - shouldFixViolations: updatedTransactionViolations.length > 1, + shouldFixViolations: updatedTransactionViolations.length > 0, currentUserAccountIDParam: userAccountID, currentUserEmailParam: currentUserEmail, });