[kmymoney] [Bug 419975] New: When importing CSV, we're matching against the other transactions also being imported

Dawid Wróbel bugzilla_noreply at kde.org
Sun Apr 12 03:19:47 BST 2020


https://bugs.kde.org/show_bug.cgi?id=419975

            Bug ID: 419975
           Summary: When importing CSV, we're matching against the other
                    transactions also being imported
           Product: kmymoney
           Version: git (master)
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: importer
          Assignee: kmymoney-devel at kde.org
          Reporter: me at dawidwrobel.com
  Target Milestone: ---

Created attachment 127457
  --> https://bugs.kde.org/attachment.cgi?id=127457&action=edit
Sample CSV file

SUMMARY
While importing investment transactions from CSV file today, I noticed that one
of the transactions was missing. Specifically, two of the transactions were
similar enough for the TransactionMatcher to drop one of them and reconcile the
other. Despite having same quantities, prices and date, the transactions have
different memo, so it's understandable that it considers them a loose match.

However, those two shouldn't even be matched against each other, since both are
being imported from external source. I can see in the
mymoneystatementreader.cpp that this is indeed aimed to be handled properly by
checking if a transaction isImported():

    if (result == TransactionMatchFinder::MatchDuplicate
      || !matchedTransaction.isImported()
      || result == TransactionMatchFinder::MatchPrecise) { // don't match with
just imported transaction

However, the CSV importer doesn't set it for its transactions, unlike the QIF
importer. Note that the latter is the *only* importer that has any usage of
setImported() in its code, so I presume other importers may be affected as
well.

STEPS TO REPRODUCE
1. Import the CSV file attached


OBSERVED RESULT
Only one of the two transactions was imported.


EXPECTED RESULT
Both should be.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list