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
"no longer valid" appears on 1st level tag when 2nd level tag is applied with expense rule #82464
Version Number: 9.3.19-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:#81454 Email or phone of affected tester (no customers):josdijosdjodniosnjd@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:
Precondition:
Default workspace has dependent multi level tags.
Go to staging.new.expensify.com
Go to Account > Expense rules.
Click New rule.
Create a new rule where if merchant contains Apple, Region (second level tag) will change to South.
Go to workspace chat.
Create an expense with Apple as merchant.
Open the expense report.
Expected Result:
"State no longer valid" violation will not appear on the first level tag.
Actual Result:
"State no longer valid" violation appears on the first level tag when second level tag is applied via expense rule.
👋 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: #81454 - "feat: rule - support multilevel tags" by @situchan (High confidence) Related Issues: #81094 (original feature request)
Recommendation: REVERT
PR #81454 should be reverted from staging. The PR introduced support for multilevel tags in expense rules but has a critical bug with dependent tag validation.
Labels: Keeping DeployBlockerCash (App deploy blocked), removing DeployBlocker if present (not a backend issue)
📋 Detailed Analysis
Evidence
PR #81454 was merged on 2026-02-13 at 12:57:01Z and is included in the staging deploy checklist (9.3.19-1). The issue was reported shortly after on staging, confirming the timeline matches.
The PR changed how tags are handled in expense rules:
Before: Rules could only set a single tag value for all tag levels
After: Rules can now set individual values for each tag level independently
Verification
The PR modifies key files related to tag handling in rules:
src/pages/settings/Rules/Fields/AddTagPage.tsx - Changed to handle individual tag levels using orderWeight parameter
src/pages/workspace/rules/MerchantRules/AddTagPage.tsx - Same change for merchant rules
src/libs/TagUtils.ts - Added trimTag() function to handle colon-delimited multi-level tags
src/libs/TransactionUtils/index.ts - Uses getTagArrayFromName() to split tags by colons
Root Cause
The bug occurs when a rule applies only a second-level tag (e.g., "Region") in a dependent multi-level tag system:
User creates a rule: "If merchant contains Apple, set Region = South"
Rule is applied, setting tag to something like :South (first level empty, second level set)
Validation logic in ViolationsUtils.ts (specifically getTagViolationForIndependentTags at lines 142-158) checks each tag level independently
First-level tag ("State") is found to be missing/invalid
System creates TAG_OUT_OF_POLICY violation showing "State no longer valid"
The issue is that dependent tags require parent tags to be set first, but the rule allows setting child tags independently without validating the parent requirement. The PR correctly implemented multilevel tag selection in rules UI but did not account for dependent tag validation rules.
Why Revert?
This affects a core workflow (expense rules with dependent tags)
The fix requires understanding the complex interplay between:
Tag dependency validation
Rule application logic
Multi-level tag parsing
A proper fix needs to either:
Prevent rules from setting child tags without parents in dependent systems, OR
Skip violation checks for tags set by rules, OR
Apply parent tags automatically when child tags are set by rules
Rolling forward would require significant testing with dependent vs independent tag systems
Activity
melvin-bot commentedon Feb 13, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #81454
melvin-bot commentedon Feb 13, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 13, 2026
Triggered auto assignment to @heyjennahay (
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 Feb 13, 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 Feb 13, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #81454 - "feat: rule - support multilevel tags" by @situchan (High confidence)
Related Issues: #81094 (original feature request)
Recommendation: REVERT
PR #81454 should be reverted from staging. The PR introduced support for multilevel tags in expense rules but has a critical bug with dependent tag validation.
Labels: Keeping
DeployBlockerCash(App deploy blocked), removingDeployBlockerif present (not a backend issue)📋 Detailed Analysis
Evidence
PR #81454 was merged on 2026-02-13 at 12:57:01Z and is included in the staging deploy checklist (9.3.19-1). The issue was reported shortly after on staging, confirming the timeline matches.
The PR changed how tags are handled in expense rules:
Verification
The PR modifies key files related to tag handling in rules:
src/pages/settings/Rules/Fields/AddTagPage.tsx- Changed to handle individual tag levels usingorderWeightparametersrc/pages/workspace/rules/MerchantRules/AddTagPage.tsx- Same change for merchant rulessrc/libs/TagUtils.ts- AddedtrimTag()function to handle colon-delimited multi-level tagssrc/libs/TransactionUtils/index.ts- UsesgetTagArrayFromName()to split tags by colonsRoot Cause
The bug occurs when a rule applies only a second-level tag (e.g., "Region") in a dependent multi-level tag system:
:South(first level empty, second level set)ViolationsUtils.ts(specificallygetTagViolationForIndependentTagsat lines 142-158) checks each tag level independentlyTAG_OUT_OF_POLICYviolation showing "State no longer valid"The issue is that dependent tags require parent tags to be set first, but the rule allows setting child tags independently without validating the parent requirement. The PR correctly implemented multilevel tag selection in rules UI but did not account for dependent tag validation rules.
Why Revert?
situchan commentedon Feb 13, 2026
checking
4 remaining items
IuliiaHerets commentedon Feb 16, 2026
@mountiny issue is still repro, Chrome / v9.3.19-4
Screen.Recording.2026-02-16.at.14.16.35.mp4
mountiny commentedon Feb 16, 2026
Testing the revert
m-natarajan commentedon Feb 16, 2026
Not repro but the tag set in rules is also not displayed and no violation appears, Windows 11 / Chrome
applee.mp4
situchan commentedon Feb 16, 2026
Looks like you tested with the account set with wrong rule before the fix PR.
m-natarajan commentedon Feb 16, 2026
Not repro, No multilevel tag option in Expense rules (Reverted). Wim 11/Chrome, 9.3.19-5
Recording.2398.mp4