You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reports - Move expenses button is no longer present in bulk select menu after opening it #73623
Version Number: 9.2.39-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack: Exploratory Email or phone of affected tester (no customers):jdsojsnoisjo@gmail.com Issue reported by: Applause Internal Team Device used: Mac 15.5 / Chrome App Component: Search
Action Performed:
Precondition:
Account has self DM and workspace.
Go to staging.new.expensify.com
Go to self DM.
Create an expense.
Go to workspace chat.
Create an expense.
Go to Reports > Expenses.
Select both expenses via checkbox.
Click dropdown button > Move expenses.
Close the RHP.
Click dropdown button > Move expenses.
Expected Result:
Move expenses button will be present.
Actual Result:
Move expenses button is no longer present in bulk select menu after opening it.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Proposal: Move expenses button disappears after closing RHP
Problem Statement
Please re-state the problem that we are trying to solve in this issue.
When a user selects multiple expenses on the "Reports > Expenses" page and clicks "Move expenses" from the bulk actions dropdown menu, the RHP (Right-Hand Panel) opens. However, after closing the RHP and clicking the dropdown button again, the "Move expenses" option is no longer present in the bulk select menu, even though the expenses remain selected.
Root Cause
What is the root cause of that problem?
The root cause is in the Search component (src/components/Search/index.tsx). When the RHP closes and the search page regains focus, there's a useEffect hook (starting at line 435) that refreshes the selected transactions metadata to ensure it stays in sync with the current data.
However, this refresh logic was missing two critical fields when rebuilding the transaction metadata:
isFromOneTransactionReport
ownerAccountID (the critical one for this bug)
The ownerAccountID field is essential for determining if the selected expenses belong to multiple owners. In useSelectedTransactionsActions.ts (lines 83-124), the hasTransactionsFromMultipleOwners calculation relies on this field to check if expenses have different owners. Without this field in the metadata, the logic cannot properly determine ownership, which causes it to incorrectly hide the "Move expenses" button (line 273 requires !hasTransactionsFromMultipleOwners to be true).
The bug occurs specifically in two locations in the refresh logic:
Lines 454-478: For grouped transactions (when groupBy is set)
Lines 492-514: For non-grouped transactions
Both locations were missing the ownerAccountID field, while the prepareTransactionsList function (line 200) correctly included it.
Proposed Solution
What changes do you think we should make in order to solve the problem?
Add the missing isFromOneTransactionReport and ownerAccountID fields to the transaction metadata refresh logic in both locations in src/components/Search/index.tsx:
Location 1: Grouped transactions (around line 454-480)
In the useEffect hook where newTransactionList[transactionItem.transactionID] is built for grouped transactions:
Add isFromOneTransactionReport field in both locations
Add ownerAccountID field in both locations (uses report.ownerAccountID with fallback to accountID)
These match the pattern already used in the prepareTransactionsList function (line 200)
This ensures that when the selection metadata is refreshed (when the page regains focus after closing the RHP), all necessary fields are preserved. The hasTransactionsFromMultipleOwners check will then work correctly, and the "Move expenses" button will remain visible.
Alternative Solutions
What alternative solutions did you explore?
Alternative 1: Don't refresh metadata when page regains focus
Considered removing or conditionally skipping the refresh logic entirely
Rejected because: The refresh is necessary to keep metadata in sync when data changes (e.g., if a transaction is deleted or modified by another user while the RHP is open)
Alternative 2: Recalculate ownerAccountID in useSelectedTransactionsActions
Considered always recalculating owner information from transactions in the useSelectedTransactionsActions hook instead of relying on cached metadata
Rejected because: This would be less efficient and the metadata approach is already working correctly in other code paths (like prepareTransactionsList)
Activity
melvin-bot commentedon Oct 28, 2025
Triggered auto assignment to @NicMendonca (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Oct 28, 2025
Triggered auto assignment to @Julesssss (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Oct 28, 2025
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 28, 2025
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
abbasifaizan70 commentedon Oct 28, 2025
Proposal: Move expenses button disappears after closing RHP
Problem Statement
Please re-state the problem that we are trying to solve in this issue.
When a user selects multiple expenses on the "Reports > Expenses" page and clicks "Move expenses" from the bulk actions dropdown menu, the RHP (Right-Hand Panel) opens. However, after closing the RHP and clicking the dropdown button again, the "Move expenses" option is no longer present in the bulk select menu, even though the expenses remain selected.
Root Cause
What is the root cause of that problem?
The root cause is in the
Searchcomponent (src/components/Search/index.tsx). When the RHP closes and the search page regains focus, there's auseEffecthook (starting at line 435) that refreshes the selected transactions metadata to ensure it stays in sync with the current data.However, this refresh logic was missing two critical fields when rebuilding the transaction metadata:
isFromOneTransactionReportownerAccountID(the critical one for this bug)The
ownerAccountIDfield is essential for determining if the selected expenses belong to multiple owners. InuseSelectedTransactionsActions.ts(lines 83-124), thehasTransactionsFromMultipleOwnerscalculation relies on this field to check if expenses have different owners. Without this field in the metadata, the logic cannot properly determine ownership, which causes it to incorrectly hide the "Move expenses" button (line 273 requires!hasTransactionsFromMultipleOwnersto be true).The bug occurs specifically in two locations in the refresh logic:
groupByis set)Both locations were missing the
ownerAccountIDfield, while theprepareTransactionsListfunction (line 200) correctly included it.Proposed Solution
What changes do you think we should make in order to solve the problem?
Add the missing
isFromOneTransactionReportandownerAccountIDfields to the transaction metadata refresh logic in both locations insrc/components/Search/index.tsx:Location 1: Grouped transactions (around line 454-480)
In the
useEffecthook wherenewTransactionList[transactionItem.transactionID]is built for grouped transactions:newTransactionList[transactionItem.transactionID] = { action: transactionItem.action, canHold: transactionItem.canHold, isHeld: isOnHold(transactionItem), canUnhold: transactionItem.canUnhold, canChangeReport: canEditFieldOfMoneyRequest( transactionItem.reportAction, CONST.EDIT_REQUEST_FIELD.REPORT, undefined, undefined, outstandingReportsByPolicyID, transactionItem, transactionItem.report, transactionItem.policy, ), // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing isSelected: areAllMatchingItemsSelected || selectedTransactions[transactionItem.transactionID].isSelected, canDelete: transactionItem.canDelete, reportID: transactionItem.reportID, policyID: transactionItem.policyID, amount: transactionItem.modifiedAmount ?? transactionItem.amount, convertedAmount: transactionItem.convertedAmount, convertedCurrency: transactionItem.convertedCurrency, currency: transactionItem.currency, + isFromOneTransactionReport: transactionItem.isFromOneTransactionReport, + ownerAccountID: transactionItem.report?.ownerAccountID ?? transactionItem.accountID, };Location 2: Non-grouped transactions (around line 492-514)
In the same
useEffecthook but in theelsebranch for non-grouped transactions, add the same two fields:newTransactionList[transactionItem.transactionID] = { action: transactionItem.action, canHold: transactionItem.canHold, isHeld: isOnHold(transactionItem), canUnhold: transactionItem.canUnhold, canChangeReport: canEditFieldOfMoneyRequest(...), isSelected: areAllMatchingItemsSelected || selectedTransactions[transactionItem.transactionID].isSelected, canDelete: transactionItem.canDelete, reportID: transactionItem.reportID, policyID: transactionItem.policyID, amount: transactionItem.modifiedAmount ?? transactionItem.amount, convertedAmount: transactionItem.convertedAmount, convertedCurrency: transactionItem.convertedCurrency, currency: transactionItem.currency, + isFromOneTransactionReport: transactionItem.isFromOneTransactionReport, + ownerAccountID: transactionItem.report?.ownerAccountID ?? transactionItem.accountID, };Summary of changes:
isFromOneTransactionReportfield in both locationsownerAccountIDfield in both locations (usesreport.ownerAccountIDwith fallback toaccountID)prepareTransactionsListfunction (line 200)This ensures that when the selection metadata is refreshed (when the page regains focus after closing the RHP), all necessary fields are preserved. The
hasTransactionsFromMultipleOwnerscheck will then work correctly, and the "Move expenses" button will remain visible.Alternative Solutions
What alternative solutions did you explore?
Alternative 1: Don't refresh metadata when page regains focus
Alternative 2: Recalculate ownerAccountID in useSelectedTransactionsActions
useSelectedTransactionsActionshook instead of relying on cached metadataprepareTransactionsList)Demo
Screen.Recording.2025-10-28.at.4.11.10.PM.mov
m-natarajan commentedon Oct 28, 2025
Issue not repro in Windows10/Chrome, Iphone 17 Pro/Max/mWeb/Safari and Iphone 17 Pro Max/ios26
build 9.2.39-1
Recording.4071.mp4
0-02-01-29991c826fceea09e5c43aad5c66dcabf5c9fa97537d85808f851e3a2428bca1_f6a5668cc18ed7b1.mp4
0-02-01-7cec55c5617662383b764a0cc14018e2d07e38f544e7bd0500c4faa59a978113_dadafa0f4495c478.mp4