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 2025-11-26] [$250] Expense - Revisiting create expense page from confirm details page changes the selected user #72593
Version Number: 9.2.30-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Pre-condition: Have 2 workspaces
Launch app
Tap fab - create expense
Enter an amount
Tap next
Tap To field and select another workspace
Tap app back button
Now note the To field
Expected Result:
Revisiting create expense page from confirm details page musnt change the selected user
Actual Result:
Revisiting create expense page from confirm details page changes the selected user
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6974660_1760456928829.Screenrecorder-2025-10-14-21-12-06-251.mp4
changed the title [-]Expense - Revisiting create expense page from confirm details page changes the selected user[/-][+][$250] Expense - Revisiting create expense page from confirm details page changes the selected user[/+]on Oct 14, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-10-14 18:17:18 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user starts an expense in one workspace, switches the “To” field to a different workspace on the confirmation screen, and then goes back to the amount step to adjust the total, the confirmation screen does not show the earlier workspace selection.
What is the root cause of that problem?
The amount step always reapplies the default participants picked from the source report once the user leaves the screen. Even when participants already exist in the draft transaction, the code calls setMoneyRequestParticipantsFromReport, which overwrites the manually chosen workspace.
// Edits to the amount from the splits page should reset the split shares.
if(transaction?.splitShares){
resetSplitShares(transaction,newAmount,currency);
}
if(!isEditing){
navigateToNextPage({amount, paymentMethod});
return;
What changes do you think we should make in order to solve the problem?
Track whether the draft transaction already has participants, and skip the auto-assignment path in that case. Reuse the existing participant list (and their reportID) when navigating forward so that the confirmation page keeps the workspace the user selected.
Please re-state the problem that we are trying to solve in this issue.
When creating an expense from the FAB, if a user enters an amount, proceeds to select a different workspace in the "To" field, and then taps the back button to return to the amount page, the "To" field reverts to the default workspace instead of preserving the user's selection.
What is the root cause of that problem?
In IOURequestStepAmount.tsx, when the user navigates forward by tapping "Next", the navigateToNextPage function always calls setMoneyRequestParticipantsFromReport() to set the transaction participants based on the default workspace policy. This happens regardless of whether the user has already manually selected different participants through the participant selection flow.
When navigating back from the confirmation page and tapping "Next" again, this code re-executes and overwrites the user's manual selection with the default workspace participants:
What changes do you think we should make in order to solve the problem?
Before calling setMoneyRequestParticipantsFromReport(), check if participants already exist in the transaction and whether they differ from the default workspace. If they do, preserve the user's selection instead of overwriting it:
constactivePolicyExpenseChat=getPolicyExpenseChat(currentUserPersonalDetails.accountID,defaultExpensePolicy?.id);constshouldAutoReport=!!defaultExpensePolicy?.autoReporting||!!personalPolicy?.autoReporting;consttransactionReportID=shouldAutoReport ? activePolicyExpenseChat?.reportID : CONST.REPORT.UNREPORTED_REPORT_ID;// Keep manually selected participants if different from default workspaceconsthasExistingParticipants=transaction?.participants&&transaction.participants.length>0;constexistingParticipantReportID=transaction?.participants?.at(0)?.reportID;constshouldKeepExistingParticipants=hasExistingParticipants&&existingParticipantReportID!==activePolicyExpenseChat?.reportID;if(shouldKeepExistingParticipants){// Navigate with existing participants, using Promise to ensure form state is savedPromise.resolve().then(()=>{Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(CONST.IOU.ACTION.CREATE,iouType===CONST.IOU.TYPE.CREATE ? CONST.IOU.TYPE.SUBMIT : iouType,transactionID,existingParticipantReportID,),);});}else{// Set default workspace participantssetTransactionReport(transactionID,{reportID: transactionReportID},true);setMoneyRequestParticipantsFromReport(transactionID,activePolicyExpenseChat).then(()=>{Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.getRoute(CONST.IOU.ACTION.CREATE,iouType===CONST.IOU.TYPE.CREATE ? CONST.IOU.TYPE.SUBMIT : iouType,transactionID,activePolicyExpenseChat?.reportID,),);});}
The Promise.resolve().then() in the if branch ensures consistent async timing with the else branch, allowing the form state to be properly saved before navigation occurs.
Note: Similar patterns may exist in other request step files and should be reviewed for the same issue
What alternative solutions did you explore? (Optional)
⚠️@ganzz4 Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.60-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@QichenZhu 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:
[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:
[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.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
[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: I can't find an offending PR. It seems this case was not considered.
[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
Precondition:
Have 2 workspaces.
Test:
Launch the app.
Tap FAB - Create expense - Manual.
Enter an amount.
Tap Next.
Tap the To field and select a workspace other than the default workspace.
Tap the back arrow.
Verify the To field is the workspace you selected in step 5.
Activity
melvin-bot commentedon Oct 14, 2025
Triggered auto assignment to @clarajones-expensify (
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.[-]Expense - Revisiting create expense page from confirm details page changes the selected user[/-][+][$250] Expense - Revisiting create expense page from confirm details page changes the selected user[/+]melvin-bot commentedon Oct 14, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021978133655415606832
melvin-bot commentedon Oct 14, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @QichenZhu (
External)ShridharGoel commentedon Oct 14, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-10-14 18:17:18 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user starts an expense in one workspace, switches the “To” field to a different workspace on the confirmation screen, and then goes back to the amount step to adjust the total, the confirmation screen does not show the earlier workspace selection.
What is the root cause of that problem?
The amount step always reapplies the default participants picked from the source report once the user leaves the screen. Even when participants already exist in the draft transaction, the code calls
setMoneyRequestParticipantsFromReport, which overwrites the manually chosen workspace.App/src/pages/iou/request/step/IOURequestStepAmount.tsx
Lines 236 to 301 in d90c0fc
What changes do you think we should make in order to solve the problem?
Track whether the draft transaction already has participants, and skip the auto-assignment path in that case. Reuse the existing participant list (and their
reportID) when navigating forward so that the confirmation page keeps the workspace the user selected.QichenZhu commentedon Oct 17, 2025
@ShridharGoel, thanks for your proposal, but it causes a regression: the amount resets to 0 the second time navigating back.
Screen.Recording.2025-10-17.at.11.42.13.PM.mov
ganzz4 commentedon Oct 19, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When creating an expense from the FAB, if a user enters an amount, proceeds to select a different workspace in the "To" field, and then taps the back button to return to the amount page, the "To" field reverts to the default workspace instead of preserving the user's selection.
What is the root cause of that problem?
In
IOURequestStepAmount.tsx, when the user navigates forward by tapping "Next", thenavigateToNextPagefunction always callssetMoneyRequestParticipantsFromReport()to set the transaction participants based on the default workspace policy. This happens regardless of whether the user has already manually selected different participants through the participant selection flow.When navigating back from the confirmation page and tapping "Next" again, this code re-executes and overwrites the user's manual selection with the default workspace participants:
App/src/pages/iou/request/step/IOURequestStepAmount.tsx
Lines 262 to 283 in 7165a14
What changes do you think we should make in order to solve the problem?
Before calling
setMoneyRequestParticipantsFromReport(), check if participants already exist in the transaction and whether they differ from the default workspace. If they do, preserve the user's selection instead of overwriting it:App/src/pages/iou/request/step/IOURequestStepAmount.tsx
Lines 270 to 283 in 7165a14
The
Promise.resolve().then()in the if branch ensures consistent async timing with the else branch, allowing the form state to be properly saved before navigation occurs.Note: Similar patterns may exist in other request step files and should be reviewed for the same issue
What alternative solutions did you explore? (Optional)
Result:
fix.mp4
github-actions commentedon Oct 19, 2025
49 remaining items
melvin-bot commentedon Nov 19, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Nov 19, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.60-2 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 2025-11-26. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 19, 2025
@QichenZhu 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]
clarajones-expensify commentedon Nov 19, 2025
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:
[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:
[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.
Regression Test Proposal Template
[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
Precondition:
Test:
Do we agree 👍 or 👎
clarajones-expensify commentedon Nov 19, 2025
Hi @QichenZhu ! would you fill out the above checklist when you can? thank you!
QichenZhu commentedon Nov 26, 2025
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: I can't find an offending PR. It seems this case was not considered.
[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
Precondition:
Test:
Do we agree 👍 or 👎
clarajones-expensify commentedon Nov 26, 2025
Payment Summary
Contributor: @ganzz4 paid $250 via Upwork
Contributor+: @QichenZhu paid $250 via Upwork
QichenZhu commentedon Nov 26, 2025
Thanks @clarajones-expensify! Accepted the offer.
melvin-bot commentedon Nov 28, 2025
@nkuoch Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Dec 1, 2025
@nkuoch Eep! 4 days overdue now. Issues have feelings too...