Skip to content

[$250] Expense - Missing Add expense button in draft empty report with instant submission #74989

Closed

Description

@vincdargento

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.2.55-3
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #73463
Email or phone of affected tester (no customers): jsnoidjdosisjdios@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • "Submission frequency" is set to Instantly.
  • "Add approvals" and "Make or track payments" are disabled.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an empty report.
  4. Open the empty report.

Expected Result:

Add expense button should be present because the report is in draft status.

Actual Result:

Add expense button is missing when the report is in draft status.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021988784810367976960
  • Upwork Job ID: 1988784810367976960
  • Last Price Increase: 2025-11-13
Issue OwnerCurrent Issue Owner: @

Activity

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

    @melvin-bot

    Triggered auto assignment to @VictoriaExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. melvin-bot commented on Nov 12, 2025

    @melvin-bot

    Triggered auto assignment to @pecanoro (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. github-actions commented on Nov 12, 2025

    @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. melvin-bot commented on Nov 12, 2025

    @melvin-bot

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

  6. samranahm commented on Nov 12, 2025

    @samranahm
    Contributor

    Proposal

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

    Expense - Missing Add expense button in draft empty report with instant submission

    What is the root cause of that problem?

    Here

    App/src/libs/ReportUtils.ts

    Lines 2617 to 2629 in 112cc07

    function canAddTransaction(moneyRequestReport: OnyxEntry<Report>, isReportArchived = false, isMovingTransaction = false): boolean {
    if (!isMoneyRequestReport(moneyRequestReport) || (isExpenseReport(moneyRequestReport) && !isCurrentUserSubmitter(moneyRequestReport))) {
    return false;
    }
    // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
    // eslint-disable-next-line @typescript-eslint/no-deprecated
    const policy = getPolicy(moneyRequestReport?.policyID);
    if (
    isInstantSubmitEnabled(policy) &&
    isSubmitAndClose(policy) &&
    (hasOnlyNonReimbursableTransactions(moneyRequestReport?.reportID) || (!isMovingTransaction && policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO))
    ) {
    return false;

    We check isInstantSubmitEnabled With instant submission + submit-and-close policies

    Reports are automatically submitted and closed after each transaction
    If the report only contains non-reimbursable transactions or the policy doesn't reimburse, there's no way to add more transactions because the report immediately closes
    The check prevents the "Add expense" button from showing in these situations where adding would fail

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

    We should check if we hasExpenses

    if (
        isInstantSubmitEnabled(policy) &&
        isSubmitAndClose(policy) &&
        hasExpenses(moneyRequestReport?.reportID) &&
        (hasOnlyNonReimbursableTransactions(moneyRequestReport?.reportID) || (!isMovingTransaction && policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO))
    ) {
        return false;
    }

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  7. pecanoro commented on Nov 12, 2025

    @pecanoro
    Contributor

    Probably caused by #73463

  8. FitseTLT commented on Nov 12, 2025

    @FitseTLT
    Contributor

    U can assign me 👍

  9. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 13, 2025
  10. changed the title [-]Expense - Missing Add expense button in draft empty report with instant submission[/-] [+][$250] Expense - Missing Add expense button in draft empty report with instant submission[/+] on Nov 13, 2025
  11. melvin-bot commented on Nov 13, 2025

    @melvin-bot
  12. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 13, 2025
  13. melvin-bot commented on Nov 13, 2025

    @melvin-bot

    Current assignees @FitseTLT and @brunovjk are eligible for the External assigner, not assigning anyone new.

  14. brunovjk commented on Nov 13, 2025

    @brunovjk
    Contributor

    We reverted the PR, so the bug should no longer be reproducible.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions