actualbudget / actualbudget/actual

[Bug]: Starting Balance not created if other accounts create transfers

Open
#3,218 0 comments 0 reactions 0 assignees View on GitHub
bank sync
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
- [X] I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

### What happened?

When syncing with SimpleFIN (and possibly others but not tested), the "Starting Balance" item is not created in an empty account if rules from other accounts create transfers to/from the empty account

Possible resolution: When syncing an account, the Starting Balance item should be created if all of the items in an account are transfers that originated to/from other accounts' items (or the account is otherwise empty).

To reproduce:

1. Create some accounts with SimpleFIN (or possibly other sync/import methods I did not test)
2. Rename them to Account 1 and Account 2 (this affects the order that they sync)
3. Create a rule to mark an item in Account 1 as a transfer to Account 2 (rule is pre, match account 1, set payee to account 2)
4. Delete all of the items in both accounts
5. Click the sync all accounts button from the "All Accounts" page to add back all of the items
6. Account 1 will sync fine and will have a Starting Balance. The rule will create transfers in the otherwise empty Account 2.
7. After Account 1 finishes syncing, Account 2 will begin to sync and will not create the Starting Balance item because it already contains some items (the transfers from Account 1).

I discovered this while initially setting up my Actual installation. I syncing all of my accounts, then created a bunch of rules to mark all of the transfers, and then deleted everything so that when I synced again all of the duplicates would be resolved. The duplicates would only resolve if I first deleted everything before syncing.

### Where are you hosting Actual?

Docker

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

Firefox

### Operating System

Linux

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.