[PR #6382] [CLOSED] fix(#6325): Disable 'oneOf', 'notOneOf' and 'hasTags' filters for filters of type Note, fix app crash when switching to / from 'oneOf' / 'notOneOf' ops and fix 'hasTags' filter #13534

Closed
opened 2026-04-10 21:57:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6382
Author: @ttlgeek
Created: 12/12/2025
Status: Closed

Base: masterHead: fix-6325


📝 Commits (10+)

  • 07ec342 fix(#6325): Disable 'oneOf', 'notOneOf' and 'hasTags' filters for filters of type Note
  • ff5c2ae [autofix.ci] apply automated fixes
  • 4f02fba fix(): rename release note file
  • 233a145 Merge branch 'master' into fix-6325
  • 56dd537 Merge branch 'master' into fix-6325
  • ad464c2 Merge branch 'master' into fix-6325
  • a491bd2 chore(): add comment
  • fbd9238 Merge branch 'master' into fix-6325
  • b568b01 fix(): fix 'hasTags' note filter
  • 89ff8e7 chore(): update release note

📊 Changes

9 files changed (+113 additions, -35 deletions)

View changed files

📝 packages/desktop-client/src/components/filters/updateFilterReducer.ts (+9 -0)
packages/loot-core/migrations/1766014688194_update_notes_oneof_notoneof_rules.js (+40 -0)
📝 packages/loot-core/src/server/migrate/migrations.ts (+2 -0)
📝 packages/loot-core/src/server/rules/condition.ts (+12 -2)
📝 packages/loot-core/src/server/rules/index.test.ts (+35 -18)
📝 packages/loot-core/src/server/transactions/transaction-rules.test.ts (+0 -5)
📝 packages/loot-core/src/server/transactions/transaction-rules.ts (+2 -9)
📝 packages/loot-core/src/shared/rules.ts (+7 -1)
upcoming-release-notes/6382.md (+6 -0)

📄 Description

Fixes #6325


Note

  • Disable multi-select on notes: notes now disallows oneOf/notOneOf in shared/rules.ts; tests updated accordingly
  • Data migration: Add 1766014688194_update_notes_oneof_notoneof_rules.js to convert notes oneOf conditions to lowercase matches with |-joined values; registered in migrate/migrations.ts
  • Fix hasTags behavior: Normalize input to canonical #tag tokens in rules/condition.ts, evaluate via some over tags, and generate robust regex in transactions/transaction-rules.ts
  • Prevent UI crash: In desktop-client updateFilterReducer.ts, ensure values are arrays when switching to oneOf/notOneOf and coerce from single values
  • Tests and docs: Update rule/indexing and transaction query tests; add release notes (upcoming-release-notes/6382.md)

Written by Cursor Bugbot for commit 03595d71a8. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • New Features

    • Enhanced tag matching with improved tag parsing and evaluation for better rule filtering.
  • Bug Fixes

    • Refined tag boundary detection in tag-based conditions for more accurate rule matching.
  • Chores

    • Removed oneOf and notOneOf operators from notes field rules.
    • Added automatic migration to convert existing note-based rules to updated format.
    • Updated filter handling to ensure consistent behavior with multi-select operations.

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/6382 **Author:** [@ttlgeek](https://github.com/ttlgeek) **Created:** 12/12/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-6325` --- ### 📝 Commits (10+) - [`07ec342`](https://github.com/actualbudget/actual/commit/07ec3421e81d94e9568793806cacae40f957d386) fix(#6325): Disable 'oneOf', 'notOneOf' and 'hasTags' filters for filters of type Note - [`ff5c2ae`](https://github.com/actualbudget/actual/commit/ff5c2aecd6c8d83dc857243982908e1585bfa62a) [autofix.ci] apply automated fixes - [`4f02fba`](https://github.com/actualbudget/actual/commit/4f02fba9b0ae7a3f17d0e35244d1c3350d4bcb6d) fix(): rename release note file - [`233a145`](https://github.com/actualbudget/actual/commit/233a145b6f6579413481153816ac766acfd2141c) Merge branch 'master' into fix-6325 - [`56dd537`](https://github.com/actualbudget/actual/commit/56dd537ace5b3a9dc70540b281ee4a4ec7ee1d0c) Merge branch 'master' into fix-6325 - [`ad464c2`](https://github.com/actualbudget/actual/commit/ad464c2de4ac2f459f9047d314d8d577399645ae) Merge branch 'master' into fix-6325 - [`a491bd2`](https://github.com/actualbudget/actual/commit/a491bd2b7fdd2213c55ce2454f53bc15add6ab65) chore(): add comment - [`fbd9238`](https://github.com/actualbudget/actual/commit/fbd923806722e95101bc14e3ef974256e5ea4da9) Merge branch 'master' into fix-6325 - [`b568b01`](https://github.com/actualbudget/actual/commit/b568b01bd7f9520165d634b757d786014a4a4ecd) fix(): fix 'hasTags' note filter - [`89ff8e7`](https://github.com/actualbudget/actual/commit/89ff8e7928383afd9ec82eab1dd12cf8dd5f13ac) chore(): update release note ### 📊 Changes **9 files changed** (+113 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/filters/updateFilterReducer.ts` (+9 -0) ➕ `packages/loot-core/migrations/1766014688194_update_notes_oneof_notoneof_rules.js` (+40 -0) 📝 `packages/loot-core/src/server/migrate/migrations.ts` (+2 -0) 📝 `packages/loot-core/src/server/rules/condition.ts` (+12 -2) 📝 `packages/loot-core/src/server/rules/index.test.ts` (+35 -18) 📝 `packages/loot-core/src/server/transactions/transaction-rules.test.ts` (+0 -5) 📝 `packages/loot-core/src/server/transactions/transaction-rules.ts` (+2 -9) 📝 `packages/loot-core/src/shared/rules.ts` (+7 -1) ➕ `upcoming-release-notes/6382.md` (+6 -0) </details> ### 📄 Description Fixes #6325 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > - **Disable multi-select on notes**: `notes` now disallows `oneOf`/`notOneOf` in `shared/rules.ts`; tests updated accordingly > - **Data migration**: Add `1766014688194_update_notes_oneof_notoneof_rules.js` to convert `notes` `oneOf` conditions to lowercase `matches` with `|`-joined values; registered in `migrate/migrations.ts` > - **Fix hasTags behavior**: Normalize input to canonical `#tag` tokens in `rules/condition.ts`, evaluate via `some` over tags, and generate robust regex in `transactions/transaction-rules.ts` > - **Prevent UI crash**: In `desktop-client` `updateFilterReducer.ts`, ensure values are arrays when switching to `oneOf`/`notOneOf` and coerce from single values > - **Tests and docs**: Update rule/indexing and transaction query tests; add release notes (`upcoming-release-notes/6382.md`) > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 03595d71a851f2de9981d0755035897d55c6f0f6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enhanced tag matching with improved tag parsing and evaluation for better rule filtering. * **Bug Fixes** * Refined tag boundary detection in tag-based conditions for more accurate rule matching. * **Chores** * Removed oneOf and notOneOf operators from notes field rules. * Added automatic migration to convert existing note-based rules to updated format. * Updated filter handling to ensure consistent behavior with multi-select operations. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-10 21:57:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#13534