mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-22 00:13:45 -05:00
* Initial plan * Fix crash when switching filter from 'is' to 'one of' - Add logic to convert single values to arrays when switching to oneOf/notOneOf operators - Add comprehensive tests for the fix Co-authored-by: MatissJanis <886567+MatissJanis@users.noreply.github.com> * Add type assertions to fix TypeScript errors Co-authored-by: MatissJanis <886567+MatissJanis@users.noreply.github.com> * Keep first element when switching from 'one of' to 'is', use strict comparison - When switching from array operators (oneOf/notOneOf) to single-value operators (is/isNot), keep the first element instead of clearing - Use strict equality operators (=== instead of ==) - Add comprehensive tests for array-to-single conversion Co-authored-by: MatissJanis <886567+MatissJanis@users.noreply.github.com> * Add release notes for PR #6491 * Fix crash due to filter value conversion issue * Address PR feedback: remove notes test, preserve single values between operators - Remove test for notes field exclusion (issue #6325 handles notes separately) - Only clear values when converting FROM arrays, not between single-value operators - Add test to verify single values are preserved when switching between single-value operators (e.g., 'is' to 'contains') Co-authored-by: MatissJanis <886567+MatissJanis@users.noreply.github.com> * Update value handling in updateFilterReducer Handle value conversion for single-value operators and clear value for certain type switches. * Refactor value assignment for single-value operators * Refactor value assignment logic in updateFilterReducer Simplify the handling of value assignment for single-value operators by consolidating conditions. Ensure proper conversion between arrays and single values while maintaining type integrity. * Remove redundant array checks in updateFilterReducer tests --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MatissJanis <886567+MatissJanis@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>