[Kmymoney-devel] Review Request: Unable to add account: Account has invalid type

Allan Anderson agander93 at gmail.com
Tue May 31 21:20:30 CEST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6694/
-----------------------------------------------------------

Review request for kmymoney.


Summary
-------

I have a QIF file containing a category list including a large number of
categories.  When I try to import, each entry produces the message 'Unable to
add account: Account has invalid type'.  The only option given is 'OK', which
produces the same message for the next category.   There are too many entries
to continue, so KMM has to be aborted, and the user is none the wiser as to the
record in question or the problem with it.

I'm pretty sure this file imported correctly under KMM 1.x and earlier.

If the file size is reduced and the messages accepted, the import proceeds but
no categories get created.

The file format seems OK to me - here's the reduced version.

!Type:Cat
NBonus
I
^
NCapital gains
I
^
NChild Benefit
I
^
NDiv Income
I
^

The problem lies in MyMoneyQifReader::processCategoryEntry.

An "!extractLine('I').isEmpty()" (or 'E') test is performed.  If, as is likely, the line 
contains only the 'I' or 'E', the test will return empty and no accounts get set up.

The test needs to confirm if either line is detected, empty or otherwise, and set up accordingly.


This addresses bug 274598.
    https://bugs.kde.org/show_bug.cgi?id=274598


Diffs
-----

  /trunk/extragear/office/kmymoney/kmymoney/converter/mymoneyqifreader.cpp 1234356 

Diff: http://svn.reviewboard.kde.org/r/6694/diff


Testing
-------

Tested with the same files which previously failed, and they now import correctly.


Thanks,

Allan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20110531/f05f3466/attachment.htm 


More information about the KMyMoney-devel mailing list