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

Thomas Baumgart thb at net-bembel.de
Tue Feb 10 07:18:29 UTC 2015


On Monday 09 February 2015 20:49:35 Jack wrote:

> 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?

Hovering over the variable in KDevelop should show its value in a tooltip type 
of window. 'ddd' might be another choice of debugger frontend. I've used it in 
the past a few times, but not recently.

I did a 'git grep m_dateEnd' in the top directory of our tree which shows only 
a single occurrence in the OFX importer. That might be a good spot to look 
into next.

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
"I know, a 'real Linux geek' doesn't walk around the wall: He bangs
his head against it until it tumbles down!" -- wobo on FLUG ml
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20150210/cdb22f2e/attachment.sig>


More information about the KMyMoney-devel mailing list