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-12-30] [$250] Reports - After created new expense, tapping back button returns to confirm detail page #76657
Version Number: 9.2.71-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:
Open app
Navigate to any workspace chat create a manual expense
Go to Reports tab
At filter type expense, tap on this expense
On composer box tap + button
Select Create expense and complete create a manual expense
Tap back button on the header
Expected Result:
Tapping back button on the header should return to Reports page
Actual Result:
Tapping back button on the header returns to confirm detail page
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 evidenceBug7019819_1764784514045.Cmjt8899_1_.mp4
Please re-state the problem that we are trying to solve in this issue.
When a user navigates to the Reports tab, filters expenses (e.g., by type "expense"), taps on a filtered expense to open the workspace chat, creates a manual expense via the + button in the composer, and then taps the back button on the header after completing the expense creation, they are incorrectly returned to the confirmation/detail page instead of being returned to the Reports page where they started.
What is the root cause of that problem?
The root cause consists of two issues:
Missing backToReport parameter in expense creation flow: When the user taps the + button in the workspace chat composer to create an expense, the startMoneyRequest function is called without passing a backToReport parameter that indicates the user came from the Reports page. This means the navigation system doesn't know where the user originated from.
Incorrect navigation priority in navigateBack function: In IOURequestStepConfirmation.tsx, the navigateBack function checks for the backTo parameter first and immediately navigates to it. However, when creating an expense from a workspace chat that was accessed via the Reports page, we should prioritize the backToReport parameter instead, which specifically handles returning to the originating report/search view.
What changes do you think we should make in order to solve the problem?
Modify the navigateBack function to check for backToReport before backTo when creating a SUBMIT-type expense:
constnavigateBack=useCallback(()=>{// If backToReport is provided and we're creating an expense from a workspace chat,// navigate back to that report instead of following the backTo parameterif(backToReport&&iouType===CONST.IOU.TYPE.SUBMIT){Navigation.goBack(backToReport);return;}if(backTo){Navigation.goBack(backTo);return;}// ... rest of existing logic},[// ... existing dependenciesbackToReport,// Add to dependency array]);
changed the title [-]Reports - After created new expense, tapping back button returns to confirm detail page[/-][+][$250] Reports - After created new expense, tapping back button returns to confirm detail page[/+]on Dec 9, 2025
changed the title [-][$250] Reports - After created new expense, tapping back button returns to confirm detail page[/-][+][Due for payment 2025-12-30] [$250] Reports - After created new expense, tapping back button returns to confirm detail page[/+]on Dec 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.85-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@huult@strepanier03 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] 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.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Dec 3, 2025
Triggered auto assignment to @strepanier03 (
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.SAYAN02-DEV commentedon Dec 3, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user navigates to the Reports tab, filters expenses (e.g., by type "expense"), taps on a filtered expense to open the workspace chat, creates a manual expense via the + button in the composer, and then taps the back button on the header after completing the expense creation, they are incorrectly returned to the confirmation/detail page instead of being returned to the Reports page where they started.
What is the root cause of that problem?
The root cause consists of two issues:
Missing
backToReportparameter in expense creation flow: When the user taps the + button in the workspace chat composer to create an expense, thestartMoneyRequestfunction is called without passing abackToReportparameter that indicates the user came from the Reports page. This means the navigation system doesn't know where the user originated from.Incorrect navigation priority in
navigateBackfunction: InIOURequestStepConfirmation.tsx, thenavigateBackfunction checks for thebackToparameter first and immediately navigates to it. However, when creating an expense from a workspace chat that was accessed via the Reports page, we should prioritize thebackToReportparameter instead, which specifically handles returning to the originating report/search view.What changes do you think we should make in order to solve the problem?
Change 1: Update
IOURequestStepConfirmation.tsx(lines ~392-393)Modify the
navigateBackfunction to check forbackToReportbeforebackTowhen creating a SUBMIT-type expense:Change 2: Update
AttachmentPickerWithMenuItems.tsx(lines ~195-226)Modify the
moneyRequestOptionsuseMemo to detect if the user is coming from the Reports/Search page and pass that route as thebackToReportparameter:What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore?
[-]Reports - After created new expense, tapping back button returns to confirm detail page[/-][+][$250] Reports - After created new expense, tapping back button returns to confirm detail page[/+]melvin-bot commentedon Dec 9, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021998211233986731501
melvin-bot commentedon Dec 9, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @huult (
External)strepanier03 commentedon Dec 9, 2025
Able to repro on Pixel 8 Android App, moving forward.
SAYAN02-DEV commentedon Dec 9, 2025
@strepanier03 will my proposal be reviewed?
24 remaining items
mountiny commentedon Dec 19, 2025
Merged
[-][$250] Reports - After created new expense, tapping back button returns to confirm detail page[/-][+][Due for payment 2025-12-30] [$250] Reports - After created new expense, tapping back button returns to confirm detail page[/+]melvin-bot commentedon Dec 23, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Dec 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.85-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 2025-12-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Dec 23, 2025
@huult @strepanier03 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]
huult commentedon Dec 29, 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: https://github.com/Expensify/App/pull/69875/changes#r2650233831
[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.
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: https://github.com/Expensify/Expensify/issues/582963
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-1cd6-a52e-3299-17ffa758d614strepanier03 commentedon Dec 30, 2025
Payment Summary
For: #77964