[PR #2502] [MERGED] Fix reconciling split translations from nYNAB import creates orphan transfers #11391

Closed
opened 2026-04-10 20:59:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2502
Author: @Wizmaster
Created: 3/24/2024
Status: Merged
Merged: 4/24/2024
Merged by: @twk3

Base: masterHead: bugfix/nynab-import_subtransfer


📝 Commits (6)

  • e57aedd Reconciling split translations from nYNAB import creates orphan transfers
  • 7f269e8 Reconciling split translations from nYNAB import creates orphan transfers
  • 989d39e Reconciling split translations from nYNAB import creates orphan transfers
  • 07b60e3 Reconciling split translations from nYNAB import creates orphan transfers
  • 1b6ab35 Merge branch 'master' into bugfix/nynab-import_subtransfer
  • b5601d0 Merge branch 'master' into bugfix/nynab-import_subtransfer

📊 Changes

4 files changed (+188 additions, -29 deletions)

View changed files

📝 packages/desktop-client/e2e/data/ynab5-demo-budget.json (+3 -3)
📝 packages/loot-core/src/server/importers/ynab5-types.d.ts (+1 -0)
📝 packages/loot-core/src/server/importers/ynab5.ts (+178 -26)
upcoming-release-notes/2502.md (+6 -0)

📄 Description

Tentative fix for #2436

It is a bit more convoluted than I would like it to be, but nYNAB exports are missing several key fields on subtransactions.

The code will try to match subtransaction transfers with transaction transfers (missing the transfer_transaction_id field, which indicate that the transfer is linked to a subtransaction). Matching is made by ordering arrays of transactions and subtransactions, and trying to find matching data to store the linked ids. Unmatched data (if that should happens) will still be imported and will behave like currently in Actual.

I also streamlined payee import on transactions and subtransactions. This fix a small bug where payee on subtransactions are not imported.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/2502 **Author:** [@Wizmaster](https://github.com/Wizmaster) **Created:** 3/24/2024 **Status:** ✅ Merged **Merged:** 4/24/2024 **Merged by:** [@twk3](https://github.com/twk3) **Base:** `master` ← **Head:** `bugfix/nynab-import_subtransfer` --- ### 📝 Commits (6) - [`e57aedd`](https://github.com/actualbudget/actual/commit/e57aedd7d4b5b4de69f90209024f6deffaa4fb37) Reconciling split translations from nYNAB import creates orphan transfers - [`7f269e8`](https://github.com/actualbudget/actual/commit/7f269e8664453b0ff85688677aed55fe48932caa) Reconciling split translations from nYNAB import creates orphan transfers - [`989d39e`](https://github.com/actualbudget/actual/commit/989d39ec71a200c6912fe2d36c181a513f52a618) Reconciling split translations from nYNAB import creates orphan transfers - [`07b60e3`](https://github.com/actualbudget/actual/commit/07b60e3ded7abc8c85665d421b0ed33653a2dd2c) Reconciling split translations from nYNAB import creates orphan transfers - [`1b6ab35`](https://github.com/actualbudget/actual/commit/1b6ab35bce939250ca09d56b85f019f2bafcb673) Merge branch 'master' into bugfix/nynab-import_subtransfer - [`b5601d0`](https://github.com/actualbudget/actual/commit/b5601d0d921a3991e6a0c2fd7088893c41a40e01) Merge branch 'master' into bugfix/nynab-import_subtransfer ### 📊 Changes **4 files changed** (+188 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/data/ynab5-demo-budget.json` (+3 -3) 📝 `packages/loot-core/src/server/importers/ynab5-types.d.ts` (+1 -0) 📝 `packages/loot-core/src/server/importers/ynab5.ts` (+178 -26) ➕ `upcoming-release-notes/2502.md` (+6 -0) </details> ### 📄 Description Tentative fix for #2436 It is a bit more convoluted than I would like it to be, but nYNAB exports are missing several key fields on subtransactions. The code will try to match subtransaction transfers with transaction transfers (missing the transfer_transaction_id field, which indicate that the transfer is linked to a subtransaction). Matching is made by ordering arrays of transactions and subtransactions, and trying to find matching data to store the linked ids. Unmatched data (if that should happens) will still be imported and will behave like currently in Actual. I also streamlined payee import on transactions and subtransactions. This fix a small bug where payee on subtransactions are not imported. <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-10 20:59:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#11391