Skip to content

[$250] 91518 - Distance rates - Wrong date format and blank display with no date selected #92277

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.3.90-3
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: #91518
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11 / Chrome, Android 16 / Samsung Galaxy A06
App Component: Workspace Settings

Action Performed:

Precondition:
Use Expensifail account
Have a workspace with distance rates enabled and at least one rate created

Steps:

  1. Go to staging.new.expensify.com
  2. Navigate to a workspace > Distance rates > click on a rate to open the details page
  3. On the rate details page, click on the "Start date" field (or "End date")
  4. Select a date and click "Save"
  5. Open the start date edit page again
  6. Clear the date field and click "Save"

Expected Result:

Step 4, user is navigated back to the details page and the start date now shows the selected date, formatted as yyyy-MM-dd
Step 6, the details page now shows "None" for the start date

Actual Result:

Step 4, the start date now shows the selected date, formatted as MMMM-DD-YYYY
Step 6, the details page is blank for the start date

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7168790_1780330587064.1780329858519_d278cd2d-67b0-4ea5-bdde-e087a6679d27.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7168790

Issue OwnerCurrent Issue Owner: @Krishna2323
Upwork Automation - Do Not Edit

Activity

  1. added
    DeployBlockerCash
    Bug
    on Jun 1, 2026
  2. applause-bot commented on Jun 1, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/83b6571886b565e99b3cb9d41916551512b66a68ba8d37c3b253667a5837ad25

  3. melvin-bot commented on Jun 1, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #91518

  4. melvin-bot commented on Jun 1, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 1, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 1, 2026

    @MelvinBot
    Contributor

    Proposal

    Both symptoms come from the same two lines in PolicyDistanceRateDetailsPage.tsx (added in \#91518).

    What is the root cause of that problem?

    The Start/End date MenuItemWithTopDescription titles are computed as:

    title={rate.startDate ? DateUtils.formatToReadableString(rate.startDate) : ''}
    title={rate.endDate ? DateUtils.formatToReadableString(rate.endDate) : ''}
    • Wrong format (Step 4): Dates are stored as yyyy-MM-dd, but DateUtils.formatToReadableString reformats them to MMMM d, yyyy (e.g. June 1, 2026). The expected display is the raw yyyy-MM-dd.
    • Blank instead of "None" (Step 6): When the date is empty/cleared, the title falls back to '' (an empty string) instead of the "None" placeholder. The clearing itself works (startDate is correctly set to null on save) — only the empty-state display is wrong.

    What changes do you think we should make in order to solve the problem?

    Replace both title expressions so they show the stored ISO date directly and fall back to the "None" label when empty:

    title={rate.startDate || translate('common.none')}
    title={rate.endDate || translate('common.none')}

    common.none already exists ('None'), and rate.startDate/rate.endDate are already in yyyy-MM-dd, so this fixes both symptoms in one change. The now-unused DateUtils import in this file can be removed.

    Investigation details & alternatives considered
    • Display lines: PolicyDistanceRateDetailsPage.tsx:240 and :256.
    • Save/clear logic in PolicyDistanceRateDateEditPage.tsx:59-81 correctly converts an empty input to null, so the underlying data is right — only the read-side rendering is buggy.
    • Format decision: The PR's own test steps and the QA report both specify yyyy-MM-dd, so displaying the raw stored value is the spec-aligned fix. If the team instead prefers a human-readable format (June 1, 2026), the fix would be to keep formatToReadableString but only update the empty fallback to translate('common.none'). The first option matches the documented expectation.

    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/92277) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. thelullabyy commented on Jun 1, 2026

    @thelullabyy
    Contributor

    I think we can go with Melvin proposal to fix it @neil-marcellini

  8. neil-marcellini commented on Jun 1, 2026

    @neil-marcellini
    Contributor

    Not a blocker, the feature is under a beta

  9. removed
    DeployBlockerCash
    Hourly
    on Jun 1, 2026
  10. 15 remaining items

  11. melvin-bot commented on Jun 11, 2026

    @melvin-bot

    @Krishna2323 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  12. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    @neil-marcellini @Krishna2323 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  13. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    @Krishna2323 12 days overdue. Walking. Toward. The. Light...

  14. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    This issue has not been updated in over 14 days. @neil-marcellini, @Krishna2323 eroding to Weekly issue.

  15. Krishna2323 commented on Jun 18, 2026

    @Krishna2323
    Contributor

    We can close this issue, fixed in #92186.

  16. melvin-bot commented on Jun 29, 2026

    @melvin-bot

    @neil-marcellini @Krishna2323 this issue is now 4 weeks old, please consider:

    • Finding a contributor to fix the bug
    • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
    • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

    Thanks!

  17. Krishna2323 commented on Jun 30, 2026

    @Krishna2323
    Contributor

    @neil-marcellini @rlinoz, could you please close this issue when you get a chance?

  18. self-assigned this
    on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugEngineeringExternalWeekly

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions