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
[Due for payment 2026-08-29] Expense - Unable to split expense with deleted tax #99133
Version Number: 9.4.58-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:#94434 Email or phone of affected tester (no customers):jndojdiojdojnidonj@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:
Enable Taxes.
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Delete the tax used in Step 3.
Open the expense in Step 3.
Click More > Split > Save.
Expected Result:
The expense can be split.
Actual Result:
Error shown when splitting expense with deleted tax.
👋 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: #94434 - "feat: Add Tax, Billable, and Reimbursable selectors in the Split details page" by @truph01 (High confidence) Related Issues: #94038 (the feature request this PR implemented)
Recommendation: ROLL FORWARD
The offending code is an isolated edge case (a deleted tax rate) inside an otherwise-working, brand-new feature that only exists on staging. A targeted fix — clearing/omitting a tax code that no longer exists in the policy — is much smaller and safer than reverting a 9-file feature PR. Revert is a viable fallback if a fix can't land quickly.
Assigned: @truph01 (PR author), @luacmartins, @hoangzinh (approving reviewers) — already assigned by melvin-bot Labels: No change. Only DeployBlockerCash is present; this is a Frontend bug so it correctly stays. DeployBlocker (Web) is not present and none is added.
The PR is precisely the feature the bug is about: it added Tax/Billable/Reimbursable selectors to the split flow and made each split carry taxCode/taxAmount/taxValue through to the save payload. The bug reproduces only when tax is involved in a split, and the feature does not exist in production (matching "N/A - new feature").
Reproduces on staging only; not applicable to production.
Verification
Files the PR touched that are on the failing path (all confirmed to contain the added tax logic in the current checkout, SHA 1465a42):
src/libs/actions/IOU/SplitTransactionUpdate.ts — builds the per-split save payload.
src/pages/iou/SplitExpenseEditPage.tsx — the split edit UI + its "tax disabled" guard.
src/libs/actions/IOU/SplitExpenseItems.ts — seeds each split's tax from the parent transaction.
Root Cause
When a tax rate is deleted from the policy but tax tracking stays enabled, the parent transaction keeps its now-orphaned taxCode. The new split flow inherits that stale code and sends it to the API on save, which rejects the unknown tax code → the error the tester saw.
originalTransactionTaxCode comes from resolveCurrentTaxCode, which falls back to the raw code when no current match exists — so a deleted code is passed straight through to the backend.
The UI guard the PR added only covers tax tracking fully disabled, not this specific rate deleted. In SplitExpenseEditPage.tsx L206-L208:
With tax tracking still on, isTaxEnabled is true, so shouldShowTaxDisabledAlert is false — the user is never prompted to clear the orphaned tax, and the invalid code reaches the save.
Recommended Fix
Treat "tax code no longer exists in the policy's tax rates" the same way the PR already treats "tax tracking disabled": detect it (e.g. via hasTaxRateWithMatchingValue/getTaxName returning empty for a present taxCode) and either surface the existing tax-disabled/clear alert or clear taxCode/taxAmount/taxValue before building the save payload, so a deleted tax code is never sent to the API in SplitTransactionUpdate.ts.
@luacmartins can you help to close this issue? It is a regression of this original issue #94038, and I think we will be paid centrally later in the original issue.
@luacmartins can you help to close this issue? It is a regression of this original issue #94038, and I think we will be paid centrally later in the original issue.
@mallenexpensify ☝️ I think we don't need a payment on this separate issue.
Activity
applause-bot commentedon Aug 21, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/b734585b56060c0e678d0be59f4ff74b85f9e2b167c30e78aa0c1edf8f7ecea4
melvin-bot commentedon Aug 21, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #94434
melvin-bot commentedon Aug 21, 2026
@luacmartins @hoangzinh you have been assigned to this deploy blocker because you reviewed the offending PR: #94434
melvin-bot commentedon Aug 21, 2026
@truph01 you have been assigned to this deploy blocker because you authored the offending PR: #94434
melvin-bot commentedon Aug 21, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 21, 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:
MelvinBot commentedon Aug 21, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #94434 - "feat: Add Tax, Billable, and Reimbursable selectors in the Split details page" by @truph01 (High confidence)
Related Issues: #94038 (the feature request this PR implemented)
Recommendation: ROLL FORWARD
The offending code is an isolated edge case (a deleted tax rate) inside an otherwise-working, brand-new feature that only exists on staging. A targeted fix — clearing/omitting a tax code that no longer exists in the policy — is much smaller and safer than reverting a 9-file feature PR. Revert is a viable fallback if a fix can't land quickly.
Assigned: @truph01 (PR author), @luacmartins, @hoangzinh (approving reviewers) — already assigned by melvin-bot
Labels: No change. Only
DeployBlockerCashis present; this is a Frontend bug so it correctly stays.DeployBlocker(Web) is not present and none is added.📋 Detailed Analysis
Evidence
taxCode/taxAmount/taxValuethrough to the save payload. The bug reproduces only when tax is involved in a split, and the feature does not exist in production (matching "N/A - new feature").Verification
Files the PR touched that are on the failing path (all confirmed to contain the added tax logic in the current checkout, SHA
1465a42):src/libs/actions/IOU/SplitTransactionUpdate.ts— builds the per-split save payload.src/pages/iou/SplitExpenseEditPage.tsx— the split edit UI + its "tax disabled" guard.src/libs/actions/IOU/SplitExpenseItems.ts— seeds each split's tax from the parent transaction.Root Cause
When a tax rate is deleted from the policy but tax tracking stays enabled, the parent transaction keeps its now-orphaned
taxCode. The new split flow inherits that stale code and sends it to the API on save, which rejects the unknown tax code → the error the tester saw.Two spots combine to cause it:
The split save forwards the parent's tax code with no validity check. In
SplitTransactionUpdate.tsL649 (and the reverse-split path at L703):originalTransactionTaxCodecomes fromresolveCurrentTaxCode, which falls back to the raw code when no current match exists — so a deleted code is passed straight through to the backend.The UI guard the PR added only covers tax tracking fully disabled, not this specific rate deleted. In
SplitExpenseEditPage.tsxL206-L208:With tax tracking still on,
isTaxEnabledistrue, soshouldShowTaxDisabledAlertisfalse— the user is never prompted to clear the orphaned tax, and the invalid code reaches the save.Recommended Fix
Treat "tax code no longer exists in the policy's tax rates" the same way the PR already treats "tax tracking disabled": detect it (e.g. via
hasTaxRateWithMatchingValue/getTaxNamereturning empty for a presenttaxCode) and either surface the existing tax-disabled/clear alert or cleartaxCode/taxAmount/taxValuebefore building the save payload, so a deleted tax code is never sent to the API inSplitTransactionUpdate.ts.view run
16 remaining items
truph01 commentedon Aug 28, 2026
Not overdue
hoangzinh commentedon Aug 28, 2026
@luacmartins can you help to close this issue? It is a regression of this original issue #94038, and I think we will be paid centrally later in the original issue.
melvin-bot commentedon Aug 28, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Aug 28, 2026
Payment Summary
Resolving PRs:
fix: Skip seeding stale tax fields into split expenses when the parent's stored tax value is out of date #99212
Reviewer: @hoangzinh owed $250 via NewDot
Reviewer: @truph01 owed $250 via NewDot
BugZero Checklist (@mallenexpensify)
melvin-bot commentedon Aug 31, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
hoangzinh commentedon Sep 1, 2026
@mallenexpensify ☝️ I think we don't need a payment on this separate issue.
luacmartins commentedon Sep 1, 2026
Sounds good. Closing.