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
Distance rates - Distance rate can be saved with only Start or End date selected #91383
Version Number: 9.3.79-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:#90153 Email or phone of affected tester (no customers):applausetester+khcategory19@applause.expensifail.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:
Precondition:
Log in with Expensifail account.
Enable Distance rates in workspace settings.
Go to staging.new.expensify.com
Go to workspace settings > Distance rates.
Click Add rate.
Enter name and rate.
Select only Start or End date.
Click Save.
Expected Result:
When Start/End date is selected, it must require the End/Start date.
Actual Result:
Distance rate can be saved with only Start or End date is selected.
👋 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.
If only one date is provided, the entire condition short-circuits to false and no error is raised. There is no check enforcing that the dates must be paired — so a rate can be saved with only a startDate or only an endDate.
What changes do you think we should make in order to solve the problem?
Add a paired-date validation check in validateCreateDistanceRateForm: if one of startDate/endDate is provided but the other is missing, set an error on the missing field. This requires adding a new translation key (e.g., workspace.distanceRates.errors.endDateRequired / startDateRequired) and the corresponding validation logic after line 83.
What alternative solutions did you explore? (Optional)
An alternative would be to enforce this at the UI level by auto-showing/requiring the second date picker when the first is filled. However, form-level validation is the standard pattern in this codebase and is more robust since it catches the issue regardless of how the form state is constructed.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
When Start/End date is selected, it must require the End/Start date.
Actual Result:
Distance rate can be saved with only Start or End date is selected.
This is not a bug. The actual result is the expected result here. Please correct the test case that says both dates are required for distance rates when either date is provided.
Activity
applause-bot commentedon May 22, 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/b08a79f725531d5f55e7bdb3192b54cf17e47cf25c353b7fa84e9ecf14e533e5
melvin-bot commentedon May 22, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #90153
melvin-bot commentedon May 22, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 22, 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 May 22, 2026
Proposal
What is the root cause of that problem?
The
validateCreateDistanceRateFormfunction only validates that startDate comes before endDate when both are present:If only one date is provided, the entire condition short-circuits to
falseand no error is raised. There is no check enforcing that the dates must be paired — so a rate can be saved with only a startDate or only an endDate.What changes do you think we should make in order to solve the problem?
Add a paired-date validation check in
validateCreateDistanceRateForm: if one of startDate/endDate is provided but the other is missing, set an error on the missing field. This requires adding a new translation key (e.g.,workspace.distanceRates.errors.endDateRequired/startDateRequired) and the corresponding validation logic after line 83.What alternative solutions did you explore? (Optional)
An alternative would be to enforce this at the UI level by auto-showing/requiring the second date picker when the first is filled. However, form-level validation is the standard pattern in this codebase and is more robust since it catches the issue regardless of how the form state is constructed.
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.c3024 commentedon May 22, 2026
This is not a bug. The actual result is the expected result here. Please correct the test case that says both dates are required for distance rates when either date is provided.
rlinoz commentedon May 22, 2026
What @c3024 said, this is working as intended, closing.