[PR #6567] [MERGED] fix: disable oneOf and notOneOf operations for Notes filter #20969

Closed
opened 2026-04-14 21:50:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6567
Author: @majiayu000
Created: 1/6/2026
Status: Merged
Merged: 1/15/2026
Merged by: @matt-fidd

Base: masterHead: fix/6325-disable-oneof-notes-filter


📝 Commits (2)

  • 843ac68 fix: disable oneOf and notOneOf operations for Notes filter
  • c46db46 move note

📊 Changes

6 files changed (+90 additions, -26 deletions)

View changed files

📝 packages/loot-core/src/server/rules/index.test.ts (+24 -15)
📝 packages/loot-core/src/server/transactions/transaction-rules.test.ts (+2 -2)
packages/loot-core/src/shared/rules.test.ts (+56 -0)
📝 packages/loot-core/src/shared/rules.ts (+1 -1)
📝 packages/loot-core/src/types/models/rule.ts (+1 -8)
upcoming-release-notes/6567.md (+6 -0)

📄 Description

Summary

  • Fixes crash when changing Notes filter to "one of" or "not one of" operation
  • Notes field is a free-text field and shouldn't support these operations

Changes

  • Adds 'oneOf' and 'notOneOf' to disallowedOps for the notes field in rules.ts
  • Updates TypeScript type definitions in rule.ts to reflect this constraint
  • Updates existing tests to use imported_payee field for oneOf tests
  • Adds unit tests for isValidOp and getValidOps functions

Test Plan

  • Verified yarn typecheck passes
  • Verified yarn lint:fix passes
  • Verified yarn test passes
  • Added unit tests for the new behavior

Fixes #6325


🔄 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/6567 **Author:** [@majiayu000](https://github.com/majiayu000) **Created:** 1/6/2026 **Status:** ✅ Merged **Merged:** 1/15/2026 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `fix/6325-disable-oneof-notes-filter` --- ### 📝 Commits (2) - [`843ac68`](https://github.com/actualbudget/actual/commit/843ac681c014ec7700fa2736b728221610dd039f) fix: disable oneOf and notOneOf operations for Notes filter - [`c46db46`](https://github.com/actualbudget/actual/commit/c46db46fa3e0c35cd5c676901eae1bbe93ce039e) move note ### 📊 Changes **6 files changed** (+90 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/rules/index.test.ts` (+24 -15) 📝 `packages/loot-core/src/server/transactions/transaction-rules.test.ts` (+2 -2) ➕ `packages/loot-core/src/shared/rules.test.ts` (+56 -0) 📝 `packages/loot-core/src/shared/rules.ts` (+1 -1) 📝 `packages/loot-core/src/types/models/rule.ts` (+1 -8) ➕ `upcoming-release-notes/6567.md` (+6 -0) </details> ### 📄 Description ## Summary - Fixes crash when changing Notes filter to "one of" or "not one of" operation - Notes field is a free-text field and shouldn't support these operations ## Changes - Adds 'oneOf' and 'notOneOf' to disallowedOps for the notes field in `rules.ts` - Updates TypeScript type definitions in `rule.ts` to reflect this constraint - Updates existing tests to use `imported_payee` field for oneOf tests - Adds unit tests for `isValidOp` and `getValidOps` functions ## Test Plan - [x] Verified `yarn typecheck` passes - [x] Verified `yarn lint:fix` passes - [x] Verified `yarn test` passes - [x] Added unit tests for the new behavior Fixes #6325 --- <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-14 21:50:45 -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#20969