[PR #2059] [MERGED] Add rules with splits #30014

Closed
opened 2026-04-18 06:28:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2059
Author: @jfdoming
Created: 12/10/2023
Status: Merged
Merged: 2/8/2024
Merged by: @youngcw

Base: masterHead: jfdoming/add-splits-to-rules


📝 Commits (10+)

  • 9186018 Add split creation UI to rule creation modal
  • 75b08d7 Support applying splits when rules execute
  • 4d0b27e fix: deserialize transaction before running rules
  • 2b8a74b Add release notes
  • 2991bfa Fix missing types pulled in from master
  • 7dec727 PR feedback: use getActions
  • fa4d410 PR feedback: use flatMap
  • 9fc68e6 Fix action deletion
  • 36a6a31 Don't flicker upon split deletion
  • 90ca118 Let users specify parent transaction actions (e.g. linking schedules)

📊 Changes

19 files changed (+565 additions, -112 deletions)

View changed files

📝 packages/desktop-client/src/components/modals/EditRule.jsx (+288 -67)
📝 packages/desktop-client/src/components/settings/Experimental.tsx (+1 -0)
📝 packages/desktop-client/src/components/spreadsheet/CellValue.tsx (+2 -2)
📝 packages/desktop-client/src/components/spreadsheet/useFormat.ts (+8 -2)
📝 packages/desktop-client/src/components/table.tsx (+2 -2)
📝 packages/desktop-client/src/components/transactions/MobileTransaction.jsx (+10 -6)
📝 packages/desktop-client/src/components/transactions/TransactionsTable.jsx (+23 -7)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+1 -0)
📝 packages/loot-core/src/server/accounts/rules.ts (+168 -7)
📝 packages/loot-core/src/server/accounts/sync.ts (+8 -4)
📝 packages/loot-core/src/server/accounts/transaction-rules.ts (+6 -8)
📝 packages/loot-core/src/server/rules/app.ts (+2 -2)
📝 packages/loot-core/src/server/rules/types/handlers.ts (+1 -1)
📝 packages/loot-core/src/shared/rules.ts (+23 -0)
📝 packages/loot-core/src/shared/schedules.ts (+1 -1)
📝 packages/loot-core/src/shared/transactions.ts (+1 -1)
📝 packages/loot-core/src/types/models/rule.d.ts (+12 -1)
📝 packages/loot-core/src/types/prefs.d.ts (+2 -1)
upcoming-release-notes/2059.md (+6 -0)

📄 Description

Closes #1168

This PR adds the ability to automatically split transactions from rules. Features:

  • Add splits to a rule with per-split actions like category, note, etc.
  • Run rules-with-splits when normal rules would apply.
  • Working mobile view

Not yet implemented (WIP):

  • Display splits on rules page
  • Display split transactions post-rule-application in rule editor

Previews:
image

image image

🔄 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/2059 **Author:** [@jfdoming](https://github.com/jfdoming) **Created:** 12/10/2023 **Status:** ✅ Merged **Merged:** 2/8/2024 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `jfdoming/add-splits-to-rules` --- ### 📝 Commits (10+) - [`9186018`](https://github.com/actualbudget/actual/commit/918601896ebb21fa418094d5515a4394eceae119) Add split creation UI to rule creation modal - [`75b08d7`](https://github.com/actualbudget/actual/commit/75b08d719bc853c46d0946b63ddc2b4788aee1ff) Support applying splits when rules execute - [`4d0b27e`](https://github.com/actualbudget/actual/commit/4d0b27eb1a98a682d7e891eaaeb3385cb570ef22) fix: deserialize transaction before running rules - [`2b8a74b`](https://github.com/actualbudget/actual/commit/2b8a74bf66fe84db26e6dcb8fa4e07a9a5f6e9ee) Add release notes - [`2991bfa`](https://github.com/actualbudget/actual/commit/2991bfaf92c37bb5f754e528a78a42a422e4d236) Fix missing types pulled in from master - [`7dec727`](https://github.com/actualbudget/actual/commit/7dec7277d0e4371bb4ecca1c1b0bdca0d0130171) PR feedback: use `getActions` - [`fa4d410`](https://github.com/actualbudget/actual/commit/fa4d410e1374c0403d144f7cf3d23c1882c463b4) PR feedback: use `flatMap` - [`9fc68e6`](https://github.com/actualbudget/actual/commit/9fc68e6d29ed1fda29540f8b9fddcd10c253d20a) Fix action deletion - [`36a6a31`](https://github.com/actualbudget/actual/commit/36a6a311cfcafc1292fbe475657d018fe1163deb) Don't flicker upon split deletion - [`90ca118`](https://github.com/actualbudget/actual/commit/90ca11847c42f7ea743a7911c87b7c64a0c5732f) Let users specify parent transaction actions (e.g. linking schedules) ### 📊 Changes **19 files changed** (+565 additions, -112 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/modals/EditRule.jsx` (+288 -67) 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+1 -0) 📝 `packages/desktop-client/src/components/spreadsheet/CellValue.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/spreadsheet/useFormat.ts` (+8 -2) 📝 `packages/desktop-client/src/components/table.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/transactions/MobileTransaction.jsx` (+10 -6) 📝 `packages/desktop-client/src/components/transactions/TransactionsTable.jsx` (+23 -7) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+1 -0) 📝 `packages/loot-core/src/server/accounts/rules.ts` (+168 -7) 📝 `packages/loot-core/src/server/accounts/sync.ts` (+8 -4) 📝 `packages/loot-core/src/server/accounts/transaction-rules.ts` (+6 -8) 📝 `packages/loot-core/src/server/rules/app.ts` (+2 -2) 📝 `packages/loot-core/src/server/rules/types/handlers.ts` (+1 -1) 📝 `packages/loot-core/src/shared/rules.ts` (+23 -0) 📝 `packages/loot-core/src/shared/schedules.ts` (+1 -1) 📝 `packages/loot-core/src/shared/transactions.ts` (+1 -1) 📝 `packages/loot-core/src/types/models/rule.d.ts` (+12 -1) 📝 `packages/loot-core/src/types/prefs.d.ts` (+2 -1) ➕ `upcoming-release-notes/2059.md` (+6 -0) </details> ### 📄 Description Closes #1168 This PR adds the ability to automatically split transactions from rules. Features: - Add splits to a rule with per-split actions like category, note, etc. - Run rules-with-splits when normal rules would apply. - Working mobile view Not yet implemented (WIP): - Display splits on rules page - Display split transactions post-rule-application in rule editor Previews: <img width="293" alt="image" src="https://github.com/actualbudget/actual/assets/9922514/92c01f62-a1ce-40ec-9f7e-8b04c4063b41"> <img width="237" alt="image" src="https://github.com/actualbudget/actual/assets/9922514/336c5f92-d7cb-4124-81cf-7f266277226a"> <img width="229" alt="image" src="https://github.com/actualbudget/actual/assets/9922514/bf2f197f-5d38-4035-a0b1-6c05a18a2d42"> --- <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-18 06:28:06 -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#30014