[Bug]: Rules changing payee don't reflect on both account when creating transactions with API #2848

Open
opened 2026-02-28 20:30:34 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @simplynormal on GitHub (Jan 21, 2026).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

I created a rule that changes payee to another account. Let's assume there's a rule that matches records from account A, then change the payee to account B.

When I added a transaction that matches that rule via API, specifically using actual-http-api, there's only one record in account A. Example of transaction request:

{
    "transaction": {
        "account": "899a617a-049b-4309-b66f-62b4921220bb",
        "amount": -12300,
        "date": "2026-01-21",
        "category": "e2132cd4-ad33-4449-a562-4dcf361ee8df",
        "cleared": true,
        "notes": "Some notes"
    }
}

In the UI it still shows payee pointing to account B. Navigating to account B there's no new record related to the rule, the balance is unchanged.

Expectation: There are 2 records shown both in account A and B, balance of both being updated correctly.

How can we reproduce the issue?

Create a rule that changes payee to account B when account is account A. Create a transaction via API with the above example request. Observe that only account A has a new record.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Chrome

Operating System

Mac OSX

Originally created by @simplynormal on GitHub (Jan 21, 2026). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? I created a rule that changes payee to another account. Let's assume there's a rule that matches records from account A, then change the payee to account B. When I added a transaction that matches that rule via API, specifically using [actual-http-api](https://github.com/jhonderson/actual-http-api), there's only one record in account A. Example of transaction request: ```json { "transaction": { "account": "899a617a-049b-4309-b66f-62b4921220bb", "amount": -12300, "date": "2026-01-21", "category": "e2132cd4-ad33-4449-a562-4dcf361ee8df", "cleared": true, "notes": "Some notes" } } ``` In the UI it still shows payee pointing to account B. Navigating to account B there's no new record related to the rule, the balance is unchanged. Expectation: There are 2 records shown both in account A and B, balance of both being updated correctly. ### How can we reproduce the issue? Create a rule that changes payee to account B when account is account A. Create a transaction via API with the above example request. Observe that only account A has a new record. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Chrome ### Operating System Mac OSX
GiteaMirror added the needs infobug labels 2026-02-28 20:30:34 -06:00
Author
Owner

@joel-jeremy commented on GitHub (Jan 21, 2026):

Have you encountered the issue when using the api node package directly? Or does it happen only when using the actual-http-api?

@joel-jeremy commented on GitHub (Jan 21, 2026): Have you encountered the issue when using the api node package directly? Or does it happen only when using the actual-http-api?
Author
Owner

@simplynormal commented on GitHub (Jan 22, 2026):

Have you encountered the issue when using the api node package directly? Or does it happen only when using the actual-http-api?

Yes, I've just tried with the node package and the result is the same

@simplynormal commented on GitHub (Jan 22, 2026): > Have you encountered the issue when using the api node package directly? Or does it happen only when using the actual-http-api? Yes, I've just tried with the node package and the result is the same
Author
Owner

@db-src commented on GitHub (Jan 22, 2026):

What function did you call? addTransactions does not run rules or other stuff, only importTransactions does:

importTransactions Adds multiple transactions at once, while going through the same process as importing a file or downloading transactions from a bank. In particular, all rules are run on the specified transactions before adding them. Use addTransactions instead for adding raw transactions without post-processing.

-- API Reference

So if you and the http API are using the latter, indeed rules and other 'triggers' will be bypassed.

@db-src commented on GitHub (Jan 22, 2026): What function did you call? `addTransactions` does not run rules or other stuff, only `importTransactions` does: > `importTransactions` Adds multiple transactions at once, while going through the same process as importing a file or downloading transactions from a bank. In particular, all rules are run on the specified transactions before adding them. Use `addTransactions` instead for adding raw transactions without post-processing. -- [API Reference](https://actualbudget.org/docs/api/reference#importtransactions) So if you and the http API are using the latter, indeed rules and other 'triggers' will be bypassed.
Author
Owner

@simplynormal commented on GitHub (Jan 23, 2026):

What function did you call? addTransactions does not run rules or other stuff, only importTransactions does:

importTransactions Adds multiple transactions at once, while going through the same process as importing a file or downloading transactions from a bank. In particular, all rules are run on the specified transactions before adding them. Use addTransactions instead for adding raw transactions without post-processing.

-- API Reference

So if you and the http API are using the latter, indeed rules and other 'triggers' will be bypassed.

I did use addTransactions. But if you said that it's supposed to not run rules then my result says otherwise.

Using the same example above, after adding the transactions, payee of record in account A is updated to account B. It's just that account B doesn't have the same record and its balance is unchanged

@simplynormal commented on GitHub (Jan 23, 2026): > What function did you call? `addTransactions` does not run rules or other stuff, only `importTransactions` does: > > > `importTransactions` Adds multiple transactions at once, while going through the same process as importing a file or downloading transactions from a bank. In particular, all rules are run on the specified transactions before adding them. Use `addTransactions` instead for adding raw transactions without post-processing. > > -- [API Reference](https://actualbudget.org/docs/api/reference#importtransactions) > > So if you and the http API are using the latter, indeed rules and other 'triggers' will be bypassed. I did use `addTransactions`. But if you said that it's supposed to not run rules then my result says otherwise. Using the same example above, after adding the transactions, payee of record in account A is updated to account B. It's just that account B doesn't have the same record and its balance is unchanged
Author
Owner

@simplynormal commented on GitHub (Jan 23, 2026):

Also I just tested with importTransactions and it does apply the rules correctly. This is what I needed, thanks for the help. Still, I'm leaving this issue open for the addTransactions applying rules partially discussion.

@simplynormal commented on GitHub (Jan 23, 2026): Also I just tested with `importTransactions` and it does apply the rules correctly. This is what I needed, thanks for the help. Still, I'm leaving this issue open for the `addTransactions` applying rules partially discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#2848