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
[Due for payment 2026-01-28] [$250] Expense - Split status is removed after editing split, error after editing second split #78933
Version Number: 9.2.94-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#77911 Email or phone of affected tester (no customers):sdosdjnnosijsnoij@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Open expense report.
Click More > Split > Save.
Click More > Delete > Delete the report.
Go to self DM.
Open any split.
Click Report > Create report.
Click Amount.
→ Edit splits page opens.
Edit the amount and save it.
Click Amount field again.
BUG 1: Split status is removed. Amount editor opens instead of Edit splits page.
Go to self DM.
Open the remaining split.
Click Report > Select the report in Step 9.
Click Amount.
Edit the amount and save it.
BUG 2: "Unexpected error deleting this expense. Please try again later.The specified transaction is not one of the split transactions" error shows up.
Expected Result:
BUG 1: Split status should persist after editing the split amount. Edit splits page should open after editing the split amount.
BUG 2: No error should show up after editing the second split amount.
Actual Result:
BUG 1: Split status is removed. Amount editor opens instead of Edit splits page.
BUG 2: "Unexpected error deleting this expense. Please try again later.The specified transaction is not one of the split transactions" error shows up.
Please re-state the problem that we are trying to solve in this issue.
Two bugs:
BUG 1: After editing a split expense amount, the split status is removed - clicking Amount field opens Amount editor instead of Edit splits page.
BUG 2: When editing the second split after moving it to the same report, an error appears: "Unexpected error deleting this expense. Please try again later. The specified transaction is not one of the split transactions"
What is the root cause of that problem?
The root cause is in getChildTransactions in src/libs/TransactionUtils/index.ts:2367-2375:
functiongetChildTransactions(transactions: OnyxCollection<Transaction>,reports: OnyxCollection<Report>,originalTransactionID: string|undefined){returnObject.values(transactions??{}).filter((currentTransaction)=>{constcurrentReport=reports?.[`${ONYXKEYS.COLLECTION.REPORT}${currentTransaction?.reportID}`];return(currentTransaction?.comment?.originalTransactionID===originalTransactionID&&!!currentReport&&// <-- ISSUE: Requires report to existcurrentTransaction?.pendingAction!==CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE);});}
The function requires !!currentReport - the transaction's report must exist. When a report is deleted, child transactions that still reference the deleted report cannot be found.
In updateSplitTransactions (src/libs/actions/IOU/index.ts:14393):
Since only 1 child was found, isReverseSplitOperation = true, triggering a "revert to single expense" operation.
When isReverseSplitOperation is true (lines 14497-14513), the transactionParams is overwritten withoutoriginalTransactionID and source:
if(isReverseSplitOperation){requestMoneyInformation.transactionParams={amount: splitExpense.amount??0,currency: originalTransactionDetails?.currency??CONST.CURRENCY.USD,// ... other fields but NO originalTransactionID or source!};}
This clears the split relationship, causing BUG 1.
BUG 2 occurs because:
The first split child has been reverted via REVERT_SPLIT_TRANSACTION API call
When the user tries to edit the second split and move it to the same report, the backend rejects it because the original parent transaction's split structure is now inconsistent
What changes do you think we should make in order to solve the problem?
Fix getChildTransactions to not require the report to exist when the transaction is part of a deleted report:
src/libs/TransactionUtils/index.ts:
function getChildTransactions(transactions: OnyxCollection<Transaction>, reports: OnyxCollection<Report>, originalTransactionID: string | undefined) {
return Object.values(transactions ?? {}).filter((currentTransaction) => {
const currentReport = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${currentTransaction?.reportID}`];
+ // Include transactions even if their report was deleted, as long as they have the originalTransactionID+ // This prevents incorrect isReverseSplitOperation when some split children have deleted reports+ const hasValidReportOrDeletedReport = !!currentReport || !currentTransaction?.reportID;
return (
currentTransaction?.comment?.originalTransactionID === originalTransactionID &&
- !!currentReport &&+ hasValidReportOrDeletedReport &&
currentTransaction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE
);
});
}
Alternatively, if we want to be more precise about detecting orphaned split children:
function getChildTransactions(transactions: OnyxCollection<Transaction>, reports: OnyxCollection<Report>, originalTransactionID: string | undefined) {
return Object.values(transactions ?? {}).filter((currentTransaction) => {
const currentReport = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${currentTransaction?.reportID}`];
+ const isSplitChild = currentTransaction?.comment?.originalTransactionID === originalTransactionID;+ // For split children, we should include them even if their report was deleted+ // This is because the split relationship is defined by originalTransactionID, not the report
return (
- currentTransaction?.comment?.originalTransactionID === originalTransactionID &&- !!currentReport &&+ isSplitChild &&+ (!!currentReport || currentTransaction?.comment?.source === CONST.IOU.TYPE.SPLIT) &&
currentTransaction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE
);
});
}
This ensures that all split children are found, preventing incorrect isReverseSplitOperation determination.
changed the title [-]Expense - Split status is removed after editing split, error after editing second split[/-][+][$250] Expense - Split status is removed after editing split, error after editing second split[/+]on Jan 6, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-07 05:06:31 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After editing a split expense, reopening another split sometimes opens the Amount screen instead of Edit Splits, or throws the error: “specified transaction is not one of the split transactions.”
This happens because the child transaction loses its split identity, causing follow-up edits to fail.
What is the root cause of that problem?
Split identity is stored in two places:
SPLIT_TRANSACTION_DRAFT for in-progress edits.
Transaction comment fields:comment.originalTransactionID and comment.source = 'split'.
updateSplitTransactions relies on the backend response, but the success payload can omit these comment fields. When Onyx merges the success data, it overwrites the child transaction without re-applying the split metadata.
Result: the app no longer recognizes the transaction as a split child, causing subsequent validation failures and incorrect navigation.
What changes do you think we should make in order to solve the problem?
Treat split identity as client-owned:
Maintain split state in SPLIT_TRANSACTION_DRAFT and the persisted transaction comment fields (comment.originalTransactionID and comment.source) on the child transaction.
Add a server-success merge guard:
After a successful API response, explicitly re-apply the split metadata to the child transaction if the backend omits it.
Ensures originalTransactionID + source: 'split' are always present during the optimistic → success merge cycle.
Code Snippet :
successData.push(
...(onyxData.successData??[]),
...(updateMoneyRequestParamsOnyxData.successData??[]),{// Preserve split metadata even if the server response omits itonyxMethod: Onyx.METHOD.MERGE,key: `${ONYXKEYS.COLLECTION.TRANSACTION}${existingTransactionID}`,value: {comment: {
...(splitTransaction?.comment??{}),
originalTransactionID,source: CONST.IOU.TYPE.SPLIT,},},},);
This ensures the child transaction keeps its split identity regardless of the backend response.
What alternative solutions did you explore? (Optional)
Re-deriving split state from report actions was considered but rejected because it is fragile and indirect, and would not reliably maintain split identity across optimistic/success cycles.
Correctly identifies the issue in getChildTransactions (TransactionUtils/index.ts : 2419-2432):
// PROBLEM: !!currentReport requires report to existreturn(currentTransaction?.comment?.originalTransactionID===originalTransactionID&&!!currentReport&&// ← Filters out valid split children when report is deletedcurrentTransaction?.pendingAction!==CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE);
Root Cause Analysis: ⭐⭐ (2/5)
Claims the issue is server response omitting split metadata during Onyx merge:
"The success payload can omit these comment fields. When Onyx merges the success data, it overwrites the child transaction without re-applying the split metadata."
This is incorrect. The actual problem is that isReverseSplitOperation is incorrectly set to true before any API call is made, causing the wrong API command (REVERT_SPLIT_TRANSACTION) to be sent.
@MobileMage's proposal looks good to me. RCA is correct and solution fixes both issues (see review breakdown here).
Rationale:
Accurate diagnosis — Correctly identifies that getChildTransactions excludes valid split children when their report is deleted.
Correct fix location — Modifies the data query function so all dependent code paths automatically work correctly.
Both bugs fixed — BUG 2 is a downstream effect of the same root cause; fixing child transaction discovery prevents the incorrect REVERT_SPLIT_TRANSACTION call.
Consistent with codebase — Uses the existing comment.source === CONST.IOU.TYPE.SPLIT pattern already present in isExpenseSplit().
No side effects — Maintains server/client state consistency.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.5-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ikevin127@JmillsExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: N/A - Mistake during implementation
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Jan 6, 2026
Triggered auto assignment to @JmillsExpensify (
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.MobileMage commentedon Jan 6, 2026
Please re-state the problem that we are trying to solve in this issue.
Two bugs:
What is the root cause of that problem?
The root cause is in
getChildTransactionsinsrc/libs/TransactionUtils/index.ts:2367-2375:The function requires
!!currentReport- the transaction's report must exist. When a report is deleted, child transactions that still reference the deleted report cannot be found.In
updateSplitTransactions(src/libs/actions/IOU/index.ts:14393):Since only 1 child was found,
isReverseSplitOperation = true, triggering a "revert to single expense" operation.When
isReverseSplitOperationis true (lines 14497-14513), thetransactionParamsis overwritten withoutoriginalTransactionIDandsource:This clears the split relationship, causing BUG 1.
BUG 2 occurs because:
REVERT_SPLIT_TRANSACTIONAPI callWhat changes do you think we should make in order to solve the problem?
Fix
getChildTransactionsto not require the report to exist when the transaction is part of a deleted report:src/libs/TransactionUtils/index.ts:function getChildTransactions(transactions: OnyxCollection<Transaction>, reports: OnyxCollection<Report>, originalTransactionID: string | undefined) { return Object.values(transactions ?? {}).filter((currentTransaction) => { const currentReport = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${currentTransaction?.reportID}`]; + // Include transactions even if their report was deleted, as long as they have the originalTransactionID + // This prevents incorrect isReverseSplitOperation when some split children have deleted reports + const hasValidReportOrDeletedReport = !!currentReport || !currentTransaction?.reportID; return ( currentTransaction?.comment?.originalTransactionID === originalTransactionID && - !!currentReport && + hasValidReportOrDeletedReport && currentTransaction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ); }); }Alternatively, if we want to be more precise about detecting orphaned split children:
function getChildTransactions(transactions: OnyxCollection<Transaction>, reports: OnyxCollection<Report>, originalTransactionID: string | undefined) { return Object.values(transactions ?? {}).filter((currentTransaction) => { const currentReport = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${currentTransaction?.reportID}`]; + const isSplitChild = currentTransaction?.comment?.originalTransactionID === originalTransactionID; + // For split children, we should include them even if their report was deleted + // This is because the split relationship is defined by originalTransactionID, not the report return ( - currentTransaction?.comment?.originalTransactionID === originalTransactionID && - !!currentReport && + isSplitChild && + (!!currentReport || currentTransaction?.comment?.source === CONST.IOU.TYPE.SPLIT) && currentTransaction?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ); }); }This ensures that all split children are found, preventing incorrect
isReverseSplitOperationdetermination.What alternative solutions did you explore?
N/A
[-]Expense - Split status is removed after editing split, error after editing second split[/-][+][$250] Expense - Split status is removed after editing split, error after editing second split[/+]melvin-bot commentedon Jan 6, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022008645763042389985
melvin-bot commentedon Jan 6, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)twinkle-react commentedon Jan 7, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-07 05:06:31 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After editing a split expense, reopening another split sometimes opens the Amount screen instead of Edit Splits, or throws the error: “specified transaction is not one of the split transactions.”
This happens because the child transaction loses its split identity, causing follow-up edits to fail.
What is the root cause of that problem?
Split identity is stored in two places:
comment.originalTransactionIDandcomment.source = 'split'.updateSplitTransactionsrelies on the backend response, but the success payload can omit these comment fields. When Onyx merges the success data, it overwrites the child transaction without re-applying the split metadata.Result: the app no longer recognizes the transaction as a split child, causing subsequent validation failures and incorrect navigation.
What changes do you think we should make in order to solve the problem?
Treat split identity as client-owned:
Maintain split state in
SPLIT_TRANSACTION_DRAFTand the persisted transaction comment fields (comment.originalTransactionIDandcomment.source) on the child transaction.Add a server-success merge guard:
originalTransactionID+source: 'split'are always present during the optimistic → success merge cycle.Code Snippet :
This ensures the child transaction keeps its split identity regardless of the backend response.
What alternative solutions did you explore? (Optional)
ikevin127 commentedon Jan 7, 2026
🎉 Thanks everyone for the proposals!
@MobileMage's proposal review:
Root Cause Analysis: ⭐⭐⭐⭐⭐ (5/5)
Correctly identifies the issue in
getChildTransactions(TransactionUtils/index.ts: 2419-2432):Logic chain explained:
currentReportisundefined.!!currentReport=false→ valid split child excluded.originalChildTransactions.lengthreturns incorrect count.isReverseSplitOperationincorrectly becomestrue.REVERT_SPLIT_TRANSACTIONAPI called → clears split metadata.Proposed Solution: ⭐⭐⭐⭐⭐ (5/5)
Strengths:
isExpenseSplitpattern)@twinkle-react's proposal review:
Root Cause Analysis: ⭐⭐ (2/5)
Claims the issue is server response omitting split metadata during Onyx merge:
This is incorrect. The actual problem is that
isReverseSplitOperationis incorrectly set totruebefore any API call is made, causing the wrong API command (REVERT_SPLIT_TRANSACTION) to be sent.Proposed Solution: ⭐⭐ (2/5)
Weaknesses:
REVERT_SPLIT_TRANSACTION)Comparison Matrix
ikevin127 commentedon Jan 7, 2026
@MobileMage's proposal looks good to me. RCA is correct and solution fixes both issues (see review breakdown here).
Rationale:
getChildTransactionsexcludes valid split children when their report is deleted.REVERT_SPLIT_TRANSACTIONcall.isExpenseSplit().🎀👀🎀 C+ reviewed
19 remaining items
melvin-bot commentedon Jan 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.5-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-01-28. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 21, 2026
@ikevin127 @JmillsExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
ikevin127 commentedon Jan 28, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: N/A - Mistake during implementation
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Do we agree 👍 or 👎.
ikevin127 commentedon Jan 28, 2026
@JmillsExpensify Ready for payment summary 🙌
ikevin127 commentedon Jan 30, 2026
@JmillsExpensify Friendly bump 🙏
ikevin127 commentedon Feb 2, 2026
@JmillsExpensify Friendly bump 2
JmillsExpensify commentedon Feb 2, 2026
Payment summary:
-Reviewer: @ikevin127 $250 via New Expensify
garrettmknight commentedon Feb 2, 2026
$250 approved for @ikevin127
JmillsExpensify commentedon Feb 2, 2026
Regression test created and contributor paid via Upwork.