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-04-01] [Due for payment 2026-03-30] Tax -Tax menu item is empty when Taxes are enabled after creating expense #85729
Version Number: 9.3.40-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#78472 Email or phone of affected tester (no customers):sdjoidjossdoisnjs@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Create a workspace.
Go to workspace chat.
Create an expense.
Go to workspace settings > More features.
Enable Taxes.
Open the expense from Step 4.
Click Tax field.
Expected Result:
Tax menu item will show Default tax (0%).
Actual Result:
Tax menu item is empty, when Default tax (0%) is selected.
👋 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: #78472 - "Improve deleted tax behavior" by @huult (High confidence) Related Issues: #73033 (original issue that PR 78472 was fixing)
Recommendation: REVERT
PR #78472 introduced a regression that causes the tax field to be empty when taxes are enabled after an expense is created. Reverting this PR will restore the previous behavior where the default tax is shown correctly.
Labels: Removed DeployBlocker label (this is a frontend bug caused by an App PR, so only DeployBlockerCash should block the App deploy).
📋 Detailed Analysis
Evidence
The bug occurs specifically in the scenario outlined in the issue:
Create an expense BEFORE enabling taxes on a workspace
Enable taxes on the workspace
View the expense - the tax field shows empty instead of "Default tax (0%)"
PR #78472 was intended to improve the handling of deleted/modified tax rates, but it introduced a regression in how expenses without a taxCode are displayed.
Verification
I verified that PR #78472 modified the exact file and logic responsible for displaying the tax field:
The new code checks if (taxCode) before calling getTaxName(). When an expense is created before taxes are enabled:
The taxCode field is empty/undefined (because taxes were not enabled at creation time)
The new conditional returns an empty string '' without calling getTaxName()
The getTaxName() function has internal logic to fall back to defaultTaxCode when transaction?.taxCode is empty (see src/libs/TransactionUtils/index.ts line 2168)
By skipping the getTaxName() call, the code never retrieves the default tax that should be shown
The old code always called getTaxName(), which correctly handled the case where taxCode is empty by falling back to the default tax code from the policy.
Impact: This affects any expense created before taxes are enabled on a workspace. When viewing such expenses after enabling taxes, users see an empty tax field instead of the default tax rate.
Please re-state the problem that we are trying to solve in this issue.
When an expense is created before the Taxes feature is enabled on a workspace, opening that expense and viewing the Tax field shows it as empty instead of displaying the default tax rate (e.g., "Default tax (0%)").
What is the root cause of that problem?
PR #78472 ("Improve deleted tax behavior") introduced a guard in MoneyRequestView.tsx that skips calling getTaxName() when the transaction has no taxCode:
// Before (always called getTaxName, which fell back to the policy's default tax):
const taxRateTitle = updatedTransaction
? getTaxName(policy, updatedTransaction, isExpenseUnreported)
: getTaxName(policy, transaction, isExpenseUnreported);
// After (returns empty string when taxCode is falsy):
const taxRateTitle = taxCode ? getTaxName(policy, baseTransaction, isExpenseUnreported) : '';
For expenses created before taxes were enabled, taxCode is undefined. Previously, getTaxName() handled this gracefully — it uses transaction?.taxCode || defaultTaxCode internally (TransactionUtils/index.ts:2168), which falls back to the policy's default tax code and returns the correct display name.
After the change, taxRateTitle is set to '' (empty string). The display fallback chain transaction?.taxName ?? taxRateTitle ?? fallbackTaxRateTitle uses the nullish coalescing operator (??), which treats '' as a valid value and stops there — so the field renders blank.
What changes do you think we should make in order to solve the problem?
In src/components/ReportActionItem/MoneyRequestView.tsx, remove the taxCode guard so getTaxName() is always called (restoring the original behavior for this line), while keeping the rest of the deleted-tax improvements from the PR intact:
This restores the fallback to the policy's default tax name for transactions without a taxCode, while the hasTaxValueChanged logic (which also depends on taxCode) continues to handle the deleted-tax scenario correctly.
What alternative solutions did you explore? (Optional)
An alternative would be to change the empty string '' to undefined so the nullish coalescing chain falls through to fallbackTaxRateTitle. However, fallbackTaxRateTitle is transaction?.taxValue, which is also undefined for pre-tax transactions — so the field would still end up blank. Calling getTaxName() unconditionally is the correct fix since it already has built-in fallback logic for missing taxCode.
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.
changed the title [-]Tax -Tax menu item is empty when Taxes are enabled after creating expense[/-][+][Due for payment 2026-03-30] Tax -Tax menu item is empty when Taxes are enabled after creating expense[/+]on Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@huult / @thesahindia The PR fixing this issue has been merged! 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]
changed the title [-][Due for payment 2026-03-30] Tax -Tax menu item is empty when Taxes are enabled after creating expense[/-][+][Due for payment 2026-04-01] [Due for payment 2026-03-30] Tax -Tax menu item is empty when Taxes are enabled after creating expense[/+]on Mar 25, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.43-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@huult / @thesahindia@mallenexpensify The PR fixing this issue has been merged! 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]
Activity
melvin-bot commentedon Mar 19, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #78472
melvin-bot commentedon Mar 19, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Mar 19, 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 19, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #78472 - "Improve deleted tax behavior" by @huult (High confidence)
Related Issues: #73033 (original issue that PR 78472 was fixing)
Recommendation: REVERT
PR #78472 introduced a regression that causes the tax field to be empty when taxes are enabled after an expense is created. Reverting this PR will restore the previous behavior where the default tax is shown correctly.
Labels: Removed
DeployBlockerlabel (this is a frontend bug caused by an App PR, so onlyDeployBlockerCashshould block the App deploy).📋 Detailed Analysis
Evidence
The bug occurs specifically in the scenario outlined in the issue:
PR #78472 was intended to improve the handling of deleted/modified tax rates, but it introduced a regression in how expenses without a
taxCodeare displayed.Verification
I verified that PR #78472 modified the exact file and logic responsible for displaying the tax field:
File:
src/components/ReportActionItem/MoneyRequestView.tsxBefore PR #78472 (line ~308):
After PR #78472 (lines 310-313):
Root Cause
The new code checks
if (taxCode)before callinggetTaxName(). When an expense is created before taxes are enabled:taxCodefield is empty/undefined (because taxes were not enabled at creation time)''without callinggetTaxName()getTaxName()function has internal logic to fall back todefaultTaxCodewhentransaction?.taxCodeis empty (seesrc/libs/TransactionUtils/index.tsline 2168)getTaxName()call, the code never retrieves the default tax that should be shownThe old code always called
getTaxName(), which correctly handled the case wheretaxCodeis empty by falling back to the default tax code from the policy.Impact: This affects any expense created before taxes are enabled on a workspace. When viewing such expenses after enabling taxes, users see an empty tax field instead of the default tax rate.
MelvinBot commentedon Mar 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an expense is created before the Taxes feature is enabled on a workspace, opening that expense and viewing the Tax field shows it as empty instead of displaying the default tax rate (e.g., "Default tax (0%)").
What is the root cause of that problem?
PR #78472 ("Improve deleted tax behavior") introduced a guard in
MoneyRequestView.tsxthat skips callinggetTaxName()when the transaction has notaxCode:For expenses created before taxes were enabled,
taxCodeisundefined. Previously,getTaxName()handled this gracefully — it usestransaction?.taxCode || defaultTaxCodeinternally (TransactionUtils/index.ts:2168), which falls back to the policy's default tax code and returns the correct display name.After the change,
taxRateTitleis set to''(empty string). The display fallback chaintransaction?.taxName ?? taxRateTitle ?? fallbackTaxRateTitleuses the nullish coalescing operator (??), which treats''as a valid value and stops there — so the field renders blank.What changes do you think we should make in order to solve the problem?
In
src/components/ReportActionItem/MoneyRequestView.tsx, remove thetaxCodeguard sogetTaxName()is always called (restoring the original behavior for this line), while keeping the rest of the deleted-tax improvements from the PR intact:Change the
taxRateTitlecomputation from:to:
This restores the fallback to the policy's default tax name for transactions without a
taxCode, while thehasTaxValueChangedlogic (which also depends ontaxCode) continues to handle the deleted-tax scenario correctly.What alternative solutions did you explore? (Optional)
An alternative would be to change the empty string
''toundefinedso the nullish coalescing chain falls through tofallbackTaxRateTitle. However,fallbackTaxRateTitleistransaction?.taxValue, which is alsoundefinedfor pre-tax transactions — so the field would still end up blank. CallinggetTaxName()unconditionally is the correct fix since it already has built-in fallback logic for missingtaxCode.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.9 remaining items
[-]Tax -Tax menu item is empty when Taxes are enabled after creating expense[/-][+][Due for payment 2026-03-30] Tax -Tax menu item is empty when Taxes are enabled after creating expense[/+]melvin-bot commentedon Mar 23, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 23, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 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-03-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 23, 2026
@huult / @thesahindia The PR fixing this issue has been merged! 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]
melvin-bot commentedon Mar 23, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)[-][Due for payment 2026-03-30] Tax -Tax menu item is empty when Taxes are enabled after creating expense[/-][+][Due for payment 2026-04-01] [Due for payment 2026-03-30] Tax -Tax menu item is empty when Taxes are enabled after creating expense[/+]melvin-bot commentedon Mar 25, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.43-3 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-04-01. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 25, 2026
@huult / @thesahindia @mallenexpensify The PR fixing this issue has been merged! 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]
mallenexpensify commentedon Mar 30, 2026
Commented on issue linked to offending PR