[Kmymoney-devel] [kmymoney4] [Bug 328127] New: mymoneystatementreader.cpp matching problem

allan agander93 at gmail.com
Tue Nov 26 22:50:00 UTC 2013


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

            Bug ID: 328127
           Summary: mymoneystatementreader.cpp matching problem
    Classification: Unclassified
           Product: kmymoney4
           Version: git master
          Platform: Mint (Ubuntu based)
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kmymoney-devel at kde.org
          Reporter: agander93 at gmail.com

Many thanks to Chris Tucker for producing a patch for this problem, and his
description -
"
OFX import doesn't match securities with different names but same symbol.  For
example, I direct-connect to download OFX and pick up a security:

<SECURITY symbol="VOE" id="922908512" name="VANGUARD INDEX FDS MCAP VL
IDXVIP"/>

The security exists already as VOE with name "Vanguard Index FDS Mid-Cap Value
Index (VOE)". 

mymoneystatementreader.cpp finds the existing security by ticker but the
transaction import fails to find the security by name.  The following patch to
mymoneystatementreader.cpp solves the problem:

*** mymoneystatementreader.cpp.orig     2013-11-24 17:27:39.959812598 -0800
--- mymoneystatementreader.cpp  2013-11-24 17:27:44.436812841 -0800
***************
*** 630,636 ****
            QList<MyMoneySecurity> list =
MyMoneyFile::instance()->securityList();
            QList<MyMoneySecurity>::ConstIterator it = list.constBegin();
            while (it != list.constEnd() && security.id().isEmpty()) {
!             if (statementTransactionUnderImport.m_strSecurity.toLower() ==
(*it).tradingSymbol().toLower()
                  || statementTransactionUnderImport.m_strSecurity.toLower() ==
(*it).name().toLower()) {
                security = *it;
              }
--- 630,636 ----
            QList<MyMoneySecurity> list =
MyMoneyFile::instance()->securityList();
            QList<MyMoneySecurity>::ConstIterator it = list.constBegin();
            while (it != list.constEnd() && security.id().isEmpty()) {
!             if (statementTransactionUnderImport.m_strSymbol.toLower() ==
(*it).tradingSymbol().toLower()
                  || statementTransactionUnderImport.m_strSecurity.toLower() ==
(*it).name().toLower()) {
                security = *it;
              }
"
While investigating this problem, using the CSV importer, I encountered some
other issues - to follow.



Reproducible: Always

Steps to Reproduce:
1.Create an investment transaction with a new symbol.
2.Import another investment transaction using the same symbol, but a
non-identical name.
3.The two should get matched, but the second was being rejected because the
symbol match was failing.
Actual Results:  
As above

Expected Results:  
The two transactions should get matched.

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


More information about the KMyMoney-devel mailing list