Skip to content

[Due for payment 2026-08-28] Expense - "Unable to submit report" is shown when action button is Mark as done #99029

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.57-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: #96922
Email or phone of affected tester (no customers): jsdoinsjdonjsiodjsioj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Complete onboarding with Track expenses for my business intent.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense and hold it.
  4. Click Mark as done.

Expected Result:

"Unable to mark as done" should be shown because action button is Mark as done.

Actual Result:

"Unable to submit report" is shown when action button is Mark as done.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

To be added by Applause Leads

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7237915

Issue OwnerCurrent Issue Owner: @huult

Activity

  1. added
    DeployBlockerCash
    Bug
    on Aug 20, 2026
  2. applause-bot commented on Aug 20, 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/4358f4dd976de3a0762198c26d799c490c468c2a30e2d63283d6424152038f2a

  3. melvin-bot commented on Aug 20, 2026

    @melvin-bot

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

  4. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    @NikkiWines @huult you have been assigned to this deploy blocker because you reviewed the offending PR: #96922

  5. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    @c3024 you have been assigned to this deploy blocker because you authored the offending PR: #96922

  6. github-actions commented on Aug 20, 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.
  7. melvin-bot commented on Aug 20, 2026

    @melvin-bot

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

  8. MelvinBot commented on Aug 20, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #96922 - "Split held expenses onto a new Draft report when submitting offline" by @c3024 (High confidence)
    Related Issues: Fixes #91080 (the feature this PR shipped)

    Recommendation: ROLL FORWARD (targeted fix)

    The bug is a mismatched confirm-modal title/copy introduced by this PR: the new showHeldExpensesBlockModal helper is hardcoded to the "Unable to submit report" copy, but it also fires from the "Mark as done" CTA. A full revert would reintroduce the offline held-expense split bug this PR fixed (and it has already-deployed Auth/Web backend dependencies), so a small targeted copy fix is the better path.

    Assigned: @c3024 (PR author), @NikkiWines and @huult (approving reviewers) from the causing PR.
    Labels: No changes. DeployBlockerCash is correctly kept (App PR caused it; App deploy is blocked). No DeployBlocker label present.

    📋 Detailed Analysis

    Evidence

    • PR Split held expenses onto a new Draft report when submitting offline #96922 merged 2026-08-19; issue reported 2026-08-20 against 9.4.57-0 (the current StagingDeployCash #99018, which lists this PR). Staging-only, N/A on production — consistent with a brand-new feature.
    • The PR added a brand-new helper showHeldExpensesBlockModal and wired it into every submit entry point (SubmitActionButton, useLifecycleActions, the Search list items, and useSearchBulkActions) to block submitting a report whose expenses are all on hold.
    • The helper's title is hardcoded to iou.error.unableToSubmitReport ("Unable to submit report"), with no branch for the "Mark as done" CTA.

    Verification

    • Affected UI: the report-preview action button in the workspace chat. Its label toggles between "Mark as done" and "Submit" via shouldShowMarkAsDone (true for "Track expenses for my business" intent users), but both share one handleSubmit handler.
    • git log/gh pr diff confirm the helper and every call site were introduced by Split held expenses onto a new Draft report when submitting offline #96922 (all + lines in the diff); the strings unableToSubmitReport (existing) and allExpensesOnHoldDescription (new) live in src/languages/en.ts. There is no unableToMarkAsDone string.

    Key locations (permalinks at current HEAD c156d5f):

    Root Cause

    When a report's expenses are all on hold, pressing the primary CTA calls handleSubmit, which hits the hasOnlyHeldExpenses(transactions) branch and calls showHeldExpensesBlockModal(showConfirmModal, translate). That helper unconditionally sets:

    • title → iou.error.unableToSubmitReport ("Unable to submit report")
    • prompt → iou.error.allExpensesOnHoldDescription ("You can't submit this report because all expenses are on hold. Remove the hold to submit.")

    But the same button renders as "Mark as done" for Track-expenses-for-my-business intent users (shouldShowMarkAsDone). So a user who taps "Mark as done" is shown submit-worded error copy — the exact mismatch reported. The block itself is functionally correct (the action can't proceed); only the copy is wrong.

    Suggested targeted fix: give showHeldExpensesBlockModal a flag (e.g. isMarkAsDone, derived from shouldShowMarkAsDone at the call site) and select a "Mark as done"-appropriate title/prompt when set. This requires adding new iou.error strings across src/languages/*.ts. Only the SubmitActionButton / useLifecycleActions call sites (the ones that render the "Mark as done" CTA) need to pass the flag.


    view run

  9. added
    Reviewing
    on Aug 20, 2026
  10. c3024 commented on Aug 20, 2026

    @c3024
    Contributor

    This is a specific case for track intent and submit and close workspace. I don't think this should be a deploy blocker.

    Opened a PR with the fix.

  11. huult commented on Aug 20, 2026

    @huult
    Contributor

    Tag me when it's ready

  12. IuliiaHerets commented on Aug 20, 2026

    @IuliiaHerets

    Issue was fixed, checked on Web and Android, comment here

  13. Beamanator commented on Aug 20, 2026

    @Beamanator
    Contributor

    Sweet! Closing!

  14. removed
    DeployBlockerCash
    on Aug 21, 2026
  15. added
    Daily
    and removed
    Reviewing
    Hourly
    on Aug 21, 2026
  16. changed the title [-]Expense - "Unable to submit report" is shown when action button is Mark as done[/-] [+][Due for payment 2026-08-28] Expense - "Unable to submit report" is shown when action button is Mark as done[/+] on Aug 21, 2026
  17. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    @huult

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.57-3 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-08-28. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]

  18. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions