Skip to content

[Due for payment 2026-07-23 ?] [$250] [Submit] Workspace - Upgrade page reopens after upgrading workspace and importing spreadsheet #92943

Closed

Description

@applause-bot

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.4.0-2
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: #91258
Email or phone of affected tester (no customers): applausetester+sdodjso22ds@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Log in with Expensifail account.
  • Create a Control workspace and invite a member as auditor.
  • Create a Submit workspace on OD.
  1. Go to staging.new.expensify.com
  2. Go to Control workspace settings > Members.
  3. Click More > Download CSV.
  4. Go to Submit workspace settings > Members.
  5. Click More > Import spreadsheet.
  6. Click Import > Upgrade > Got it, thanks.
  7. Click Import again.

Expected Result:

Upgrade page will not appear because the workspace is upgraded before.

Actual Result:

Upgrade page reopens after upgrading workspace and importing spreadsheet.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7175044_1780930963085.31.mp4

View all open jobs on GitHub

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

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

Activity

  1. applause-bot commented on Jun 8, 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/9a4531d98b831d1e156bcd80d84eec9fb43ee0798010507ab6add4c62ac867cc

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

    @melvin-bot

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

  4. melvin-bot commented on Jun 8, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Proposal

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

    On a Submit workspace, importing a member spreadsheet that contains an Auditor role sends the admin to the Upgrade page. After upgrading and importing again, the Upgrade page reopens instead of completing the import, even though the workspace was already upgraded.

    What is the root cause of that problem?

    The auditor import gate requires a Control policy, but the new Submit-workspace upgrade flow (added in Expensify/App#91258) upgrades to Collect by default — so the gate never passes after upgrade.

    Step by step:

    1. The import gate redirects to the Upgrade page using the auditor feature whenever the CSV has an auditor role and the policy is not Control — ImportedMembersPage.tsx:103-106.
    2. For a Submit workspace, the upgrade calls upgradeSubmit(policy, targetType, …) where targetType = feature.requiredPlan ?? CONST.POLICY.TYPE.TEAM — WorkspaceUpgradePage.tsx:175-178.
    3. The auditor feature has no requiredPlan — CONST/index.ts:8013-8020 — unlike rules/perDiem/hr, which set requiredPlan: CORPORATE. So targetType falls back to TEAM (Collect).
    4. upgradeSubmit then sets policy.type = targetType = team (Collect) — Policy.ts:5828.
    5. On the next import, isControlPolicy(policy) is still false (Collect ≠ Corporate — PolicyUtils.ts:1127-1129), so the same gate re-fires and the Upgrade page reopens.
    Why this is a regression from #91258

    Before #91258, onUpgradeToCorporate always called upgradeToCorporate(...), which upgrades to Control — so importing auditors landed on a Control policy and the gate passed. The new Submit path routes through upgradeSubmit with a default of TEAM, and because the auditor feature lacks requiredPlan, the workspace lands on Collect, leaving the auditor gate permanently unsatisfied.

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

    Add a requiredPlan to the auditor feature so the Submit upgrade routes to Control, matching the auditor gate:

    auditor: {
        id: 'auditor' as const,
        alias: 'auditor',
        name: 'Auditor',
        title: 'workspace.upgrade.auditor.title' as const,
        description: 'workspace.upgrade.auditor.description' as const,
        icon: 'BlueShield',
        requiredPlan: this.POLICY.TYPE.CORPORATE,
    },

    This is consistent with the other Control-only features and makes upgradeSubmit pass CORPORATE, so after upgrade isControlPolicy(policy) is true and re-importing proceeds without showing the Upgrade page again.

    What alternative solutions did you explore? (Optional)

    Alternatively, relax the import gate at ImportedMembersPage.tsx:103 to also accept upgraded Submit (Collect) policies — but that would change the product rule that auditors require Control, so the requiredPlan fix is preferred.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement this to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 8, 2026
  8. iwiznia commented on Jun 8, 2026

    @iwiznia
    Contributor

    Not a blocker since it's under beta

  9. 45 remaining items

  10. melvin-bot commented on Jul 16, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  11. melvin-bot commented on Jul 16, 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/2073044725705633999/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
  12. changed the title [-][Due for payment 2026-07-16] [$250] [Submit] Workspace - Upgrade page reopens after upgrading workspace and importing spreadsheet[/-] [+][Due for payment 2026-07-23 ?] [$250] [Submit] Workspace - Upgrade page reopens after upgrading workspace and importing spreadsheet[/+] on Jul 17, 2026
  13. removed their assignment
    on Jul 17, 2026
  14. sobitneupane commented on Jul 23, 2026

    @sobitneupane
    Contributor

    BugZero Checklist:

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

      Link to the comment on the PR: Could not locate the PR.
      Link to the comment on the Issue:

    • [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:

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

    Regression Test Proposal

    Precondition:

    • Log in with Expensifail account.
    • Create a Control workspace and invite a member as auditor.
    • Create a Submit workspace on OD.

    Test:

    1. Go to Control workspace settings > Members.
    2. Click More > Download CSV.
    3. Go to Submit workspace settings > Members.
    4. Click More > Import spreadsheet.
    5. Click Import > Upgrade > Got it, thanks.
    6. Click Import again.
    7. Verify that Upgrade page does not appear because the workspace is already upgraded.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-9850-a088-a5bc-22eca6e4f264
  15. mallenexpensify commented on Jul 27, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @sobitneupane due $250 via NewDot

    ^ Test case created. Thx

    Think we're good to close, comment or reopen if you disagree.

  16. JmillsExpensify commented on Jul 28, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @sobitneupane

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.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions