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
[Awaiting payment 2026-02-18][$125] Expense - Blank distance field is shown when submitting expense with zero distance #80060
Version Number: 9.3.5-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#79917 Email or phone of affected tester (no customers):applausetester+bm1040@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Web, android App Component: Money Requests
Action Performed:
Precondition -
use expensifail account
Go to staging.new.expensify.com
Go to self DM.
Click +.> Track distance > Manual.
Enter 0 > Next.
Click Create expense.
Go to Account > Troubleshoot > Clear cache and restart > Reset and refresh.
Go back to self DM.
Click Submit it to someone.
Select workspace chat.
On confirm page, click Rate and select workspace rate.
Click Create expense.
Open the distance expense.
Expected Result:
The distance field should show 0.00 miles
Actual Result:
The distance field is empty instead of showing 0.00 miles.
👋 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: #79917 - "Use existing functions to check if request is distance" by @Gonals (High confidence) Related Issues: #79719 (issue that PR #79917 was fixing)
Recommendation: ROLL FORWARD
PR #79917 successfully fixed issue #79719 (showing Distance/Rate fields instead of Merchant field when distance is 0), but exposed a pre-existing bug in the DistanceRequestUtils.getDistanceForDisplay() function. A simple fix to handle zero distance values correctly is needed, rather than reverting the PR which would reintroduce the original bug.
Labels: Keeping DeployBlockerCash (this is a frontend bug requiring an App fix)
📋 Detailed Analysis
Evidence
PR #79917 changed how isDistanceRequest and isManualDistanceRequest are determined in src/libs/actions/IOU/index.ts. Instead of inline checks, it now uses utility functions from TransactionUtils:
This change correctly identifies distance requests with zero distance, which causes the Distance/Rate fields to be displayed (fixing #79719). However, it exposed a bug that was already present in the codebase.
Verification
The bug is in /home/runner/work/App/App/src/libs/DistanceRequestUtils.ts at lines 185-186:
functiongetDistanceForDisplay(...){if(!hasRoute||!unit){returntranslate(\"iou.fieldPending\");}if(!distanceInMeters){// ← BUG: This returns empty string when distance is 0return \"\";
}constdistanceInUnits=getRoundedDistanceInUnits(distanceInMeters,unit);// ... rest of function}
When distanceInMeters is 0, the condition !distanceInMeters evaluates to true, causing the function to return an empty string instead of formatting and displaying "0.00 miles" (or km).
Root Cause
The issue is that the code uses a truthy check (!distanceInMeters) instead of explicitly checking for null or undefined. In JavaScript, 0 is falsy, so the condition incorrectly treats zero distance as "no distance".
changed the title [-][$125] Expense - Blank distance field is shown when submitting expense with zero distance[/-][+][Awaiting payment 2026-02-18][$125] Expense - Blank distance field is shown when submitting expense with zero distance[/+]on Feb 11, 2026
Activity
melvin-bot commentedon Jan 21, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #79917
melvin-bot commentedon Jan 21, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Jan 21, 2026
Triggered auto assignment to @laurenreidexpensify (
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.github-actions commentedon Jan 21, 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 Jan 21, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #79917 - "Use existing functions to check if request is distance" by @Gonals (High confidence)
Related Issues: #79719 (issue that PR #79917 was fixing)
Recommendation: ROLL FORWARD
PR #79917 successfully fixed issue #79719 (showing Distance/Rate fields instead of Merchant field when distance is 0), but exposed a pre-existing bug in the
DistanceRequestUtils.getDistanceForDisplay()function. A simple fix to handle zero distance values correctly is needed, rather than reverting the PR which would reintroduce the original bug.Labels: Keeping
DeployBlockerCash(this is a frontend bug requiring an App fix)📋 Detailed Analysis
Evidence
PR #79917 changed how
isDistanceRequestandisManualDistanceRequestare determined insrc/libs/actions/IOU/index.ts. Instead of inline checks, it now uses utility functions fromTransactionUtils:This change correctly identifies distance requests with zero distance, which causes the Distance/Rate fields to be displayed (fixing #79719). However, it exposed a bug that was already present in the codebase.
Verification
The bug is in
/home/runner/work/App/App/src/libs/DistanceRequestUtils.tsat lines 185-186:When
distanceInMetersis0, the condition!distanceInMetersevaluates totrue, causing the function to return an empty string instead of formatting and displaying "0.00 miles" (or km).Root Cause
The issue is that the code uses a truthy check (
!distanceInMeters) instead of explicitly checking fornullorundefined. In JavaScript,0is falsy, so the condition incorrectly treats zero distance as "no distance".Fix needed: Change line 185 to:
Or more simply:
This will allow zero distances to be displayed correctly while still returning empty string for truly missing values.
36 remaining items
[-][$125] Expense - Blank distance field is shown when submitting expense with zero distance[/-][+][Awaiting payment 2026-02-18][$125] Expense - Blank distance field is shown when submitting expense with zero distance[/+]laurenreidexpensify commentedon Feb 13, 2026
note to self: everyone is paid via ND
mallenexpensify commentedon Feb 18, 2026
Payment Summary
(specifically for @dominictb since they moved to BE team)
Contributor+: @dominictb due $75 via NewDot
laurenreidexpensify commentedon Feb 20, 2026
Payment Summary
twisterdotcom commentedon Feb 23, 2026
@dominictb has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-0b81-a750-a6df-325626f8eb34dominictb commentedon Feb 24, 2026
@twisterdotcom That's right. The amount should be $75. My mistake.
trjExpensify commentedon Feb 25, 2026
approved $125 for @nyomanjyotisa.
garrettmknight commentedon Feb 25, 2026
$125 approved for @hoangzinh