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-07-03] Distance - Date change system message does not appear when it involves rate change #94520
Version Number: 9.4.19-1 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:#93755 Email or phone of affected tester (no customers):applausetester+ssndjois2jd1@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Log in with Expensifail account.
Enable Distance rates.
Create the following distance rates:
Rate A: $0.70/mi, valid Jan 1 2025 - Dec 31 2025
Rate B: $0.50/mi, valid Jan 1 2026 - Dec 31 2026
Go to staging.new.expensify.com.
Go to workspace chat.
Create a distance expense with date from 2025.
Open the expense.
Click Date.
Change the date to 2026.
Expected Result:
Date change system message will appear in the expense.
Actual Result:
Date change system message does not appear in the expense when it involves rate change.
👋 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.
When a date edit also moves the expense into a different mileage rate window, PR #93755 routes the edit through updateMoneyRequestDistanceRate and bundles both changes into a single transactionChanges object (created + customUnitRateID) — see UpdateMoneyRequest.ts. The resulting modified-expense report action therefore carries oldCreated/createdandoldAmount/amount/oldMerchant/merchant.
The system message text is built by getForReportAction in ModifiedExpenseMessage.ts. Because the merchant is in distance format (contains @), it hits the early return getForDistanceRequest(...) at ModifiedExpenseMessage.ts:293-295. That early return means execution never reaches the date fragment block at ModifiedExpenseMessage.ts:329-332, so the "changed the date" part of the message is silently dropped. Only the rate/distance change is shown.
This is why the date change message appears for a plain date edit but disappears whenever the edit also triggers a rate change.
What changes do you think we should make in order to solve the problem?
In getForReportAction, when the action is a distance edit that also has a created change (oldCreated + created present), do not return early with only the distance message. Instead, build the date fragment as well and combine it with the distance/rate fragment so both changes are reflected in one system message (e.g. "changed the date to … and the rate to …").
Concretely, compute the distance-request message string and the date fragment, then merge them through the existing setFragments/changeFragments joining logic rather than returning immediately at line 294. The plain date-only and rate-only paths should remain unchanged.
What alternative solutions did you explore? (Optional)
Have getForDistanceRequest itself accept and append the date change — keeps the change localized but couples date formatting into the distance helper.
Confidence & evidence
Confidence: High. The symptom ("date change message missing only when rate also changes") is fully explained by the early return at ModifiedExpenseMessage.ts:294, which structurally bypasses the date fragment builder. The bundling of created + customUnitRateID into one transaction change was introduced by the flagged PR #93755, which is why this is a new deploy blocker. The rendering path is deterministic from the action's originalMessage, so this drops the date regardless of whether the message comes from the optimistic update or the server response.
Not yet verified at runtime / in logs — analysis is from code only.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/94520) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
[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 — not critical. This is not a regression. The distance rates feature is new. It is behind a beta and this only affects the system-message text (not a core flow), so no Slack discussion was needed.
[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.
Enable Distance rates on a workspace and create two date-bound mileage rates, e.g. Rate A: $0.70/mi valid Jan 1 2025 – Dec 31 2025, and Rate B: $0.50/mi valid Jan 1 2026 – Dec 31 2026.
Create a workspace distance expense with a date in 2025 (so it uses Rate A).
Test:
Open the workspace distance expense.
Tap Date and change the date to a day in 2026 (so the applicable rate switches to Rate B), then save.
Open the expense's chat/thread.
Verify a system message appears that reports BOTH changes — the rate change and the date change (e.g. "changed the rate to ... (previously ...), which updated the amount to ... (previously ...)" followed by "changed the date to 2026-... (previously 2025-...)").
Tap Date again and change it to another day within the same 2026 window (so the rate does NOT change), then save.
Verify the system message reports the date change ("changed the date to ... (previously ...)").
Activity
applause-bot commentedon Jun 24, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/1b1b109cfc6e57ddd57f8d857731ee8bae5d0ead8b7eaa17618c7af7341120da
melvin-bot commentedon Jun 24, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #93755
melvin-bot commentedon Jun 24, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 24, 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:
MelvinBot commentedon Jun 24, 2026
Proposal
What is the root cause of that problem?
When a date edit also moves the expense into a different mileage rate window, PR #93755 routes the edit through
updateMoneyRequestDistanceRateand bundles both changes into a singletransactionChangesobject (created+customUnitRateID) — seeUpdateMoneyRequest.ts. The resulting modified-expense report action therefore carriesoldCreated/createdandoldAmount/amount/oldMerchant/merchant.The system message text is built by
getForReportActioninModifiedExpenseMessage.ts. Because the merchant is in distance format (contains@), it hits the earlyreturn getForDistanceRequest(...)atModifiedExpenseMessage.ts:293-295. That early return means execution never reaches the date fragment block atModifiedExpenseMessage.ts:329-332, so the "changed the date" part of the message is silently dropped. Only the rate/distance change is shown.This is why the date change message appears for a plain date edit but disappears whenever the edit also triggers a rate change.
What changes do you think we should make in order to solve the problem?
In
getForReportAction, when the action is a distance edit that also has acreatedchange (oldCreated+createdpresent), do not return early with only the distance message. Instead, build the date fragment as well and combine it with the distance/rate fragment so both changes are reflected in one system message (e.g. "changed the date to … and the rate to …").Concretely, compute the distance-request message string and the date fragment, then merge them through the existing
setFragments/changeFragmentsjoining logic rather than returning immediately at line 294. The plain date-only and rate-only paths should remain unchanged.What alternative solutions did you explore? (Optional)
getForDistanceRequestitself accept and append the date change — keeps the change localized but couples date formatting into the distance helper.Confidence & evidence
Confidence: High. The symptom ("date change message missing only when rate also changes") is fully explained by the early return at
ModifiedExpenseMessage.ts:294, which structurally bypasses the date fragment builder. The bundling ofcreated+customUnitRateIDinto one transaction change was introduced by the flagged PR #93755, which is why this is a new deploy blocker. The rendering path is deterministic from the action'soriginalMessage, so this drops the date regardless of whether the message comes from the optimistic update or the server response.Not yet verified at runtime / in logs — analysis is from code only.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/94520)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
neil-marcellini commentedon Jun 24, 2026
I don't think this needs to be a blocker because the feature is still under a beta.
15 remaining items
melvin-bot commentedon Jun 29, 2026
@c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
c3024 commentedon Jun 30, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: Recalculate mileage rate when editing distance expense date #93755 (comment)
Link to the comment on the Issue: [Due for payment 2026-07-02] [DB MileageRate] App: Support date-aware mileage rate recalculation when editing distance request date #89836 (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: N/A — not critical. This is not a regression. The distance rates feature is new. It is behind a beta and this only affects the system-message text (not a core flow), so no Slack discussion was needed.
[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/657644
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-d30c-a256-768a-85e804a9ee94melvin-bot commentedon Jul 3, 2026
@c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jul 4, 2026
@c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
c3024 commentedon Jul 4, 2026
No payment is due here. This issue is open only to add the regression test.
melvin-bot commentedon Jul 7, 2026
@c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
c3024 commentedon Jul 8, 2026
@mallenexpensify there is no payment due here but we have a regression test to add.