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
[Payment due 2025-12-10] [$250] Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers #75154
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Version Number: 9.2.58-2 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@brianlee-expensify Slack conversation (hyperlinked to channel name): #Expensify bugs
Action Performed:
Open a workspace where Distance preference = Kilometers
Start the Track Distance Entry creation flow from global create
Observe the default unit shown
Expected Result:
The distance unit should default to Kilometers, matching the workspace’s configured preference.
Actual Result:
The flow defaults to Miles, ignoring the workspace’s Kilometer setting.
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 evidenceRecording.1918.mp42025-11-13_14-42-45.mp4
Please re-state the problem that we are trying to solve in this issue.
When a workspace is configured to prefer kilometers, creating a Track Distance expense from the global create menu still defaults the flow to miles.
What is the root cause of that problem?
The create flow only stores the selected distance rate ID with setCustomUnitRateID, which does not pull the full policy rate details or update the transaction's distanceUnit. As a result, the draft keeps the peer-to-peer fallback rate (mi) even when a workspace policy exists. This happens both when the flow auto-selects the workspace chat after tapping Track Distance and when participants are chosen later in the flow.
What changes do you think we should make in order to solve the problem?
Use the existing setMoneyRequestDistanceRate helper everywhere we select a rate so the rate ID, unit, and converted distance stay aligned with the chosen workspace policy.
Distance (map + manual) tabs when chaining into a workspace:
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Manual Distance Entry defaults to Miles despite workspace preference set to Kilometers[/-][+]Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/+]on Nov 18, 2025
changed the title [-]Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/-][+][$250] Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/+]on Nov 25, 2025
[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.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
changed the title [-][$250] Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/-][+][Payment due 2025-12-10] [$250] Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/+]on Dec 12, 2025
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Activity
melvin-bot commentedon Nov 14, 2025
Triggered auto assignment to @greg-schroeder (
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.ShridharGoel commentedon Nov 14, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a workspace is configured to prefer kilometers, creating a Track Distance expense from the global create menu still defaults the flow to miles.
What is the root cause of that problem?
The create flow only stores the selected distance rate ID with
setCustomUnitRateID, which does not pull the full policy rate details or update the transaction'sdistanceUnit. As a result, the draft keeps the peer-to-peer fallback rate (mi) even when a workspace policy exists. This happens both when the flow auto-selects the workspace chat after tapping Track Distance and when participants are chosen later in the flow.Distance tab auto-selection uses
setCustomUnitRateID:App/src/pages/iou/request/step/IOURequestStepDistance.tsx
Lines 393 to 405 in a3ddfe7
Participant step also uses only the rate ID:
App/src/pages/iou/request/step/IOURequestStepParticipants.tsx
Lines 215 to 248 in a3ddfe7
The confirmation list defaults the rate ID without syncing the unit:
App/src/components/MoneyRequestConfirmationList.tsx
Lines 311 to 327 in a3ddfe7
What changes do you think we should make in order to solve the problem?
Use the existing
setMoneyRequestDistanceRatehelper everywhere we select a rate so the rate ID, unit, and converted distance stay aligned with the chosen workspace policy.This ensures the transaction draft immediately stores the workspace’s rate and unit along with any necessary distance conversion.
We still fall back to
setCustomUnitRateIDfor non-policy chats, but policy selections now hydrate the rate via the helper.Eskalifer1 commentedon Nov 14, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Manual Distance Entry defaults to Miles despite workspace preference set to Kilometers
What is the root cause of that problem?
We always select unit based on current reportID here:
App/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx
Line 82 in 41e4e50
App/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx
Line 96 in 41e4e50
But when user starts flow creation fron the FAB we doesn’t have report, that means we doesnt have a policy, so we are defaulting to
miWhat changes do you think we should make in order to solve the problem?
We can add a default value in the form of
defaultExpensePolicy. If the user does not have a default workspace, then rely on the default value:App/src/pages/iou/request/step/IOURequestStepDistanceManual.tsx
Line 96 in 41e4e50
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-]Manual Distance Entry defaults to Miles despite workspace preference set to Kilometers[/-][+]Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/+]brianlee-expensify commentedon Nov 25, 2025
@greg-schroeder just wanted to bump this so we can get C+ review!
[-]Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/-][+][$250] Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/+]melvin-bot commentedon Nov 25, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021993190186672235134
10 remaining items
melvin-bot commentedon Nov 25, 2025
📣 @linhvovan29546 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
nkdengineer commentedon Nov 26, 2025
@linhvovan29546 The PR is ready for review.
brianlee-expensify commentedon Dec 4, 2025
@linhvovan29546 just wanted to bump here in case this got lost on your radar!
linhvovan29546 commentedon Dec 5, 2025
The PR was deployed to production on
Dec 3, 2025.Could you please update the payment due date? I’ll complete the checklist shortly.linhvovan29546 commentedon Dec 9, 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/69372/files#r2600877815
[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.
[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/578216
Regression Test Proposal
kilometersTrack Distance Manualcreation flow from the global createkilometersDo we agree 👍 or 👎
[-][$250] Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/-][+][Payment due 2025-12-10] [$250] Manual Distance input placeholder defaults to Miles despite workspace preference set to Kilometers[/+]brianlee-expensify commentedon Dec 12, 2025
assigning to myself since Greg is already out for the weekend
updated GH title to Dec 10 payment date based on this deploy to prod
brianlee-expensify commentedon Dec 12, 2025
Payment Summary
Contributor: @linhvovan29546 paid $250 via Upwork
Contributor+: @nkdengineer due $250 via NewDot
twisterdotcom commentedon Dec 30, 2025
@nkdengineer has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-6586-a60b-89a0-ac1ce876f794