From 4d687b11a600a6f43c47c435e965fd58b9ac10ac Mon Sep 17 00:00:00 2001 From: paulnjs Date: Tue, 20 Jan 2026 20:38:46 +0700 Subject: [PATCH] fix: Remove hold message appears each time held expense is moved to different report --- src/libs/actions/Transaction.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libs/actions/Transaction.ts b/src/libs/actions/Transaction.ts index 1d8d58ba6c17..4bf505b1b3c4 100644 --- a/src/libs/actions/Transaction.ts +++ b/src/libs/actions/Transaction.ts @@ -936,9 +936,11 @@ function changeTransactionsReport({ value: { reportID, ...(shouldClearAmount && {pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE}), - comment: { - hold: null, - }, + ...(isUnreported && { + comment: { + hold: null, + }, + }), ...(shouldClearAmount && {convertedAmount: null}), ...(oldIOUAction ? {linkedTrackedExpenseReportAction: newIOUAction} : {}), }, @@ -1295,8 +1297,8 @@ function changeTransactionsReport({ transactionIDToReportActionAndThreadData[transaction.transactionID] = baseTransactionData; } - // Build unhold report action - if (isOnHold(transaction)) { + // Build unhold report action only when moving to unreported (self DM) report + if (isUnreported && isOnHold(transaction)) { const unHoldAction = buildOptimisticUnHoldReportAction(); optimisticData.push({ onyxMethod: Onyx.METHOD.MERGE,