[GH-ISSUE #5221] [Bug]: Transfer Transaction Not Updated Despite Successful Execution #9159

Open
opened 2026-04-10 19:27:15 -05:00 by GiteaMirror · 3 comments
Owner

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

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). The code executes successfully (no errors), but some transaction does not get updated as expected.

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:
The transaction should be updated with the new information.

What Actually Happened:
The code runs without any exceptions or errors, but some transaction remains unchanged.

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.

Request for Help:
Could anyone help me figure out why the transaction is not being updated? Is there a limitation or condition for modifying transfer transactions that I might have missed?

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 22, 2025). Original GitHub issue: https://github.com/actualbudget/actual/issues/5221 ### 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). The code executes successfully (no errors), but some transaction does not get updated as expected. 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: The transaction should be updated with the new information. What Actually Happened: The code runs without any exceptions or errors, but some transaction remains unchanged. 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. Request for Help: Could anyone help me figure out why the transaction is not being updated? Is there a limitation or condition for modifying transfer transactions that I might have missed? 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 transactionsbugAPI labels 2026-04-10 19:27:16 -05:00
Author
Owner

@r1ch commented on GitHub (Aug 7, 2025):

Not necessarily helpful but have you tried adding an await api.sync() in there

(After await.updateTransaction())

<!-- gh-comment-id:3164554636 --> @r1ch commented on GitHub (Aug 7, 2025): Not necessarily helpful but have you tried adding an `await api.sync()` in there (After `await.updateTransaction()`)
Author
Owner

@ngoc-minh-do commented on GitHub (Aug 9, 2025):

@r1ch I remember trying that before, but it didn’t work.
At the time, I was migrating old transactions from another service into Actual and encountered this issue.
However, after a few retries, all the transactions were eventually imported successfully.

Since I’m no longer migrating transactions and it seems that no one else has reported this problem, it looks like this issue might have stalled.

<!-- gh-comment-id:3170459487 --> @ngoc-minh-do commented on GitHub (Aug 9, 2025): @r1ch I remember trying that before, but it didn’t work. At the time, I was migrating old transactions from another service into Actual and encountered this issue. However, after a few retries, all the transactions were eventually imported successfully. Since I’m no longer migrating transactions and it seems that no one else has reported this problem, it looks like this issue might have stalled.
Author
Owner

@joel-jeremy commented on GitHub (Sep 11, 2025):

@ngoc-minh-do Can you check if this is still an occurring issue? On current edge there was a PR merged regarding transfer transactions (https://github.com/actualbudget/actual/pull/5696)

<!-- gh-comment-id:3282148016 --> @joel-jeremy commented on GitHub (Sep 11, 2025): @ngoc-minh-do Can you check if this is still an occurring issue? On current edge there was a PR merged regarding transfer transactions (https://github.com/actualbudget/actual/pull/5696)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#9159