Incorrect payee assignments during csv import when a payee field ends in semicolon

Thomas Baumgart thb at net-bembel.de
Sat Feb 17 07:50:10 GMT 2024


On Donnerstag, 15. Februar 2024 20:54:45 CET Steve via KMyMoney wrote:

> Hi Jack
> 
> I have attached a short csv file with the contents
> 
> 01-04-2022,KENT,70.00
> 02-04-2022,Happy Store;,6000.00
> 03-04-2022,MITCHELL,70.00
> 04-04-2022,HILTON,50.00
> 05-04-2022,KENT,70.00
> 
> The Happy Store payee ends with a semicolon
> I should have mentioned this happens with a brand new, empty kmm project
> 
> I would expect the new ledger to reflect exactly the entries shown above
> In fact the ledger shows
> 
> 01-04-2022,KENT,70.00
> 02-04-2022,Happy Store;,6000.00
> 03-04-2022,Happy Store;,70.00
> 04-04-2022,Happy Store;,50.00
> 05-04-2022,KENT,70.00
> 
> So KENT and Happy Store; are assigned as expected
> The entries after Happy Store; are matched to Happy Store;
>    -except for KENT which is assigned correctly because it had already
> been imported before Happy Store;
> 
> Under Payees > Matching I see
> one entry for KENT:
>      ^KENT$
> two entries for Happy Store;
>      ^Happy Store
>      $
> 
> Somehow the terminal ; is interpreted as a second entry $ in the
> matching list ...

Ah, that explains it. The second entry matches basically every string.
It's meaning is "match what has an end of string". KENT is matched,
because it is known.

Multiple entries are separated in the data file by the line feed
character (known as \n or 0x0A or in HTML 
 ). Example from my
life data:

    <PAYEE id="P000020" name="Familienkasse" reference="" email="" matchingenabled="1" usingmatchkey="1" matchignorecase="1" matchkey="Bundesagentur fuer Arbeit -
FAMILIENKASSE
FAMKASSE
Bundesagentur fur Arbeit -">

The matchkey attribute contains 4 entries.

> I ran a test which shows that a $ entry in the matching list matches all
> subsequent entries to that payee ...
> 
> This happens with v5.1.3

... and most likely with master as well. Thanks for the sample data.
That should allow to find and resolve the issue.

-- 

Regards

Thomas Baumgart

-------------------------------------------------------------
Arguing with a woman is like reading the Software License Agreement.
In the end you ignore everything and click 'I agree'.
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 868 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20240217/70541031/attachment.sig>


More information about the KMyMoney mailing list