[GH-ISSUE #5231] [Bug]: When update specific transfer transaction by id, the opposing account's transaction is updated as well #99640

Closed
opened 2026-05-29 16:08:30 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @ngoc-minh-do on GitHub (Jun 24, 2025).
Original GitHub issue: https://github.com/actualbudget/actual/issues/5231

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

I'm trying to update the notes of transfer transactions using the code below (Because the transfer was created automatically when I import the transaction using api.importTransactions(), so the note is inherited from there).
I want to update the notes with original notes from bank provider.

For example:
Bank A transfer transaction notes: "From bank B"
Bank B transfer transaction notes: "To bank A"

Code Snippet:

(async () => {
  try {
    await actualBudgetUtils.init();
    await api.downloadBudget(constants.ACTUAL_SYNC_ID);
    const startDate = moment('2020-01-01').format('YYYY-MM-DD');
    const endDate = moment().format('YYYY-MM-DD');
    const newNotes = 'Imported from Actual Budget';
    const newImportedPayee = 'Actual Budget Import';

    const accounts = (await api.getAccounts()) as APIAccountEntity[];
    for (const account of accounts) {
      const transferTransactions = (
        (await api.getTransactions(account.id, startDate, endDate)) as TransactionEntity[]
      ).filter((tx) => tx.transfer_id);

      for (const transferTransaction of transferTransactions) {
        await api.updateTransaction(transferTransaction.id, {
          notes: newNotes,
          imported_payee: newImportedPayee,
        } as Partial<TransactionEntity>);
      }
    }
  } catch (e) {
    console.trace(e);
  } finally {
    await api.shutdown();
  }
})();

What I Expected:
Bank A transfer transaction notes: "From bank B"
Bank B transfer transaction notes: "To bank A"

What Actually Happened:
Both transfer transaction in Bank A and B have the same notes

Troubleshooting Attempts:
I tried reading through the API source code to understand the issue, but I couldn't identify what I might be doing wrong.

Thank you in advance!

How can we reproduce the issue?

Using the code in the description.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Microsoft Edge

Operating System

Linux

Originally created by @ngoc-minh-do on GitHub (Jun 24, 2025). Original GitHub issue: https://github.com/actualbudget/actual/issues/5231 ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? I'm trying to update the notes of transfer transactions using the code below (Because the transfer was created automatically when I import the transaction using `api.importTransactions()`, so the note is inherited from there). I want to update the notes with original notes from bank provider. For example: Bank A transfer transaction notes: "From bank B" Bank B transfer transaction notes: "To bank A" Code Snippet: ```ts (async () => { try { await actualBudgetUtils.init(); await api.downloadBudget(constants.ACTUAL_SYNC_ID); const startDate = moment('2020-01-01').format('YYYY-MM-DD'); const endDate = moment().format('YYYY-MM-DD'); const newNotes = 'Imported from Actual Budget'; const newImportedPayee = 'Actual Budget Import'; const accounts = (await api.getAccounts()) as APIAccountEntity[]; for (const account of accounts) { const transferTransactions = ( (await api.getTransactions(account.id, startDate, endDate)) as TransactionEntity[] ).filter((tx) => tx.transfer_id); for (const transferTransaction of transferTransactions) { await api.updateTransaction(transferTransaction.id, { notes: newNotes, imported_payee: newImportedPayee, } as Partial<TransactionEntity>); } } } catch (e) { console.trace(e); } finally { await api.shutdown(); } })(); ``` What I Expected: Bank A transfer transaction notes: "From bank B" Bank B transfer transaction notes: "To bank A" What Actually Happened: Both transfer transaction in Bank A and B have the same notes Troubleshooting Attempts: I tried reading through the API source code to understand the issue, but I couldn't identify what I might be doing wrong. Thank you in advance! ### How can we reproduce the issue? Using the code in the description. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Microsoft Edge ### Operating System Linux
GiteaMirror added the bugAPI labels 2026-05-29 16:08:30 -05:00
Author
Owner

@zdimension commented on GitHub (Apr 30, 2026):

Funny, on the contrary I discovered the fact that transfer transactions sync their notes and was glad that feature was there! There should be a setting for that so everyone can have the desired behavior.

<!-- gh-comment-id:4352863692 --> @zdimension commented on GitHub (Apr 30, 2026): Funny, on the contrary I discovered the fact that transfer transactions sync their notes and was glad that feature was there! There should be a setting for that so everyone can have the desired behavior.
Author
Owner

@Juulz commented on GitHub (Apr 30, 2026):

Not a bug. Transfer transactions show different account and payee when you look at them in All Accounts view. You'll see an arrow showing in which direction the money flowed. In a single account view they show the other account as payee. They are really ONE transaction and you can see both sides.

If you want to put in a note it might be: "Out of Bank A, Into Bank B" That would work for both sides.

Here's a screenshot. Money went out of Savings, into Checking. Arrows point the way, as do Account and Payee.

Image

You'll note that the ONE transaction to Walmart is only one-sided to you because you don't have control of the other side.
<!-- gh-comment-id:4354197945 --> @Juulz commented on GitHub (Apr 30, 2026): Not a bug. Transfer transactions show different account and payee when you look at them in All Accounts view. You'll see an arrow showing in which direction the money flowed. In a single account view they show the other account as payee. They are really ONE transaction and you can see both sides. If you want to put in a note it might be: "Out of Bank A, Into Bank B" That would work for both sides. Here's a screenshot. Money went out of Savings, into Checking. Arrows point the way, as do Account and Payee. <img width="686" height="124" alt="Image" src="https://github.com/user-attachments/assets/d6437f35-02d9-4b64-8a7f-d3e3a9c708e7" /> </br></br> You'll note that the ONE transaction to Walmart is only one-sided to you because you don't have control of the other side.
Author
Owner

@youngcw commented on GitHub (Apr 30, 2026):

Juulz is correct. This is the same behaviour as the GUI. Feel free to open a feature request if there isn't one already for diffdrent notes on transfers.

<!-- gh-comment-id:4354317710 --> @youngcw commented on GitHub (Apr 30, 2026): Juulz is correct. This is the same behaviour as the GUI. Feel free to open a feature request if there isn't one already for diffdrent notes on transfers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#99640