Skip to content

[Due for payment 2026-08-07] Expense - After changing workspace, Category and Tag field are not cleared #96668

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.41-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #96228
Email or phone of affected tester (no customers): sdsjodijnsdojsosjio@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:

  • Create workspace A and B.
  • Workspace A and B have at least one category and one tag that are mutually exclusive.
  1. Go to staging.new.expensify.com
  2. Open FAB > Create expense > Manual.
  3. Select category and tag.
  4. Click To field.
  5. Select another workspace (workspace B).

Expected Result:

After changing workspace, Category and Tag field will be cleared.

Actual Result:

After changing workspace, Category and Tag field are not cleared.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7213676_1784651564176.25.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7213676

Activity

  1. applause-bot commented on Jul 21, 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/63f1d048dfd864abbe0ac5ae594273024c487201a67831f70ae74db157342b14

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 21, 2026
  3. melvin-bot commented on Jul 21, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jul 21, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: This is a regression from Expensify/App#96228 ("remove isNewManualExpenseFlowEnabled beta flag"), which made the embedded/inline expense-confirmation flow the default. In that flow, switching the workspace via the inline participant picker routes through handleParticipantsAdded, which only clears the category — and only when the new participant is a P2P recipient (IOURequestStepConfirmation.tsx:386-403):

    if (!isPolicyExpenseChatParticipant) {
        ...
        setMoneyRequestCategory(activeTransactionID, '', undefined);
    }

    When switching from workspace A to workspace B, both participants are policy expense chats, so isPolicyExpenseChatParticipant is true, the whole block is skipped, and neither Category nor Tag is reset. (Note it also never clears the Tag at all, even in the P2P branch.)

    The legacy participants-step flow it replaced did reset both unconditionally on every selection — see useParticipantSubmission.ts:349-355, which always calls setMoneyRequestTag(...) and setMoneyRequestCategory(...) with the destination workspace's defaults. That reset was not carried over into handleParticipantsAdded.

    Recommended Fix: In handleParticipantsAdded, when the selected participant is a policy expense chat and its policyID differs from the transaction's current policy, reset Category and Tag to the new workspace's defaults (mirroring useParticipantSubmission.goToNextStep). Also clear the Tag in the existing P2P branch (setMoneyRequestTag(activeTransactionID, '') alongside the existing setMoneyRequestCategory). setMoneyRequestTag will need to be imported from @userActions/IOU/MoneyRequest.

    Investigation details & alternatives considered
    • Symptoms explained: Both Category and Tag persist across a workspace switch — matches the code exactly (Tag is never cleared anywhere in the new path; Category is cleared only for P2P).
    • Why staging-only / not production: The beta flag removal is on staging (v9.4.41-1) but the old flow (with the reset) was still live in production, which is why it reproduces in staging but not production.
    • Alternative considered — full revert of feat: remove isNewManualExpenseFlowEnabled beta flag #96228: Valid as the fast deploy-blocker unblock, but the PR is a broad beta-cleanup; a targeted patch to handleParticipantsAdded is smaller in scope and preserves the intended flow. Either path resolves the blocker.
    • All references above are in Expensify/App, so a code fix here is appropriate (no cross-repo dependency).

    Related issues (from a quick scan): none look like duplicates of this specific workspace-switch reset bug.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/96668) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. trjExpensify commented on Jul 21, 2026

    @trjExpensify
    Contributor

    The legacy participants-step flow it replaced did reset both unconditionally on every selection

    Confirmed that's how it works on prod. 👍

    CC: @thelullabyy

  8. yuwenmemon commented on Jul 21, 2026

    @yuwenmemon
    Contributor

    The offending PR that caused this deploy blocker was reverted with #96661.

    @Expensify/applause please retest this issue on the latest staging build now that the PR has been reverted, and confirm whether it still reproduces.

  9. puneetlath commented on Jul 21, 2026

    @puneetlath
    Contributor

    PR reverted.

  10. changed the title [-]Expense - After changing workspace, Category and Tag field are not cleared[/-] [+][Due for payment 2026-08-07] Expense - After changing workspace, Category and Tag field are not cleared[/+] on Jul 31, 2026
  11. melvin-bot commented on Jul 31, 2026

    @melvin-bot

    @puneetlath

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.46-10 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-07. 🎊

    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]. If no checklist is needed for this issue, you can click: [no checklist button]

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions