Bug 274598 - Unable to add account: Account has invalid type
Summary: Unable to add account: Account has invalid type
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 13:59 UTC by allan
Modified: 2011-06-01 12:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description allan 2011-05-31 13:59:05 UTC
Version:           SVN trunk (using KDE 4.6.0) 
OS:                Linux

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 - 

!Type:Cat
NBonus
I
^
NCapital gains
I
^
NChild Benefit
I
^
NDiv Income
I
^
NDiv Income:Ord dividend
I
^
!Type:Bank
D26.11.2006
T0.00
CX
POpening Balance
L[Artemis Inc]
^


Reproducible: Didn't try

Steps to Reproduce:
Make a QIF file as above and import it.

Actual Results:  
as described.

Expected Results:  
Categories get created.
User is give helpful information of problem.
User is given opportunity to abort.
Comment 1 allan 2011-06-01 12:14:20 UTC
SVN commit 1234489 by allananderson:

When trying to import a category list, 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.
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 is modified to confirm if either line is detected, empty or otherwise, and then set up accordingly.
BUG:274598
REVIEW:6694


 M  +5 -2      mymoneyqifreader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1234489