Bug 369448 - ofx import results in duplicate transactions
Summary: ofx import results in duplicate transactions
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: onlinebanking (show other bugs)
Version: 4.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-27 21:18 UTC by Swj
Modified: 2017-08-01 08:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Swj 2016-09-27 21:18:39 UTC
I previously had downloaded and imported a qfx file from the Bank of America website for, for my BOA credit card.  Today I did an ofx update which resulted in many duplicate transactions in my BOA credit card ledger.

Reproducible: Always

Steps to Reproduce:
1. have a BOA credit card account
2.download and run .qfx file from www.bankofamerica.com
3. do account.update account to run ofx import.

Actual Results:  
many duplicate transactions in my BOA credit card ledger

Expected Results:  
duplicate transactions to be recognized and ignored

The ofx wasn't working for a long time with BOA, now it started working again
Comment 1 Jack 2016-09-27 21:34:33 UTC
When you say you did an OFX update, did you download a new file, or did you actually succeed with an OFX Direct Connect?  If the latter, I suspect that the download included transaction IDs (which KMM uses to uniquely identify downloaded transactions) which were NOT present in the previously downloaded qfx file.  If that is the case, then you should not have this problem again, unless mixing direct connect downloaded transactions with those imported from file.
Comment 2 Jack 2016-09-27 21:46:27 UTC
I can confirm this is the problem.  In a downloaded qfx file, BOA uses something like
<FITID>201609101 but in a direct connect download, it uses <FITID>D2016254T1048539.  There are other differences also (at least in my example) such as the file not including the <MEMO> (which in the direct connect seems only to be part of the <NAME> anyway, but it is the FITID difference that causes KMM not to recognize the duplicate transaction.

Unfortunately, I predict 0% chance of getting BOA to fix this, since it seems absolutely impossible to talk to anyone who knows anything and can do anything except follow their script.  In any case, I'm really curious if anyone has any idea why they re-enabled direct connect, after going to all that trouble to discontinue it.
Comment 3 Swj 2016-09-27 21:57:32 UTC
Yes, as you say, I did succeed with an OFX Direct Connect.
It would be nice if KMM would ask if I want to merge  similar transactions ( that have the same payee, date, and amount).  This would also handle cases where transactions were entered manually or imported from some other money program.
Comment 4 Ralf Habacker 2017-08-01 08:17:58 UTC
(In reply to Swj from comment #3)
> Yes, as you say, I did succeed with an OFX Direct Connect.
This indicates that the bug is solved by using the same import path.

> It would be nice if KMM would ask if I want to merge  similar transactions (
> that have the same payee, date, and amount).  This would also handle cases
> where transactions were entered manually or imported from some other money
> program.
kmymoney already deals with duplicated transactions, which could be verified by using the test files from bug 343484. Open the the kmy file, then import the ofx file twice.

As mentioned in comment 2 ofx import also uses <FITID> to detect duplications. It is imported and compared as bank id. 

Feel free to open a related features request e.g. titled as 'Ignore <FITID> tag on ofx import duplicate detection'.