[Kmymoney-devel] Trying to debug: Yet another OFX import issue

Jack ostroffjh at sbcglobal.net
Tue Feb 10 01:49:35 UTC 2015


On 2015.02.05 02:16, Thomas Baumgart wrote:
>>> I looked into the sources and found out, that we keep the date of  
>>> the last transaction from the previous import as that date. I  
>>> remember that for HBCI we even subtract a few days from that to be  
>>> on the safe side as banks might add data later on (we've seen this  
>>> happen here via HBCI). Would that explain the behavior you  
>>> experience?
> >
>> I think I found the issue.  The date of last update is not kept in  
>> the ONLINEBANKING part, where I first thought it would be, but in  
>> the keyvaluepairs of the account for lastImportedTransactionDate  
>> key.  My credit card and bank accounts all have an appropriate value  
>> for that. However, none of my investment accounts have that  
>> keyvaluepair in the kmy file.  This may be another difference  
>> between banking/credit card and investment accounts that need to be  
>> thought about again.  I don't know if I can follow the code well  
>> enough to dig up where this date gets updated during an ofx import  
>> and why it is apparently handled differently for different types of  
>> accounts.  I am guessing that what happens is if KMM can't find a  
>> lastImportedTransactionDate, then it defaults to either 60 days ago,  
>> or the number of days in the settings, even if the account is set to  
>> use last update date.
> >
> > Have I missed something, or is this a bug?
> 
> If you don't find that value in the KVP section of the account, then  
> this is a bug. Here's how I find where it gets set:
> 
> kmymoney/converter/mymoneystatementreader.cpp:
> m_account.setValue("lastImportedTransactionDate",
> s.m_dateEnd.toString(Qt::ISODate));

I did file a bug (https://bugs.kde.org/show_bug.cgi?id=343878) and have  
managed to get KMM running in debug mode in kdevelop.  For checking,  
credit card, and investment accounts (all with OFX direct access set  
up) the program does get to that section of code.  However, only for  
the credit card account is there a valid date in s.m_dateEnd, so it  
looks like for the other two account types, it does not set  
lastImportedTransactionDate.  This is a bit odd, in that I DO see that  
date in the .kmy file for my checking account.  I have not yet tracked  
if there are other paths to this section of code.  I'm also new enough  
with kdevelop that I can't figure out the values of all variables (such  
as s.m_closingBalance) so I can't fully follow and understand the  
program flow.

Any suggestions on how to further diagnose/troubleshoot this?

Jack


More information about the KMyMoney-devel mailing list