[PR #7101] [MERGED] Add an option to swap payee/memo when importing transaction form file #56245

Closed
opened 2026-05-01 03:55:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7101
Author: @sylvercode
Created: 3/1/2026
Status: Merged
Merged: 3/11/2026
Merged by: @youngcw

Base: masterHead: pr/payee-note-swap


📝 Commits (10+)

  • 50a302b Add swap payee-memo to ofx import
  • a4e9ef4 Add mock files to test payee-memo swap
  • 9264b7e Add swap payee-memo to qif import
  • cf11a1b Add swap payee-memo to camt import
  • a72925f Minor code cleanup for swap payee-memo on import
  • 48106ae Add release note
  • 6845816 lint fixing
  • 62ef346 Fixe Payee and Memo capitalization
  • a024295 change swapPayeeAndMemo to ofxSwapPayeeAndMemo
  • 44817b5 correct release note typo

📊 Changes

7 files changed (+417 additions, -58 deletions)

View changed files

📝 packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx (+149 -44)
packages/loot-core/src/mocks/files/camt/camt.053.payee-memo.xml (+127 -0)
packages/loot-core/src/mocks/files/data-payee-memo.ofx (+75 -0)
packages/loot-core/src/mocks/files/data-payee-memo.qif (+17 -0)
📝 packages/loot-core/src/server/transactions/import/parse-file.ts (+40 -14)
📝 packages/loot-core/src/types/prefs.ts (+3 -0)
upcoming-release-notes/7101.md (+6 -0)

📄 Description

Description

When importing transactions from file (ofx, qif and camt), add an option to swap the payee field and the memo field.

For a unknow reason, my bank swap those two fields.

By having the good information in the payee field, it make all the budget functionality and report more usefull.

Did not find any.

Testing

I have added 3 mock files to test the 4 possible combination of payee and/or memo specifed or not. The behavior works as intended with and without the "use memo as a fallback" (priorizing to never have the payee empty).

image

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 14.89 MB → 14.89 MB (+2.87 kB) +0.02%
loot-core 1 5.82 MB → 5.82 MB (+1014 B) +0.02%
api 1 4.43 MB → 4.43 MB (+946 B) +0.02%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 14.89 MB → 14.89 MB (+2.87 kB) +0.02%
Changeset
File Δ Size
src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx 📈 +2.87 kB (+10.05%) 28.5 kB → 31.37 kB
src/components/rules/RuleEditor.tsx 📈 +2 B (+0.00%) 49.43 kB → 49.43 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 9.54 MB → 9.54 MB (+2.87 kB) +0.03%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/ca.js 187.93 kB 0%
static/js/da.js 106.2 kB 0%
static/js/de.js 179.89 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 170.42 kB 0%
static/js/es.js 174.37 kB 0%
static/js/fr.js 179.41 kB 0%
static/js/it.js 170.98 kB 0%
static/js/nb-NO.js 156.8 kB 0%
static/js/nl.js 113.06 kB 0%
static/js/pl.js 89.65 kB 0%
static/js/pt-BR.js 182.89 kB 0%
static/js/th.js 181.58 kB 0%
static/js/uk.js 215.35 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.16 MB 0%
static/js/narrow.js 638.11 kB 0%
static/js/TransactionList.js 106.22 kB 0%
static/js/wide.js 164.15 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 10.04 kB 0%
static/js/useTransactionBatchActions.js 13.23 kB 0%
static/js/FormulaEditor.js 1.04 MB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.82 MB → 5.82 MB (+1014 B) +0.02%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/import/parse-file.ts 📈 +1014 B (+18.33%) 5.4 kB → 6.39 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.B9Bqcxn6.js 0 B → 5.82 MB (+5.82 MB) -

Removed

Asset File Size % Changed
kcab.worker.CVw5oNPx.js 5.82 MB → 0 B (-5.82 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
1 4.43 MB → 4.43 MB (+946 B) +0.02%
Changeset
File Δ Size
src/server/transactions/import/parse-file.ts 📈 +946 B (+19.43%) 4.75 kB → 5.68 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
bundle.api.js 4.43 MB → 4.43 MB (+946 B) +0.02%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


🔄 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/7101 **Author:** [@sylvercode](https://github.com/sylvercode) **Created:** 3/1/2026 **Status:** ✅ Merged **Merged:** 3/11/2026 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `pr/payee-note-swap` --- ### 📝 Commits (10+) - [`50a302b`](https://github.com/actualbudget/actual/commit/50a302b259017fd1b5bfce434f290769cbc27e1a) Add swap payee-memo to ofx import - [`a4e9ef4`](https://github.com/actualbudget/actual/commit/a4e9ef4b31fd60ac2a083999cd385a3d1d539427) Add mock files to test payee-memo swap - [`9264b7e`](https://github.com/actualbudget/actual/commit/9264b7e6966c45363a24dba5477a1dd15fb1c948) Add swap payee-memo to qif import - [`cf11a1b`](https://github.com/actualbudget/actual/commit/cf11a1b41e4c39429b57412ac1bcca61ae8af38d) Add swap payee-memo to camt import - [`a72925f`](https://github.com/actualbudget/actual/commit/a72925f0f183ab767f379f4ae90fc211c205fb01) Minor code cleanup for swap payee-memo on import - [`48106ae`](https://github.com/actualbudget/actual/commit/48106aeef100ec0460086e6a236b9adbd83c597f) Add release note - [`6845816`](https://github.com/actualbudget/actual/commit/6845816bee7e382c268856e2b324577e6720bde4) lint fixing - [`62ef346`](https://github.com/actualbudget/actual/commit/62ef346d9ddf81d23269f19111d938653b86fd32) Fixe Payee and Memo capitalization - [`a024295`](https://github.com/actualbudget/actual/commit/a0242954f619cf703443c3f3e914b6f7688806d6) change swapPayeeAndMemo to ofxSwapPayeeAndMemo - [`44817b5`](https://github.com/actualbudget/actual/commit/44817b514d76091b9a28feed35e0c1a4122fb3be) correct release note typo ### 📊 Changes **7 files changed** (+417 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx` (+149 -44) ➕ `packages/loot-core/src/mocks/files/camt/camt.053.payee-memo.xml` (+127 -0) ➕ `packages/loot-core/src/mocks/files/data-payee-memo.ofx` (+75 -0) ➕ `packages/loot-core/src/mocks/files/data-payee-memo.qif` (+17 -0) 📝 `packages/loot-core/src/server/transactions/import/parse-file.ts` (+40 -14) 📝 `packages/loot-core/src/types/prefs.ts` (+3 -0) ➕ `upcoming-release-notes/7101.md` (+6 -0) </details> ### 📄 Description <!-- 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. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> ## Description <!-- What does this PR do? Why is it needed? Please give context on the "why?": why do we need this change? What problem is it solving for you?--> When importing transactions from file (ofx, qif and camt), add an option to swap the payee field and the memo field. For a unknow reason, my bank swap those two fields. By having the good information in the payee field, it make all the budget functionality and report more usefull. ## Related issue(s) <!-- e.g. Fixes #123, Relates to #456 --> Did not find any. ## Testing <!-- What did you test? How can we reproduce the issue you are fixing or how can we test the feature you built? --> I have added 3 mock files to test the 4 possible combination of payee and/or memo specifed or not. The behavior works as intended with and without the "use memo as a fallback" (priorizing to never have the payee empty). <img width="799" height="520" alt="image" src="https://github.com/user-attachments/assets/a9ad46b3-7c7a-4409-813e-1cc06bb386d8" /> ## Checklist - [X] Release notes added (see link above) - [X] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 14.89 MB → 14.89 MB (+2.87 kB) | +0.02% loot-core | 1 | 5.82 MB → 5.82 MB (+1014 B) | +0.02% api | 1 | 4.43 MB → 4.43 MB (+946 B) | +0.02% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 14.89 MB → 14.89 MB (+2.87 kB) | +0.02% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx` | 📈 +2.87 kB (+10.05%) | 28.5 kB → 31.37 kB `src/components/rules/RuleEditor.tsx` | 📈 +2 B (+0.00%) | 49.43 kB → 49.43 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 9.54 MB → 9.54 MB (+2.87 kB) | +0.03% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/indexeddb-main-thread-worker-e59fee74.js | 12.94 kB | 0% static/js/workbox-window.prod.es5.js | 5.64 kB | 0% static/js/ca.js | 187.93 kB | 0% static/js/da.js | 106.2 kB | 0% static/js/de.js | 179.89 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 170.42 kB | 0% static/js/es.js | 174.37 kB | 0% static/js/fr.js | 179.41 kB | 0% static/js/it.js | 170.98 kB | 0% static/js/nb-NO.js | 156.8 kB | 0% static/js/nl.js | 113.06 kB | 0% static/js/pl.js | 89.65 kB | 0% static/js/pt-BR.js | 182.89 kB | 0% static/js/th.js | 181.58 kB | 0% static/js/uk.js | 215.35 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.16 MB | 0% static/js/narrow.js | 638.11 kB | 0% static/js/TransactionList.js | 106.22 kB | 0% static/js/wide.js | 164.15 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 10.04 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.82 MB → 5.82 MB (+1014 B) | +0.02% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/import/parse-file.ts` | 📈 +1014 B (+18.33%) | 5.4 kB → 6.39 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.B9Bqcxn6.js | 0 B → 5.82 MB (+5.82 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CVw5oNPx.js | 5.82 MB → 0 B (-5.82 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.43 MB → 4.43 MB (+946 B) | +0.02% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/server/transactions/import/parse-file.ts` | 📈 +946 B (+19.43%) | 4.75 kB → 5.68 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- bundle.api.js | 4.43 MB → 4.43 MB (+946 B) | +0.02% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <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-05-01 03:55:30 -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#56245