Skip to content

[Due for payment 2026-04-14] [Due for payment 2026-04-14] Expense - The report header shows only the Mark as Paid option #87018

Closed

Description

@mitarachim

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.52-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: #83329
Email or phone of affected tester (no customers): applausetester+bm1055t@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Web, android
App Component: Money Requests

Action Performed:

Precondition:
Workspace is connected to Business bank account
Admin Invited a member to workspace

  1. As a member, submit a non-reimbursable expense in the workspace chat.
  2. As an admin, approve it and then open it

Expected Result:

The report header should display both “Mark as Paid” and “Pay with Business Account” options

Actual Result:

The report header shows only the “Mark as Paid” button, while the report preview displays both options.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7120186_1775162143393.bandicam_2026-04-02_23-34-18-889.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCash
    on Apr 2, 2026
  2. added
    Daily
    Bug
    DeployBlocker
    on Apr 2, 2026
  3. melvin-bot commented on Apr 2, 2026

    @melvin-bot

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

  4. melvin-bot commented on Apr 2, 2026

    @melvin-bot

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

  5. github-actions commented on Apr 2, 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 Apr 2, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The report header shows only "Mark as Paid" for non-reimbursable expenses, while the report preview correctly shows both "Mark as Paid" and "Pay with Business Account".

    What is the root cause of that problem?

    PayPrimaryAction.tsx (the header's pay button) computes onlyShowPayElsewhere without accounting for non-reimbursable transactions:

    https://github.com/Expensify/App/blob/main/src/components/MoneyReportHeaderPrimaryAction/PayPrimaryAction.tsx#L78-L81

    For non-reimbursable expenses, canIOUBePaid(..., false) returns false (because reimbursableSpend = 0) and canIOUBePaid(..., true) returns true, so onlyShowPayElsewhere evaluates to true. When SettlementButton receives onlyShowPayElsewhere=true, it short-circuits to show only "Pay Elsewhere" (Mark as Paid).

    The preview's PayActionButton.tsx correctly handles this at line 94-98 by forcing onlyShowPayElsewhere=false when reportHasOnlyNonReimbursableTransactions is true.

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

    In src/components/MoneyReportHeaderPrimaryAction/PayPrimaryAction.tsx, mirror the logic from PayActionButton.tsx:

    1. Import hasOnlyNonReimbursableTransactions from @libs/TransactionUtils
    2. Compute reportHasOnlyNonReimbursableTransactions using the already-available transactions (line 75)
    3. When reportHasOnlyNonReimbursableTransactions is true, force onlyShowPayElsewhere to false
    4. Add reportHasOnlyNonReimbursableTransactions to the shouldShowPayButton condition
    Evidence chain

    Header (broken) — PayPrimaryAction.tsx:78-81:

    const canIOUBePaid = canIOUBePaidAction(..., false, ...);
    const onlyShowPayElsewhere = !canIOUBePaid && canIOUBePaidAction(..., true, ...);
    const shouldShowPayButton = isPaidAnimationRunning || canIOUBePaid || onlyShowPayElsewhere;

    Preview (correct) — PayActionButton.tsx:94-98:

    const reportHasOnlyNonReimbursableTransactions = hasOnlyNonReimbursableTransactions(iouReport?.reportID, transactions);
    const onlyShowPayElsewhere = reportHasOnlyNonReimbursableTransactions
        ? false
        : !canIOUBePaid && canIOUBePaidIOUActions(..., true, ...);
    const shouldShowPayButton = isPaidAnimationRunning || canIOUBePaid || onlyShowPayElsewhere || reportHasOnlyNonReimbursableTransactions;

    SettlementButton — index.tsx:286-287: When onlyShowPayElsewhere=true, it only builds the "Pay Elsewhere" option, hiding the VBBA/"Pay with Business Account" button.

    What alternative solutions did you explore? (Optional)

    The fix could also be applied in SettlementButton itself to not short-circuit when the report has non-reimbursable transactions, but that would be a broader change. Aligning PayPrimaryAction with the already-working PayActionButton pattern is the minimal and safest fix for a deploy blocker.


    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.

  7. situchan commented on Apr 2, 2026

    @situchan
    Contributor

    @MelvinBot #86723 was merged later than #83329 so I'd say the regression came from #86723. Can you confirm?

  8. MelvinBot commented on Apr 2, 2026

    @MelvinBot
    Contributor

    Yes, confirmed — #86723 is the regression source, not #83329.

    #83329 correctly added the reportHasOnlyNonReimbursableTransactions check to MoneyReportHeader.tsx. Then ~80 minutes later, #86723 extracted the PAY action into PayPrimaryAction.tsx but re-derived onlyShowPayElsewhere using the old pre-#83329 logic, dropping the non-reimbursable guard entirely. Most likely #86723 was branched before #83329 merged.

    Evidence

    My earlier proposal for the fix still applies — align PayPrimaryAction.tsx with the working logic in PayActionButton.tsx / MoneyReportHeader.tsx.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  9. 24 remaining items

  10. changed the title [-][Due for payment 2026-04-14] Expense - The report header shows only the Mark as Paid option[/-] [+][Due for payment 2026-04-14] [Due for payment 2026-04-14] Expense - The report header shows only the Mark as Paid option[/+] on Apr 7, 2026
  11. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.53-7 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-04-14. 🎊

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

    • @situchan requires payment through NewDot Manual Requests
  12. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @situchan @mallenexpensify 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]

  13. added
    Daily
    and removed
    Weekly
    on Apr 13, 2026
  14. melvin-bot commented on Apr 14, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • 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//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. mallenexpensify commented on Apr 16, 2026

    @mallenexpensify
    Contributor

    @situchan is this a regression? Looks like it

    @situchan plz complete the BZ checklist and tag me in a post once you have. Thx.

  16. situchan commented on Apr 16, 2026

    @situchan
    Contributor

    @situchan is this a regression? Looks like it

    No. Reasoning: #87018 (comment)
    The real offending PR is #86723 where I am not involved at all.

  17. situchan commented on Apr 16, 2026

    @situchan
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: Decompose MoneyReportHeader primary actions into a separate component #86723 (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

    • [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/625236

    Regression Test Proposal

    Test:

    1. Connect a workspace to a Business bank account
    2. As an admin, invite a member to the workspace
    3. As the member, submit a non-reimbursable expense in the workspace chat
    4. As the admin, approve the expense and open the report
    5. Verify the report header displays both "Mark as Paid" and "Pay with Business Account" options
    6. Verify the report preview also displays both options

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-f428-a086-6b80-b9917c610984
    Zapier Logs Run ID: 00040eee-2870-a001-3622-77d7fd63b514
  18. mallenexpensify commented on Apr 16, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @situchan due $250 via NewDot

    ^ Test case created

    Thx

    I commented on the issue related to the offending PR too

  19. laurenreidexpensify commented on Apr 27, 2026

    @laurenreidexpensify
    Contributor

    $250 approved for @situchan

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions