[PR #6382] 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 #6479

Closed
opened 2026-02-28 21:28:57 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6382

State: closed
Merged: No


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.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6382 **State:** closed **Merged:** No --- 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 -->
GiteaMirror added the pull-request label 2026-02-28 21:28:57 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6479