Bug 294780 - Investment price reports do not work for prices over a certain age
Summary: Investment price reports do not work for prices over a certain age
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-24 23:04 UTC by David Houlden
Modified: 2018-03-28 08:00 UTC (History)
2 users (show)

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


Attachments
Test file to show the problem (4.87 KB, application/octet-stream)
2012-02-24 23:04 UTC, David Houlden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Houlden 2012-02-24 23:04:51 UTC
Created attachment 69078 [details]
Test file to show the problem

Version:           git master (using KDE 4.6.5) 
OS:                Linux

For my investment accounts I have price history going back several years. If I configure an Investment Price Graph to show this history, when I get back to a certain point in time the chart shows incorrect values.

Attached is a test file which shows the problem. It has price history going back to 1st Jan 2010. There are two custom reports. The investment price graph with a start date of 1st June 2010 is correct. The investment price graph with a start date of 1st May 2010 shows incorrect prices until the last entry where you can see a large spike on the graph.

Reproducible: Always

Steps to Reproduce:
Open the attached file and view the two custom charts.

Actual Results:  
Prices are wrong on the chart when the report start date is before a certain date.

Expected Results:  
Prices should be shown correctly.
Comment 1 Alvaro Soliverez 2012-04-27 21:01:05 UTC
I can confirm this happens.
The problem is somewhere in the KDChart code. For prices, it is set to only feed into the dataset the values that are not zero. Apparently, when the number of skipped values is too high, the graph shows garbage.
I confirmed that the values fed into the chart are the correct ones, and if zero columns are trimmed, it displays correctly.
Comment 2 Cristian Oneț 2014-07-29 08:56:20 UTC
Reproduced this using 4.6.4.
Comment 3 wojnilowicz 2017-09-11 19:03:56 UTC
Git commit c66adb3d2507db01c3f56e56fa4be83f12927a8e by Łukasz Wojniłowicz.
Committed on 11/09/2017 at 16:52.
Pushed by wojnilowicz into branch 'master'.

Don't depend on transactions in prices report
FIXED-IN:5.0
Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

M  +159  -143  kmymoney/reports/pivottable.cpp

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