Skip to content

A local-first personal finance app

🐛 [Bug] fixed bug in Accounts.tsx for applying rules that split transactions (#4623)

Alec Bakholdin00ff2e25224d
diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsx
index 5e82c26780..057ed0aee7 100644
--- a/packages/desktop-client/src/components/accounts/Account.tsx
+++ b/packages/desktop-client/src/components/accounts/Account.tsx
@@ -744,13 +744,13 @@ class AccountInternal extends PureComponent<
const transactions = this.state.transactions.filter(trans =>
ids.includes(trans.id),
);
- const changedTransactions = [];
+ const changedTransactions: TransactionEntity[] = [];
for (const transaction of transactions) {
const res: TransactionEntity | null = await send('rules-run', {
transaction,
});
if (res) {
- changedTransactions.push(res);
+ changedTransactions.push(...ungroupTransaction(res));
}
}
diff --git a/upcoming-release-notes/4623.md b/upcoming-release-notes/4623.md
new file mode 100644
index 0000000000..bc432b5843
--- /dev/null
+++ b/upcoming-release-notes/4623.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [alec-bakholdin]
+---
+
+Fixed issue with rules that create split transactions in the account view