-
- Downloads
Add rules with splits (#2059)
* Add split creation UI to rule creation modal * Support applying splits when rules execute * fix: deserialize transaction before running rules According to how rules are run in other places in the app, we should be supplying a "deserialized" (i.e., integer-for-amount and ISO date) transaction rather than a "serialized" (amount-plus-formatted-date) one. This fixes a crash in how split transactions are applied, as well as date-based rules not applying correctly previously (any rule with a date condition would never match on mobile). * Add release notes * Fix missing types pulled in from master * PR feedback: use `getActions` * PR feedback: use `flatMap` * Fix action deletion * Don't flicker upon split deletion * Let users specify parent transaction actions (e.g. linking schedules) * Support empty splits * Revert adding `no-op` action type * Support splits by percent * Fix types * Fix crash on transactions page when posting a transaction The crash would probably have occurred in other places too with auto-posting schedules :/ * Fix a bug where schedules wouldn't be marked as completed This was because the query that we previously used didn't select parent transactions, so no transaction was marked as being scheduled (since only parent transactions have schedule IDs). * Add feature flag * Limit set actions within splits to fewer fields * Fix merge conflict * Don't run split rules if feature is disabled * Fix percent-based splits not applying * Fix crash when editing parent transaction amount * Auto-format * Attempt to fix failing tests * More test/bug fixes * Add an extra split at the end if there is a remaining amount * Make sure split has correct values for dynamic remainder * Remove extraneous console.log
Showing
- packages/desktop-client/src/components/modals/EditRule.jsx 288 additions, 67 deletionspackages/desktop-client/src/components/modals/EditRule.jsx
- packages/desktop-client/src/components/settings/Experimental.tsx 1 addition, 0 deletions...s/desktop-client/src/components/settings/Experimental.tsx
- packages/desktop-client/src/components/spreadsheet/CellValue.tsx 2 additions, 2 deletions...s/desktop-client/src/components/spreadsheet/CellValue.tsx
- packages/desktop-client/src/components/spreadsheet/useFormat.ts 8 additions, 2 deletions...es/desktop-client/src/components/spreadsheet/useFormat.ts
- packages/desktop-client/src/components/table.tsx 2 additions, 2 deletionspackages/desktop-client/src/components/table.tsx
- packages/desktop-client/src/components/transactions/MobileTransaction.jsx 10 additions, 6 deletions...-client/src/components/transactions/MobileTransaction.jsx
- packages/desktop-client/src/components/transactions/TransactionsTable.jsx 23 additions, 7 deletions...-client/src/components/transactions/TransactionsTable.jsx
- packages/desktop-client/src/hooks/useFeatureFlag.ts 1 addition, 0 deletionspackages/desktop-client/src/hooks/useFeatureFlag.ts
- packages/loot-core/src/server/accounts/rules.ts 168 additions, 7 deletionspackages/loot-core/src/server/accounts/rules.ts
- packages/loot-core/src/server/accounts/sync.ts 8 additions, 4 deletionspackages/loot-core/src/server/accounts/sync.ts
- packages/loot-core/src/server/accounts/transaction-rules.ts 6 additions, 8 deletionspackages/loot-core/src/server/accounts/transaction-rules.ts
- packages/loot-core/src/server/rules/app.ts 2 additions, 2 deletionspackages/loot-core/src/server/rules/app.ts
- packages/loot-core/src/server/rules/types/handlers.ts 1 addition, 1 deletionpackages/loot-core/src/server/rules/types/handlers.ts
- packages/loot-core/src/shared/rules.ts 23 additions, 0 deletionspackages/loot-core/src/shared/rules.ts
- packages/loot-core/src/shared/schedules.ts 1 addition, 1 deletionpackages/loot-core/src/shared/schedules.ts
- packages/loot-core/src/shared/transactions.ts 1 addition, 1 deletionpackages/loot-core/src/shared/transactions.ts
- packages/loot-core/src/types/models/rule.d.ts 12 additions, 1 deletionpackages/loot-core/src/types/models/rule.d.ts
- packages/loot-core/src/types/prefs.d.ts 2 additions, 1 deletionpackages/loot-core/src/types/prefs.d.ts
- upcoming-release-notes/2059.md 6 additions, 0 deletionsupcoming-release-notes/2059.md
Loading
Please register or sign in to comment