Skip to content

A local-first personal finance app

Fixes #5674 mark transfer issue (#5696)

Nalin Guptad2cfedf5e43d
diff --git a/packages/desktop-client/src/hooks/useTransactionBatchActions.ts b/packages/desktop-client/src/hooks/useTransactionBatchActions.ts
index 15dd422968..8c5e9524b5 100644
--- a/packages/desktop-client/src/hooks/useTransactionBatchActions.ts
+++ b/packages/desktop-client/src/hooks/useTransactionBatchActions.ts
@@ -484,15 +484,18 @@ export function useTransactionBatchActions() {
updated: [
{
...fromTrans,
+ category: null,
payee: toPayee?.id,
transfer_id: toTrans.id,
},
{
...toTrans,
+ category: null,
payee: fromPayee?.id,
transfer_id: fromTrans.id,
},
],
+ runTransfers: false,
};
await send('transactions-batch-update', changes);
diff --git a/packages/loot-core/src/server/transactions/app.ts b/packages/loot-core/src/server/transactions/app.ts
index 28654fc573..b1cde8cfd1 100644
--- a/packages/loot-core/src/server/transactions/app.ts
+++ b/packages/loot-core/src/server/transactions/app.ts
@@ -33,12 +33,14 @@ async function handleBatchUpdateTransactions({
deleted,
updated,
learnCategories,
+ runTransfers = true,
}: Parameters<typeof batchUpdateTransactions>[0]) {
const result = await batchUpdateTransactions({
added,
updated,
deleted,
learnCategories,
+ runTransfers,
});
return result;
diff --git a/upcoming-release-notes/5696.md b/upcoming-release-notes/5696.md
new file mode 100644
index 0000000000..ba41e88640
--- /dev/null
+++ b/upcoming-release-notes/5696.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [Nalin-Gupta]
+---
+
+Fix issue where marking existing transactions as transfer switches the date and notes of the two transactions