You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expense - Tax field present in cross policy bulk edit, despite one WS having taxes disabled #84678
Version Number: 9.3.34.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:#82948 Email or phone of affected tester (no customers):ibellicotest+2250@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Search
Action Performed:
Prerequisite: Account has two workspaces.
Prerequisite 2: Workspace 1 has taxes enabled and workspace 2 has taxes disabled.
Open the Expensify app.
Open a workspace with taxes enabled.
Create a manual expense and select any tax rate during creation.
Navigate to a different workspace with taxes disabled.
Create another manual expense.
Navigate to "Reports" > "Expenses"
Select both expenses, tap on dropdown menu and select "Edit Multiple"
Note that "Tax Rate" field is available despite one of the expenses not having taxes enabled.
Tap on "Tax Rate"
Note that all the taxes from Workspace 1 are displayed.
Expected Result:
"Tax rate" field should not be available during cross policy bulk edit, if one of the workspaces has "Taxes" disabled.
Actual Result:
"Tax Rate" field is available and editable during cross policy bulk edit, despite one of the workspaces having "Taxes" disabled.
👋 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:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence) Related Issues: None
Recommendation: ROLL FORWARD
The issue is straightforward to fix and a revert would remove the entire bulk edit feature. The fix requires checking if tax tracking is enabled for ALL workspaces involved in the bulk edit, not just the active workspace.
Labels: This is reproducible only on staging (not in production as this is a new feature), and the bug is in the App repository. Therefore, I am removing the DeployBlockerCash label as this does not block the mobile app deploy, but keeping DeployBlocker for the backend/web deploy.
📋 Detailed Analysis
Evidence
PR #82948 introduced the bulk edit multiple expenses feature. The issue was explicitly linked to this PR by melvin-bot in the first comment. The bug appears when:
User has two workspaces
Workspace 1 has taxes enabled
Workspace 2 has taxes disabled
User selects expenses from both workspaces and opens "Edit Multiple"
Tax Rate field appears and shows taxes from Workspace 1
Verification
I examined the code in /home/runner/_work/App/App/src/pages/Search/SearchEditMultiple/SearchEditMultiplePage.tsx lines 87-89:
The policy variable comes from getSearchBulkEditPolicyID() which returns the active policy ID when expenses are from different workspaces. This means it only checks ONE workspace for tax tracking.
Compare this to the correct pattern used for billable/reimbursable fields (lines 72-78):
These correctly use .every() to check ALL transactions policies.
Root Cause
The isTaxTrackingEnabled logic only checks a single workspace policy for tax tracking, rather than verifying that ALL selected expenses belong to workspaces with tax tracking enabled. When doing cross-policy bulk edit:
If the active workspace has taxes enabled, the tax field shows
But some selected expenses may be from a workspace with taxes disabled
This allows editing tax on expenses that should not have tax fields
The fix should check that ALL involved workspaces have tax tracking enabled, similar to the billable/reimbursable pattern:
Label Decision: The DeployBlockerCash label was added by an internal Expensify employee (@jponikarchuk), so I will not remove it per the investigation guidelines. However, based on the analysis, this is a frontend bug in the App repository caused by PR #82948. The recommended approach is to roll forward with a fix rather than revert the entire bulk edit feature.
Please re-state the problem that we are trying to solve in this issue.
When a user selects expenses from two different workspaces (one with taxes enabled, one with taxes disabled) and opens "Edit Multiple," the Tax Rate field is shown and editable. It should not appear if any selected expense belongs to a workspace with taxes disabled.
What is the root cause of that problem?
When selected transactions span multiple policies, getSearchBulkEditPolicyID() in src/libs/SearchUIUtils.ts falls back to the user's activePolicyID (their current workspace) instead of checking each transaction's actual policy.
SearchEditMultiplePage.tsx:87 then uses that single fallback policy to decide tax field visibility:
So if the user's active workspace has taxes enabled, the Tax Rate field appears for all selected transactions — even those belonging to a workspace with taxes disabled. The single-expense view (MoneyRequestView.tsx:415) correctly checks each transaction's own policy via isTaxTrackingEnabled(), but the bulk edit page does not replicate this per-transaction check.
Additionally, canEditFieldOfMoneyRequest in ReportUtils.ts treats TAX_RATE as a non-restricted field (it's not in the restrictedFields array), so there is no secondary safety net that would catch this.
What changes do you think we should make in order to solve the problem?
In SearchEditMultiplePage.tsx, instead of deriving isTaxTrackingEnabled from the single fallback policy, check whether all selected transactions' policies have tax tracking enabled. If any transaction's policy has tax.trackingEnabled === false (or undefined), the Tax Rate field should be hidden.
This can be done by iterating selectedTransactionContexts (which already contains each transaction's transactionPolicy) and verifying every policy has tax.trackingEnabled set to true — similar to how areSelectedTransactionsReimbursable already iterates all selected transactions at line 76-78 of the same file.
The same pattern (single fallback policy) also affects areCategoriesEnabled and areTagsEnabled on lines 88-89, but those are separate issues.
What alternative solutions did you explore? (Optional)
An alternative would be to add TAX_RATE to the restrictedFields array in canEditFieldOfMoneyRequest and add a per-transaction isTaxTrackingEnabled check there. However, this would only control the disabled/enabled state of the field, not its visibility. The more direct and consistent fix is to check all policies in SearchEditMultiplePage.tsx where field visibility is determined.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Mar 10, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82948
melvin-bot commentedon Mar 10, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Mar 10, 2026
Triggered auto assignment to @garrettmknight (
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.github-actions commentedon Mar 10, 2026
👋 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:
OSBotify commentedon Mar 10, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence)
Related Issues: None
Recommendation: ROLL FORWARD
The issue is straightforward to fix and a revert would remove the entire bulk edit feature. The fix requires checking if tax tracking is enabled for ALL workspaces involved in the bulk edit, not just the active workspace.
Labels: This is reproducible only on staging (not in production as this is a new feature), and the bug is in the App repository. Therefore, I am removing the
DeployBlockerCashlabel as this does not block the mobile app deploy, but keepingDeployBlockerfor the backend/web deploy.📋 Detailed Analysis
Evidence
PR #82948 introduced the bulk edit multiple expenses feature. The issue was explicitly linked to this PR by melvin-bot in the first comment. The bug appears when:
Verification
I examined the code in
/home/runner/_work/App/App/src/pages/Search/SearchEditMultiple/SearchEditMultiplePage.tsxlines 87-89:The
policyvariable comes fromgetSearchBulkEditPolicyID()which returns the active policy ID when expenses are from different workspaces. This means it only checks ONE workspace for tax tracking.Compare this to the correct pattern used for billable/reimbursable fields (lines 72-78):
These correctly use
.every()to check ALL transactions policies.Root Cause
The
isTaxTrackingEnabledlogic only checks a single workspace policy for tax tracking, rather than verifying that ALL selected expenses belong to workspaces with tax tracking enabled. When doing cross-policy bulk edit:The fix should check that ALL involved workspaces have tax tracking enabled, similar to the billable/reimbursable pattern:
OSBotify commentedon Mar 10, 2026
Label Decision: The
DeployBlockerCashlabel was added by an internal Expensify employee (@jponikarchuk), so I will not remove it per the investigation guidelines. However, based on the analysis, this is a frontend bug in the App repository caused by PR #82948. The recommended approach is to roll forward with a fix rather than revert the entire bulk edit feature.MelvinBot commentedon Mar 10, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user selects expenses from two different workspaces (one with taxes enabled, one with taxes disabled) and opens "Edit Multiple," the Tax Rate field is shown and editable. It should not appear if any selected expense belongs to a workspace with taxes disabled.
What is the root cause of that problem?
When selected transactions span multiple policies,
getSearchBulkEditPolicyID()insrc/libs/SearchUIUtils.tsfalls back to the user'sactivePolicyID(their current workspace) instead of checking each transaction's actual policy.SearchEditMultiplePage.tsx:87then uses that single fallback policy to decide tax field visibility:So if the user's active workspace has taxes enabled, the Tax Rate field appears for all selected transactions — even those belonging to a workspace with taxes disabled. The single-expense view (
MoneyRequestView.tsx:415) correctly checks each transaction's own policy viaisTaxTrackingEnabled(), but the bulk edit page does not replicate this per-transaction check.Additionally,
canEditFieldOfMoneyRequestinReportUtils.tstreatsTAX_RATEas a non-restricted field (it's not in therestrictedFieldsarray), so there is no secondary safety net that would catch this.What changes do you think we should make in order to solve the problem?
In
SearchEditMultiplePage.tsx, instead of derivingisTaxTrackingEnabledfrom the single fallback policy, check whether all selected transactions' policies have tax tracking enabled. If any transaction's policy hastax.trackingEnabled === false(or undefined), the Tax Rate field should be hidden.This can be done by iterating
selectedTransactionContexts(which already contains each transaction'stransactionPolicy) and verifying every policy hastax.trackingEnabledset to true — similar to howareSelectedTransactionsReimbursablealready iterates all selected transactions at line 76-78 of the same file.The same pattern (single fallback policy) also affects
areCategoriesEnabledandareTagsEnabledon lines 88-89, but those are separate issues.What alternative solutions did you explore? (Optional)
An alternative would be to add
TAX_RATEto therestrictedFieldsarray incanEditFieldOfMoneyRequestand add a per-transactionisTaxTrackingEnabledcheck there. However, this would only control the disabled/enabled state of the field, not its visibility. The more direct and consistent fix is to check all policies inSearchEditMultiplePage.tsxwhere field visibility is determined.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.IuliiaHerets commentedon Mar 10, 2026
Chrome / 9.3.34-1
No Edit multiple option
Screen.Recording.2026-03-10.at.19.10.22.mp4
melvin-bot commentedon Mar 24, 2026
@garrettmknight, @marcaaron Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Mar 26, 2026
@garrettmknight, @marcaaron Huh... This is 4 days overdue. Who can take care of this?
garrettmknight commentedon Mar 27, 2026
It's being reviewed, Melv.
melvin-bot commentedon Apr 3, 2026
@garrettmknight, @marcaaron Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
garrettmknight commentedon Apr 7, 2026
Kk, we're on prod! #84756 seems to have fixed it!