diff --git a/packages/desktop-client/src/components/modals/EditRule.jsx b/packages/desktop-client/src/components/modals/EditRule.jsx index ce34999b62a910fa1b8179753aeaf5bb92699a49..54b76c2cf589584ff4af7fa337fbb220f0215f47 100644 --- a/packages/desktop-client/src/components/modals/EditRule.jsx +++ b/packages/desktop-client/src/components/modals/EditRule.jsx @@ -1020,7 +1020,7 @@ export function EditRule({ modalProps, defaultRule, onSave: originalOnSave }) { }} > {splitIndex === 0 - ? 'Before split' + ? 'Apply to all' : `Split ${splitIndex}`} </Text> {splitIndex && ( diff --git a/packages/desktop-client/src/components/rules/RuleRow.tsx b/packages/desktop-client/src/components/rules/RuleRow.tsx index 4af4d31050c8f36a5ab30dc60ce0e2f75a03f16f..6548e8fd5d789b98c755247133706d120856c67d 100644 --- a/packages/desktop-client/src/components/rules/RuleRow.tsx +++ b/packages/desktop-client/src/components/rules/RuleRow.tsx @@ -139,7 +139,7 @@ export const RuleRow = memo( marginBottom: 6, }} > - {i ? `Split ${i}` : 'Before split'} + {i ? `Split ${i}` : 'Apply to all'} </Text> {split.actions.map((action, j) => ( <ActionExpression diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx b/packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx index d06dbd2fd80e2fc722d77bebe9edff1f7c3a0be9..0758138833bdd2c97915c87561e856639435a070 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx @@ -861,6 +861,7 @@ describe('Transactions', () => { { account: accounts[0].id, amount: -1000, + category: null, cleared: false, date: '2017-01-01', error: null, @@ -874,6 +875,7 @@ describe('Transactions', () => { { account: accounts[0].id, amount: -1777, + category: null, cleared: false, date: '2017-01-01', error: null, diff --git a/packages/loot-core/src/server/accounts/rules.ts b/packages/loot-core/src/server/accounts/rules.ts index 68f0d67bffb609decc1bc4a856c53d63e7ff6a1a..ab7ccd11d363127d937185c41c0a815600a98307 100644 --- a/packages/loot-core/src/server/accounts/rules.ts +++ b/packages/loot-core/src/server/accounts/rules.ts @@ -622,7 +622,7 @@ export function execActions(actions: Action[], transaction) { } } - // The split index 0 is reserved for "Before split" actions. + // The split index 0 is reserved for "Apply to all" actions. // Remove that entry from the subtransactions. update.subtransactions = update.subtransactions.slice(1); diff --git a/packages/loot-core/src/shared/transactions.ts b/packages/loot-core/src/shared/transactions.ts index c4f868725b9d2415717554a357c32ca31c19afec..ac3b7356d50249c41262b96a138b8a6512c282da 100644 --- a/packages/loot-core/src/shared/transactions.ts +++ b/packages/loot-core/src/shared/transactions.ts @@ -49,6 +49,7 @@ export function makeChild<T extends GenericTransactionEntity>( return { amount: 0, ...data, + category: 'category' in data ? data.category : parent.category, payee: 'payee' in data ? data.payee : parent.payee, id: 'id' in data ? data.id : prefix + uuidv4(), account: parent.account, diff --git a/upcoming-release-notes/2651.md b/upcoming-release-notes/2651.md new file mode 100644 index 0000000000000000000000000000000000000000..9c642480cacff07bebb72991beb20b766827932c --- /dev/null +++ b/upcoming-release-notes/2651.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [jfdoming] +--- + +Make the 'Apply to all' section (fka 'Before split') of rule splits more intuitive