Bug 469019

Summary: Payees match on a blank field
Product: [Applications] kmymoney Reporter: Chris <developerchris>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: REPORTED ---    
Severity: normal CC: cloutier.jo, jvapr27
Priority: NOR    
Version: 5.1.3   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: shows badly matched payee "test"

Description Chris 2023-04-26 17:45:09 UTC
Created attachment 158453 [details]
shows badly matched payee "test"

SUMMARY
It is possible to have a blank string as the matching text on payees, when this happens any transaction matches the payee and therefore the transaction is incorrectly assigned to that payee.


STEPS TO REPRODUCE
1. Create a payee
2. Set matching criteria to "Match on name below"
3. Leave the matching text field blank
4. Save the payee.
5. Import a number of transactions 

OBSERVED RESULT
many of the imported transactions are assigned to the bad payee

The attached image shows the payee "test" matching on multiple transactions each with a different actual payee

EXPECTED RESULT
An Error should occur when creating the payee preventing a blank matching field, also on import the payee match should be checked to ensure that the match is not occurring on a blank field


SOFTWARE/OS VERSIONS
Windows 10 Version 2009 (x86_64)
KDE Frameworks Version:  5.99.0
Comment 1 jesse 2023-04-26 18:05:02 UTC
We should also check that there is a trim function to remove outer white spaces from both the payee and the value in the import. This may be there already. I mention it just in case it is not. 

I have noticed that the payee field in the transaction input form does see 'happy' as different from 'happy '. The last one has a trailing blank.
Comment 2 Jonatan Cloutier 2023-04-27 21:54:11 UTC
Line feed is another one. I had a couple of payee that got imported with a line feed at some point and it does create a few issue in the ui and in the match rules.