actualbudget / actualbudget/actual

[Bug]: Importing via API silently matches with existing split transactions

Open
#4,805 5 comments 0 reactions 0 assignees View on GitHub
API transactions
Dominant language
TypeScript
Stars
28.7k
Forks
3k
Avg merge
2d 11h
Merged PRs (30d)
65

Description

### Verified issue does not already exist?

- [x] I have searched and found no existing issue

### What happened?

When importing with the Actual API, I see some transactions are randomly not imported. Looking through the source code, I noticed that some matching with existing transactions happens for non-bank-sync accounts (which have strict ID checking enabled). Notably, this matching also considers split transactions.

Example: I have a transaction worth `-18.00` with `imported_id` equal to `A`. I split it into two with amount `-9.00` each (both of which will have `imported_id` set to `null`) . I then try to import a new transaction with `imported_id = B` a couple days later, worth `-9.00`. Actual will match it with one of the previous split transactions, which is clearly wrong.

Expected: I see a few solutions
- Split transactions should not be considered for matches
- Split transactions should only be considered for matches if the parent has no imported_id
- Strict ID checking should be able to be enforced via the API (which will still not work since this is a split transaction, I believe)

### How can we reproduce the issue?

Please see above.

### Where are you hosting Actual?

Docker

### What browsers are you seeing the problem on?

Chrome

### Operating System

Mac OSX

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.