Bug 403745 - in import dialog, newly-created account doesn't appear in pulldown menu
Summary: in import dialog, newly-created account doesn't appear in pulldown menu
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.0.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-29 20:42 UTC by glyphimor
Modified: 2019-04-19 13:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.0.4


Attachments
simple 1-transaction .ofx export from a checking account (1.07 KB, text/plain)
2019-01-29 20:42 UTC, glyphimor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description glyphimor 2019-01-29 20:42:17 UTC
Created attachment 117718 [details]
simple 1-transaction .ofx export from a checking account

SUMMARY

For any import plugin (OFX, CSV, etc.), if you attempt to create a new account inside the import wizard, the new account isn't actually created and it doesn't appear as an option in the account selection pulldown menu.

STEPS TO REPRODUCE

If desired for testing, create a new KMyMoney file with no accounts as follows:

1. Open KMyMoney and go to File -> New.
2. In the KMyMoney New File Setup dialog, click Next until the Select Accounts screen, uncheck the box ("I have a checking account that I want to manage with KMyMoney"), then Next thru the remaining screens and click Finish.
3. Click OK on the "Save storage as..." dialog.
4. On the "Save As" dialog that appears, enter a filename and click Save.

Now, attempt to import an export from, say, a checking account. (Failure occurs for both .ofx and .csv files.)

5. Go to File -> Import -> OFX...
6. In the "OFX import file selection" dialog, select any .ofx file from a checking account (for example, the attached file) and click Open.
7. The "Account selection" dialog states:

"""
You have downloaded a statement for the following account:

- Account Name: Bank account 123...
- Account Type: Checking
- Account Number: 123...

KMyMoney cannot determine which of your accounts to use. You can create a new account by pressing the Create button or select another one manually frmo the selection box below.

Import transactions
"""

Click the "Create..." button.

8. In the "KMyMoney New Account Setup" dialog, click Next until the Account screen, enter your desired Account name, use the preselected Account type ("Checking"), click Next thru the remaining screens, and click Finish.

OBSERVED RESULT

The account selection pulldown menu is empty. Furthermore, when you abort the import, you will discover that the checking account you attempted to create doesn't appear in the Accounts list -- it was never actually created.

EXPECTED RESULT

New checking account is created w/ input settings and appears in the account selection pulldown menu so that the import can proceed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.52.0
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION

Account creation fails for both OFX and CSV import.
Comment 1 Thomas Baumgart 2019-04-19 13:37:53 UTC
Git commit bd01a5ce650a5e9a13db3e42791fd9b0fed65052 by Thomas Baumgart.
Committed on 19/04/2019 at 13:37.
Pushed by tbaumgart into branch '5.0'.

Allow creating of accounts during statement import

If a user tries to create an account during statement import, the
account was not created at all.

This change makes sure that the enclosing engine transaction is only
opened after the account is selected. Doing that too early causes the
creation to fail.
FIXED-IN: 5.0.4

M  +3    -1    kmymoney/converter/mymoneystatementreader.cpp

https://commits.kde.org/kmymoney/bd01a5ce650a5e9a13db3e42791fd9b0fed65052