[GH-ISSUE #5367] [Bug]: Bank sync fields should fallback to an empty string if unset #51422

Closed
opened 2026-04-30 17:55:32 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @AsgerMogensen on GitHub (Jul 22, 2025).
Original GitHub issue: https://github.com/actualbudget/actual/issues/5367

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

I have reported the bug on Discord and have been asked to open a bug report.

Nordea Personal Denmark provides very little information for pending transactions. If I use any other field mapping in bank sync settings than "payeeName" it causes an error: Error: "payeeName" is required when adding a transaction. I suspect the reason that only "payeeName" works is because it is set as blank when nothing else can be found, which was introduced as a fix to the similar bugs #3966 and #532 (server).

I suggest adding setting all the possible field mappings to blank when nothing is found to avoid this issue. I have fixed the error so far by turning of import of pending transactions.

How can we reproduce the issue?

I have included a sample from a GoCardless API call with a booked and pending transaction so you can see the data provided.

{
    "transactions": {
        "booked": [
            {
                "transactionId": "ID",
                "bookingDate": "2025-07-21",
                "valueDate": "2025-07-20",
                "transactionAmount": {
                    "amount": "-54.0",
                    "currency": "DKK"
                },
                "remittanceInformationStructured": "SHOP NAME DATE",
                "additionalInformation": "NordeaPay",
                "internalTransactionId": "ID"
            }
        ],
        "pending": [
            {
                "valueDate": "2025-07-20",
                "transactionAmount": {
                    "amount": "-161.15",
                    "currency": "DKK"
                }
            }
        ]
    },
    "last_updated": "2025-07-20T19:49:30.766059Z"
}

Note:
More data is available in my online bank, but it seems that the mapping between Nordea and GoCardless is not properly set up.
Image

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox

Operating System

Mac OSX

Originally created by @AsgerMogensen on GitHub (Jul 22, 2025). Original GitHub issue: https://github.com/actualbudget/actual/issues/5367 ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? I have reported the bug on Discord and have been asked to open a bug report. Nordea Personal Denmark provides very little information for pending transactions. If I use any other field mapping in bank sync settings than "payeeName" it causes an error: `Error: "payeeName" is required when adding a transaction`. I suspect the reason that only "payeeName" works is because it is set as blank when nothing else can be found, which was introduced as a [fix](https://github.com/actualbudget/actual-server/pull/533) to the similar bugs [#3966](https://github.com/actualbudget/actual/issues/3966#issuecomment-2565482661) and [#532 (server)](https://github.com/actualbudget/actual-server/issues/532). I suggest adding setting all the possible field mappings to blank when nothing is found to avoid this issue. I have fixed the error so far by turning of import of pending transactions. ### How can we reproduce the issue? I have included a sample from a GoCardless API call with a booked and pending transaction so you can see the data provided. ``` { "transactions": { "booked": [ { "transactionId": "ID", "bookingDate": "2025-07-21", "valueDate": "2025-07-20", "transactionAmount": { "amount": "-54.0", "currency": "DKK" }, "remittanceInformationStructured": "SHOP NAME DATE", "additionalInformation": "NordeaPay", "internalTransactionId": "ID" } ], "pending": [ { "valueDate": "2025-07-20", "transactionAmount": { "amount": "-161.15", "currency": "DKK" } } ] }, "last_updated": "2025-07-20T19:49:30.766059Z" } ``` Note: More data is available in my online bank, but it seems that the mapping between Nordea and GoCardless is not properly set up. <img width="587" height="336" alt="Image" src="https://github.com/user-attachments/assets/ca7dff7b-a8ae-461d-aac6-3e8233cd2aa8" /> ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox ### Operating System Mac OSX
GiteaMirror added the bank syncbug labels 2026-04-30 17:55:32 -05:00
Author
Owner

@Slatibartfas commented on GitHub (Aug 3, 2025):

I have observed a similar issue even when the payee name exists, and had a look at the code myself. It appears this could be an issue in the normalizeBankSyncTransactions:
if (ultimateCreditor != null) { if (internalTransactionId != null) { payeeName = null; } else { payeeName = ''; // <-- This is the likely culprit } }

The function attempts to determine the payee name based on the payeeId of a "transfer" transaction. If it can't find a payeeId, it then falls back to other transaction properties to generate a payeeName. However, the code contains a logic error. For transactions that have an ultimateCreditor and do not have an internalTransactionId, the payeeName is explicitly set to an empty string ''.

To fix this, you need to modify the code. Instead of setting payeeName to an empty string, you should populate it using the ultimateCreditor value. This ensures that the transaction always has a valid payeeName.

Change this line:
payeeName = '';

To this:
payeeName = ultimateCreditor;

This change will ensure that the payeeName is always populated for these types of transactions.

<!-- gh-comment-id:3148523414 --> @Slatibartfas commented on GitHub (Aug 3, 2025): I have observed a similar issue even when the payee name exists, and had a look at the code myself. It appears this could be an issue in the normalizeBankSyncTransactions: ` if (ultimateCreditor != null) { if (internalTransactionId != null) { payeeName = null; } else { payeeName = ''; // <-- This is the likely culprit } }` The function attempts to determine the payee name based on the payeeId of a "transfer" transaction. If it can't find a payeeId, it then falls back to other transaction properties to generate a payeeName. However, the code contains a logic error. For transactions that have an ultimateCreditor and do not have an internalTransactionId, the payeeName is explicitly set to an empty string ''. To fix this, you need to modify the code. Instead of setting payeeName to an empty string, you should populate it using the ultimateCreditor value. This ensures that the transaction always has a valid payeeName. Change this line: payeeName = ''; To this: payeeName = ultimateCreditor; This change will ensure that the payeeName is always populated for these types of transactions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#51422