forked from actualbudget/actual
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rules with splits (actualbudget#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
- Loading branch information
Showing
19 changed files
with
565 additions
and
112 deletions.
There are no files selected for viewing
355 changes: 288 additions & 67 deletions
355
packages/desktop-client/src/components/modals/EditRule.jsx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.