Skip to content

[Due for payment 2026-06-09] [$250] Per diem - Date and time field are empty, unable to select time #90663

Closed

Description

@jponikarchuk

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: 9.3.74-0
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: #87920
Email or phone of affected tester (no customers): sdsdjoijdoisnjodis@gmail.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:

  • Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
  • Workspace has per diem rates.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Click + > Create expense.
  4. If the initial tab is not Manual, go to Manual and close the RHP.
  5. Click + > Create expense > Per diem.
  6. Select a destination.
  7. Click Start time.
  8. Enter time and save it.

Expected Result:

Date and time should be auto populated.

Actual Result:

Date and time are empty.
User cannot select time.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 14, 2026
  2. melvin-bot commented on May 14, 2026

    @melvin-bot

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

  3. melvin-bot commented on May 14, 2026

    @melvin-bot

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

  4. github-actions commented on May 14, 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.
  5. OSBotify commented on May 14, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
    Related Issues: None

    Recommendation: REVERT

    The causing PR is clearly identified, is present in the staging deploy checklist (unchecked), and introduces a direct regression on the per diem start/end time fields. Reverting it would restore the previous behavior.

    Assigned: @ChavdaSachin (PR author), @ShridharGoel, @puneetlath (approving reviewers)
    Labels: DeployBlockerCash kept (frontend bug in App repo). No label changes made.

    📋 Detailed Analysis

    Evidence

    • The issue body explicitly references PR Feat: Manual expense flow UI refactor - r3 #87920 as the source (https://github.com/Expensify/App/pull/87920), and melvin-bot confirmed the same.
    • PR Feat: Manual expense flow UI refactor - r3 #87920 is listed in the current StagingDeployCash checklist (still unchecked), confirming it is part of this staging release.
    • The bug is staging-only (marked "N/A - new feature, doesn't exist in prod"), consistent with a newly-landed PR.
    • The reproduction path requires activating the newManualExpenseFlow beta (Onyx.merge('betas', ['newManualExpenseFlow'])), which is exactly the beta this PR rolls out.

    Verification

    • The affected component is PerDiemFields.tsx (src/components/MoneyRequestConfirmationList/sections/PerDiemFields.tsx), which renders the start/end time via getTimeForDisplay(transaction) — reading transaction.comment.customUnit.attributes.dates.
    • PR Feat: Manual expense flow UI refactor - r3 #87920 modifies IOURequestStartPage.tsx, IOURequestStepConfirmation.tsx, AmountField.tsx, and the IOU/index.ts action file.
    • Key change in PR Feat: Manual expense flow UI refactor - r3 #87920: it introduces clearMoneyRequestAmount which merges {amount: 0, isAmountSet: false} back onto the draft transaction. It is called from AmountField when the user clears the input (parsedAmount === null).
    • The per diem flow stores start/end date-time in transaction.comment.customUnit.attributes.dates. If the draft transaction is improperly reset or re-initialized when navigating between tabs (Manual → Per Diem), those nested comment fields can be wiped, causing the time fields to display empty.
    • The reproduction steps deliberately visit the Manual tab first (activating the new embedded IOURequestStepConfirmation), then close and switch to Per Diem — a cross-tab state interaction that did not exist before this PR changed the Manual tab to render IOURequestStepConfirmation directly on IOURequestStartPage.

    Root Cause

    PR #87920 embeds IOURequestStepConfirmation directly inside the Manual tab of IOURequestStartPage when isNewManualExpenseFlowEnabled is true. This changes the transaction initialization lifecycle: MoneyRequestInitializer is conditionally skipped for the new flow ({!isNewManualExpenseFlowEnabled && <MoneyRequestInitializer .../>}), and a new clearMoneyRequestAmount action is introduced that resets isAmountSet and amount on the draft transaction. When the user visits the Manual tab first, the new embedded confirmation screen interacts with the draft transaction (potentially calling clearMoneyRequestAmount or side-effecting the draft state). Upon switching to the Per Diem tab, the draft transaction's comment.customUnit.attributes.dates fields appear empty because the transaction state was modified or re-initialized by the Manual tab's new embedded flow, causing the per diem start/end time fields to show blank and become non-interactive.

  6. ChavdaSachin commented on May 14, 2026

    @ChavdaSachin
    Contributor

    NAB: only happens on beta accounts

  7. MelvinBot commented on May 14, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #87920 introduced the newManualExpenseFlow beta, which embeds IOURequestStepConfirmation on the Manual tab of IOURequestStartPage. Two changes in that PR break the per diem flow when the beta is enabled:

    1. MoneyRequestInitializer is unconditionally skipped based on the global beta flag rather than whether the page is actually embedded. At IOURequestStepConfirmation.tsx:694, the condition !isNewManualExpenseFlowEnabled disables initialization for all flows — including per diem, which reaches the confirmation page as a standalone screen (not embedded). The comment says "this screen is embedded on IOURequestStartPage", but that's only true for the Manual tab.

    2. Validation blocks per diem submission. At useConfirmationValidation.ts:166, the check isNewManualExpenseFlowEnabled && !transaction?.isAmountSet always fails for per diem because per diem amounts are computed from subrates via computePerDiemExpenseAmount() — the code never calls setMoneyRequestAmount(), which is the only function that sets isAmountSet = true. This returns a 'common.error.fieldRequired' error that blocks the flow.

    3. The embedded confirmation page on the Manual tab shares the same transaction draft (OPTIMISTIC_TRANSACTION_ID). When the user switches to the Per Diem tab, initMoneyRequest(PER_DIEM) creates a new transaction via Onyx.set, but the Manual tab's IOURequestStepConfirmation (still mounted) reacts to the transaction change and runs side effects (participant-setting, expense defaults, category defaults) against the now-PER_DIEM transaction. While these effects individually only merge non-overlapping fields, the cumulative rapid Onyx operations on the shared transaction during the tab switch create a window for the date/time attributes to be lost.

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

    1. Fix MoneyRequestInitializer skipping — use the shouldHideHeader prop (which actually indicates embedding) instead of the global beta flag:

      // IOURequestStepConfirmation.tsx:694
      - {!isNewManualExpenseFlowEnabled && (
      + {!shouldHideHeader && (
          <MoneyRequestInitializer ... />
      )}
      
    2. Fix validation for per diem — exclude per diem (and time) requests from the isAmountSet check:

      // useConfirmationValidation.ts:166
      - if (isNewManualExpenseFlowEnabled && !transaction?.isAmountSet) {
      + if (isNewManualExpenseFlowEnabled && !transaction?.isAmountSet && !isPerDiemRequest && !isTimeRequest) {
      

      (where isPerDiemRequest/isTimeRequest are already available in that hook's scope or can be derived from the existing requestType parameter)

    What alternative solutions did you explore? (Optional)

    • Setting isAmountSet = true inside computePerDiemExpenseAmount — rejected because isAmountSet semantically means the user explicitly set the amount, which doesn't apply to per diem.
    • Guarding all Manual-tab side effects with isManualRequest — more invasive and the effects are mostly harmless individually.

    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.

  8. puneetlath commented on May 14, 2026

    @puneetlath
    Contributor

    Demoting.

  9. 26 remaining items

  10. melvin-bot commented on Jun 2, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.94-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-06-09. 🎊

    For reference, here are some details about the assignees on this issue:

  11. melvin-bot commented on Jun 2, 2026

    @melvin-bot

    @ShridharGoel / @ChavdaSachin / @thelullabyy The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  12. ChavdaSachin commented on Jun 3, 2026

    @ChavdaSachin
    Contributor

    This was a regression from my own PR - #91004
    I am not due payment here.
    My payment would be handled at #82586 at the end

  13. melvin-bot commented on Jun 8, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. melvin-bot commented on Jun 8, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2060650277205333187/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  15. thelullabyy commented on Jun 9, 2026

    @thelullabyy
    Contributor

    Only me should be paid here

  16. mallenexpensify commented on Jun 10, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @thelullabyy due $250 via NewDot

    since this is from a regression, I'm assuming the test case is created elsewhere

  17. laurenreidexpensify commented on Aug 12, 2026

    @laurenreidexpensify
    Contributor

    $250 approved for @thelullabyy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions