Bug 390979 - securities have changed into currency
Summary: securities have changed into currency
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: HI grave
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-24 03:40 UTC by Dave Nelson
Modified: 2018-02-24 17:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
investment ledger showing various securities replaced by currency (98.93 KB, image/png)
2018-02-24 03:40 UTC, Dave Nelson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Nelson 2018-02-24 03:40:25 UTC
Created attachment 110952 [details]
investment ledger showing various securities replaced by currency

this is a regression between commits 09ffa40a and 7150b4a5
affects investment accounts

ledger view shows all securities replaced by canadian dollar (all my accounts are cad). see attached screenshot.

investment view shows all symbols as $ and all prices as 1.0000 which seems to be the exchange rate.

quantities are fine, just the prices and values are wrong.
Comment 1 Thomas Baumgart 2018-02-24 12:18:48 UTC
This seems to be the requested follow-up to #390044. I keep the reference here, as it contains a specific commit (5.0.80-7150b4a5) that might be related to the problem.

In fact, this might be a problem on current git master which changes your data (I have seen the same here in my data and cannot experience the problem in the 5.0 branch).

So it is very likely that master is currently broken in the investment storage area. Here's what I have done. I opened a file written with 5.0 (where investments are shown correctly) in master and I see, that the file is modified without me doing anything. Saving the file and comparing it shows the following effect (besides others which are not causing trouble):

in the file written by 5.0 I see:

<ACCOUNT number="" opened="2002-01-01" description="" type="15" lastmodified="2018-02-20" id="A000113" institution="" lastreconciled="" name="xxx" parentaccount="A000112" currency="E000001">

and the same record in the file written by master shows as

<ACCOUNT lastmodified="2018-02-20" description="" currency="EUR" lastreconciled="" type="15" institution="" number="" name="xxx" opened="2002-01-01" parentaccount="A000112" id="A000113">

The order of the attributes is not a problem, but the modification of the currency attribute is causing the trouble and explains what the OP sees.

The file contents must be fixed manually (reverting the currency assignment) and master is currently broken for that. I adjusted the importance of this entry accordingly.
Comment 2 Thomas Baumgart 2018-02-24 17:04:06 UTC
Git commit 6e2321172a285f686e7d795577fce23702bfc672 by Thomas Baumgart.
Committed on 24/02/2018 at 16:58.
Pushed by tbaumgart into branch 'master'.

Fix security retrieval from engine

The call to MyMoneyFile::currency() not only returns currencies but also
securities. This was broken due to a recent change.

M  +13   -4    kmymoney/mymoney/mymoneyfile.cpp

https://commits.kde.org/kmymoney/6e2321172a285f686e7d795577fce23702bfc672
Comment 3 Dave Nelson 2018-02-24 17:50:24 UTC
this looks good now.
thanks for the speedy fix!