Skip to content

Submit button shown when delayed submissions & approvals are disabled #70925

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.2.16-0
Reproducible in staging?: Yes
Reproducible in production?: No
**If this was caught during regression testing, add the test name, ID and link from TestRail:**Exploarory around #70720
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 11, Chrome
App Component: Other

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Create a workspace > go to the workspace chat
  3. Go to the workspace settings > workflows > toggle off delayed submissions and approvals
  4. Go to the workspace chat > Create a report > Add expense > Create expense

Expected Result:

Submit button should be hidden when the “Delayed submissions & approvals” setting is disabled.

Actual Result:

Submit button remains visible even though the setting is turned off.

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

1.mp4

View all open jobs on GitHub

Activity

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

    @melvin-bot

    Triggered auto assignment to @heyjennahay (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 Sep 20, 2025

    @melvin-bot

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

  4. melvin-bot commented on Sep 20, 2025

    @melvin-bot

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

  5. github-actions commented on Sep 20, 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.
  6. samranahm commented on Sep 20, 2025

    @samranahm
    Contributor

    Proposal

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

    Submit button shown when delayed submissions & approvals are disabled

    What is the root cause of that problem?

    Here

    App/src/libs/ReportUtils.ts

    Lines 1857 to 1859 in d8ce56d

    // The report needs manual submission if manual submit is enabled in the policy or the report is open in a Submit & Close policy with no approvers
    return isManualSubmitEnabled || (isOpenReport(report) && isInstantSubmitEnabled(policy) && isSubmitAndClose(policy));
    }

    we check Report is open and instant submit is enabled and it’s a submit & closed isInstantSubmitEnabled is true we disable Delay submissions, making this second condition true

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

    we should use !isInstantSubmitEnabled

       return isManualSubmitEnabled || (isOpenReport(report) && !isInstantSubmitEnabled(policy) && isSubmitAndClose(policy)); 

    so that if isInstantSubmitEnabled true, we return false from requiresManualSubmission function here

    App/src/libs/ReportUtils.ts

    Lines 1854 to 1859 in d8ce56d

    function requiresManualSubmission(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
    const isManualSubmitEnabled = getCorrectedAutoReportingFrequency(policy) === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.MANUAL;
    // The report needs manual submission if manual submit is enabled in the policy or the report is open in a Submit & Close policy with no approvers
    return isManualSubmitEnabled || (isOpenReport(report) && isInstantSubmitEnabled(policy) && isSubmitAndClose(policy));
    }

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

    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. srikarparsi commented on Sep 22, 2025

    @srikarparsi
    Contributor

    Discussing in this thread

  8. trjExpensify commented on Sep 22, 2025

    @trjExpensify
    Contributor

    @jponikarchuk this is expected.

    • Before, when a workspace had Instant + no approvals + no payments, using Create report would create a closed report and expenses couldn't be added to it.
    • It’s in active development to be changed with the ASAP submit rollout/changes, and we’ve completed the part that will now create an open draft report in this flow instead, such that expenses can be added to it. As such, it's expected the Submit button will show in this case. The next step will be to auto-submit the report if the expense(s) added to it are violation free, but that part isn’t done yet.

    **If this was caught during regression testing, add the test name, ID and link from TestRail:**Exploarory around #70720

    Given that, I see this was "exploratory", but if there is a specific test case for using Create report on a workspace configured for "Instant + no approvals + no payments", can you update it to not recreate this bug report? Thanks!

  9. srikarparsi commented on Sep 22, 2025

    @srikarparsi
    Contributor

    Closing this issue as it is expected behavior right now

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.EngineeringHourlyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions