Skip to content

A local-first personal finance app

[bugfix] Include split transactions in select-all (#5086)

Will Garrison649932b42ffc
diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsx
index 27b57b0924..72eb8d2dc8 100644
--- a/packages/desktop-client/src/components/accounts/Account.tsx
+++ b/packages/desktop-client/src/components/accounts/Account.tsx
@@ -1713,6 +1713,14 @@ class AccountInternal extends PureComponent<
const balanceQuery = this.getBalanceQuery(accountId);
+ const selectAllFilter = (item: TransactionEntity): boolean => {
+ if (item.is_parent) {
+ const children = transactions.filter(t => t.parent_id === item.id);
+ return children.every(t => selectAllFilter(t));
+ }
+ return !item._unmatched;
+ };
+
return (
<AllTransactions
account={account}
@@ -1727,7 +1735,7 @@ class AccountInternal extends PureComponent<
items={allTransactions}
fetchAllIds={this.fetchAllIds}
registerDispatch={dispatch => (this.dispatchSelected = dispatch)}
- selectAllFilter={item => !item._unmatched && !item.is_parent}
+ selectAllFilter={selectAllFilter}
>
<View style={styles.page}>
<AccountHeader
diff --git a/upcoming-release-notes/5086.md b/upcoming-release-notes/5086.md
new file mode 100644
index 0000000000..f5115ff0e5
--- /dev/null
+++ b/upcoming-release-notes/5086.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [VVill-ga]
+---
+
+Include split transactions in select-all actions when all of their children should be selected.