Bug 424377

Summary: Change default matching behavior for new payees to "match on exact payee name"
Product: [Applications] kmymoney Reporter: antoine <antoine>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 5.0.8   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.3
Sentry Crash Report:
Attachments: Payee tab
KMM file before importing qif file
qif file

Description antoine 2020-07-18 16:09:41 UTC
Created attachment 130222 [details]
Payee tab

SUMMARY

STEPS TO REPRODUCE
1. Open KMM file, add an operation with a payee called "PayeeTest"
2. Import a qif file with a transaction where payee is "PayeeTest"
3. 

OBSERVED RESULT

"PayeeTest" will appear more than once in Payee tab


SOFTWARE/OS VERSIONS
Xubuntu 20.04

INFORMATIONS
I attach a KMM file and qif file for demonstration.
A screenshot shows the payee tab after importing the qif file
Comment 1 antoine 2020-07-18 16:10:26 UTC
Created attachment 130223 [details]
KMM file before importing qif file
Comment 2 antoine 2020-07-18 16:10:46 UTC
Created attachment 130224 [details]
qif file
Comment 3 Jack 2020-07-18 17:44:25 UTC
I have not looked at the files yet, but are you sure there isn't some non-printing character in one of the entries?
Comment 4 antoine 2020-07-18 18:19:03 UTC
I compared the qif file to a qif file exported from kmm and they both have a Line
break at the end of the payee name, nothing more

they look exactly the same in mousepad (after enabling showing non printing character)
Comment 5 Jack 2020-07-18 21:13:18 UTC
Your original payee is marked No Matching.  That is why the import doesn't match and creates a new payee.  If you mark the original payee to match on exact or partial name, the import will recognize that the payee exists.
Comment 6 antoine 2020-07-18 21:28:27 UTC
Oh, you are right.
I thought that payee were marked "Exact matching" by default. This looks luke a more natural behaviour to me.

Do you know why payee are set "No Matching" by default ?

After importing a qif file, I always check all the transactions imported. This behaviour is maybe too safe ?
Comment 7 Jack 2020-07-18 22:08:37 UTC
I do not know if there is any specific reason the default for new payees is not to match.  Perhaps this bug can change to a wishlist, requesting the default behavior be changed to match on exact name or partial name.
Comment 8 Thomas Baumgart 2020-07-19 06:31:50 UTC
The reason may be, that we had the payees long before we introduced matching. I see some benefit to change the default to "match on exact name". Using "partial match" may introduce new problems that are not obvious to the user.
Comment 9 Thomas Baumgart 2022-03-25 14:19:25 UTC
Git commit aecff7cf0a219618255bfc18401f933ee10580ff by Thomas Baumgart.
Committed on 25/03/2022 at 14:19.
Pushed by tbaumgart into branch 'master'.

Persist exact name matching

M  +4    -1    kmymoney/mymoney/mymoneypayee.cpp
M  +6    -5    kmymoney/views/kpayeesview.cpp

https://invent.kde.org/office/kmymoney/commit/aecff7cf0a219618255bfc18401f933ee10580ff
Comment 10 Thomas Baumgart 2022-03-26 08:01:47 UTC
Git commit d13ed775e1a5b440812d0837c652c4c03d4575f4 by Thomas Baumgart.
Committed on 26/03/2022 at 08:01.
Pushed by tbaumgart into branch 'master'.

Set default for new payees to match on name

M  +1    -0    kmymoney/kmymoneyutils.cpp

https://invent.kde.org/office/kmymoney/commit/d13ed775e1a5b440812d0837c652c4c03d4575f4
Comment 11 Thomas Baumgart 2022-03-26 08:25:28 UTC
Git commit caa11249c6df800ee4aa69b6a733e067241b65a3 by Thomas Baumgart.
Committed on 26/03/2022 at 08:24.
Pushed by tbaumgart into branch '5.1'.

Set default for new payees to match on name
FIXED-IN: 5.1.3

(cherry picked from commit d13ed775e1a5b440812d0837c652c4c03d4575f4)

M  +1    -0    kmymoney/kmymoneyutils.cpp

https://invent.kde.org/office/kmymoney/commit/caa11249c6df800ee4aa69b6a733e067241b65a3