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-05-22] IOU - Distance reverts to original distance after editing it and submitting the expense from self DM #90561
Version Number: 9.3.73-4 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#89858 Email or phone of affected tester (no customers):sdsdjoijdoisnjodis@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to self DM.
Create a distance expense.
Open the expense.
Click Distance.
Go to Manual tab.
Edit the distance and save it.
Click on the header > Submit it to someone.
Select workspace chat.
On confirm page, click Rate field.
Select any rate.
Click Create expense.
Open the created expense in workspace chat.
Click Distance.
Expected Result:
Distance will not revert to the original distance after editing it and submitting the expense from self DM.
Actual Result:
Distance reverts to the original distance after editing it and submitting the expense from self DM.
👋 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.
Classification: Frontend bug Causing PR: #89858 - "fixed manual distance tab blockers" by @mukhrr (High confidence) Related Issues: #83781
Recommendation: REVERT
PR #89858 introduced a change to useExpenseSubmission.ts intended to preserve manually-edited distances when submitting a map-based expense from self DM. However, the regression tests linked in the PR body (#89847) describe the exact same scenario as this deploy blocker — distance should persist after submitting from self DM — which means the fix did not work as expected and the bug is still present despite the PR being merged.
Assigned: @mukhrr (PR author), @aimane-chnaif and @youssef-lr (approving reviewers) Labels: DeployBlockerCash kept (frontend App PR is the cause). No label changes made.
Detailed Analysis
Evidence
The issue body explicitly references PR fixed manual distance tab blockers #89858 as the test source (https://github.com/Expensify/App/pull/89858) and melvin-bot confirmed this assignment.
The PR modifies src/pages/iou/request/step/confirmation/useExpenseSubmission.ts lines 313-326: it changed the distance field check from isManualDistanceRequest to isDistanceRequestTransactionUtils(item) to also cover map-based expenses. The intent was that convertTrackedExpenseToRequest on the backend receives the user's edited quantity. If the quantity is not correctly stored in item.comment.customUnit.quantity for the draft/optimistic transaction at submission time, the distance is dropped.
The issue is reproducible on staging only (not production), which is consistent with this being a new-feature regression introduced by a staging-only PR.
Verification
Affected files in the bug: src/pages/iou/request/step/confirmation/useExpenseSubmission.ts, src/libs/actions/IOU/UpdateMoneyRequest.ts, src/libs/TransactionUtils/index.ts
The PR merge date is 2026-05-07, which aligns with when this staging version (9.3.73-4) would have picked it up.
Root Cause
When a distance expense is created in self DM using the Manual tab, the user edits comment.customUnit.quantity directly. When "Submit it to someone" is triggered, useExpenseSubmission iterates over items and passes a distance parameter to convertTrackedExpenseToRequest. PR #89858 broadened the check from isManualDistanceRequest to any isDistanceRequest to cover this path. However, in the "submit from self DM" flow, the item being iterated may be a draft/optimistic transaction whose comment.customUnit.quantity is not yet populated with the edited value (or has been reset by the waypoints branch in getUpdatedTransaction), causing the backend to fall back to recomputing distance from waypoints and discarding the manual edit.
changed the title [-]IOU - Distance reverts to original distance after editing it and submitting the expense from self DM[/-][+][Due for payment 2026-05-22] IOU - Distance reverts to original distance after editing it and submitting the expense from self DM[/+]on May 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.74-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@aimane-chnaif 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]
Activity
melvin-bot commentedon May 13, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #89858
melvin-bot commentedon May 13, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 13, 2026
👋 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:
OSBotify commentedon May 13, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #89858 - "fixed manual distance tab blockers" by @mukhrr (High confidence)
Related Issues: #83781
Recommendation: REVERT
PR #89858 introduced a change to
useExpenseSubmission.tsintended to preserve manually-edited distances when submitting a map-based expense from self DM. However, the regression tests linked in the PR body (#89847) describe the exact same scenario as this deploy blocker — distance should persist after submitting from self DM — which means the fix did not work as expected and the bug is still present despite the PR being merged.Assigned: @mukhrr (PR author), @aimane-chnaif and @youssef-lr (approving reviewers)
Labels:
DeployBlockerCashkept (frontend App PR is the cause). No label changes made.Detailed Analysis
Evidence
https://github.com/Expensify/App/pull/89858) and melvin-bot confirmed this assignment.src/pages/iou/request/step/confirmation/useExpenseSubmission.tslines 313-326: it changed thedistancefield check fromisManualDistanceRequesttoisDistanceRequestTransactionUtils(item)to also cover map-based expenses. The intent was thatconvertTrackedExpenseToRequeston the backend receives the user's edited quantity. If the quantity is not correctly stored initem.comment.customUnit.quantityfor the draft/optimistic transaction at submission time, the distance is dropped.Verification
src/pages/iou/request/step/confirmation/useExpenseSubmission.ts,src/libs/actions/IOU/UpdateMoneyRequest.ts,src/libs/TransactionUtils/index.tsgh pr view 89858 --json files.Root Cause
When a distance expense is created in self DM using the Manual tab, the user edits
comment.customUnit.quantitydirectly. When "Submit it to someone" is triggered,useExpenseSubmissioniterates over items and passes adistanceparameter toconvertTrackedExpenseToRequest. PR #89858 broadened the check fromisManualDistanceRequestto anyisDistanceRequestto cover this path. However, in the "submit from self DM" flow, theitembeing iterated may be a draft/optimistic transaction whosecomment.customUnit.quantityis not yet populated with the edited value (or has been reset by the waypoints branch ingetUpdatedTransaction), causing the backend to fall back to recomputing distance from waypoints and discarding the manual edit.6 remaining items
[-]IOU - Distance reverts to original distance after editing it and submitting the expense from self DM[/-][+][Due for payment 2026-05-22] IOU - Distance reverts to original distance after editing it and submitting the expense from self DM[/+]melvin-bot commentedon May 15, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.74-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-05-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 15, 2026
@aimane-chnaif 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]
melvin-bot commentedon May 18, 2026
@aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!
aimane-chnaif commentedon May 19, 2026
We can close this. Payment will be handled in parent issue