Bug 512098 - Unexpected memo content when retrieving transactions from an ING Diba account via online banking
Summary: Unexpected memo content when retrieving transactions from an ING Diba account...
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: onlinebanking (other bugs)
Version First Reported In: 5.2.1
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-14 21:25 UTC by Ralf Habacker
Modified: 2025-11-15 12:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2025-11-14 21:25:44 UTC
SUMMARY
When transactions are retrieved from an ING Diba account via online banking (hcbi), the memo data retrieved for transactions contains unexpected content. 

Example: Transactions from Amazon retrieved via online banking in the browser contain an order number consisting of three blocks separated by hyphens, e.g., 028-8433979-6339549. 
If these transactions are retrieved with KMyMoney (or aqbanking-cli), they are visible in the memo field of the corresponding transaction as 028.8433979.6339549.

STEPS TO REPRODUCE
1. download KMyMoney version 5.2.1 or 5.2.70
2. start kmymoney
3. create an online banking account for a Ing Diba checking account
4. Download transactions

OBSERVED RESULT
Due to the change in structure, these order numbers no longer work for generating URLs to retrieve the specific order in the corresponding online store.

EXPECTED RESULT
KMyMoney should be able to handle such situations, e.g. by restoring the hyphens or by providing appropriate support for defining Internet references for payees. 

SOFTWARE/OS VERSIONS
Windows: 10
Operating System: openSUSE Leap 15.6
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
The problem was originally reported at https://www.aquamaniac.de/rdm/issues/312, as it also occurs outside of KMyMoney. However, as there is no solution for this yet, it will probably have to be fixed in KMyMoney.
Comment 1 Jack 2025-11-14 21:35:34 UTC
I don't understand why KMyMoney should have to do anything at all with memo data as retrieved from the online/download/import source, especially if it is a known problem outside of KMyMoney.  Perhaps as a wishlist, but if you hardcode the transformation, what happens when another source turns out to need a different correction?  Making the transformation "programmable" in configuration would be great, but I'm not sure how much effort that would take, although the ability would prove useful for other outstanding wishlists.
Comment 2 Ralf Habacker 2025-11-15 09:25:47 UTC
There is actually a limitation in KMyMoney that prevents this problem from being solved:

A workaround is to find individual parts instead of a complete match and use them in the URL template with the correct separator, i.e., instead of ‘.’ in 'the pattern found 111.2222222. 3333333', which is currently not possible, you can enter ‘111’ '2222222' ‘3333333’ separately and use them in the URL with %1-%2-%3.
 
The limitation in KMyMoney is that currently only two URL parameters are supported, i.e. only %1-%2 can be used, which is not sufficient.
Comment 3 Ralf Habacker 2025-11-15 11:41:48 UTC
Git commit eba636135da14194e37bab1b6de5df9db077f969 by Ralf Habacker.
Committed on 15/11/2025 at 09:51.
Pushed by habacker into branch 'master'.

Number of supported variables in URL templates increased for payees

There are cases where the actual number of variables supported in
the specified template URLs is insufficient and is being expanded
with this commit.

M  +12   -5    kmymoney/mymoney/mymoneypayee.cpp
M  +56   -13   kmymoney/mymoney/tests/test-payees.xml

https://invent.kde.org/office/kmymoney/-/commit/eba636135da14194e37bab1b6de5df9db077f969
Comment 4 Ralf Habacker 2025-11-15 11:41:56 UTC
Git commit 021053635a57962a962e426e2adf225d6b6e5a69 by Ralf Habacker.
Committed on 15/11/2025 at 09:49.
Pushed by habacker into branch 'master'.

In transaction editor/form add tool tip of the generated reference URL

This makes it easier to check the generated URL

M  +1    -0    kmymoney/views/newtransactioneditor.cpp
M  +1    -0    kmymoney/views/newtransactionform.cpp

https://invent.kde.org/office/kmymoney/-/commit/021053635a57962a962e426e2adf225d6b6e5a69
Comment 5 Ralf Habacker 2025-11-15 12:11:12 UTC
The limitations on the number of supported variables have been resolved, and a possible solution to the problem described is now available. 

Since it is still unclear whether the problem described on aqbanking is due to aqbanking, the bank in question, or communication between the two parties, and since there may be further cases in the future, an extension to replace individual characters such as ‘.’ with ‘-’ would fundamentally solve such problems. 

From the documentation at https://invent.kde.org/office/kmymoney/-/blob/master/doc/details-payees.docbook#L280

    Manage link assignment

    On this tab, you can link part of a transaction's memo field to a remote or local URL, for example, to make invoices or other documents accessible.

    The tab contains input fields for a pattern and a URL template. The specified pattern is treated as a regular expression that is applied to the memo field of the transactions associated with this payee, and the resulting text is inserted into the URL template at the appropriate locations.

An additional field for entering such adjustments would have to be added to this form and taken into account by the associated logic.