[kmymoney4] [Bug 372166] New: CSV import not allowing choice of account for import on KF5.
allan
bugzilla_noreply at kde.org
Sun Nov 6 23:51:07 UTC 2016
https://bugs.kde.org/show_bug.cgi?id=372166
Bug ID: 372166
Summary: CSV import not allowing choice of account for import
on KF5.
Product: kmymoney4
Version: git (master)
Platform: Kubuntu Packages
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: csvimporter
Assignee: kmymoney-devel at kde.org
Reporter: agander93 at gmail.com
Target Milestone: ---
When I imported a CSV file (or tried to), I went through the set-up,
but on clicking Import, I didn't get the account selector, but did get the
Statement stats screen, which seemed to be indicating a successful import.
However, the account into which I had intended to do the import showed
no sign of the data. After doing a search, I found the import had gone to a
different account altogether. This account is a temporary credit card account
I created when it was not possible to import into credit card accounts, even
the file being imported was for a checking account. The data went into a
credit card account named cc.
I've looked at the code, but it has been much rewritten lately, and I'm
unfamiliar with it, so it's possible that what follows is wrong. However...
in bool CSVWizard::detectAccount(MyMoneyStatement& st), circa line 523,
accounts = findAccounts(accountTypes, statementHeader) gets loaded with the
first line of data -
"Date, Type, Description, Value, Balance, Account Name, Account Number".
What then seems to happen is that that line is scanned for a possible account
name for the import, but there is none. However, there are two strings -
Account Name" and "Account Number", which contain a valid account name, "cc" in
my .kmy file.
So, on the basis of a line of data happening to contain part of a string that
matches an account name, the data is imported into a completely unconnected
account.
To confirm this suspicion, I changed the two strings in the header line to
"Name" and "Number", and the file then imported correctly.
I'm unsure about the validity of the logic here, apparently hoping to match
data imported from a bank with an account name that the user has invented,
totally unbeknown to the bank.
Totally unconnected, but I also noticed in that area also that circa line 513,
accountTypes MyMoneyAccount::Checkings, MyMoneyAccount::Savings and
MyMoneyAccount::Liability are duplicated, but apparently harmlessly.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the KMyMoney-devel
mailing list