Bug 460079 - Net Worth reports are dropping investments
Summary: Net Worth reports are dropping investments
Status: CONFIRMED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.1.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-07 03:30 UTC by Tcpsorcerer
Modified: 2023-08-31 20:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
7Z COMPRESSED ANONYMIZED XML (575.06 KB, application/x-7z-compressed)
2022-10-07 03:30 UTC, Tcpsorcerer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tcpsorcerer 2022-10-07 03:30:24 UTC
Created attachment 152626 [details]
7Z COMPRESSED ANONYMIZED XML

SUMMARY
UNDER REPORTS/NET WORTH - A REPORT WITH SAVINGS ACCOUNTS AND INVESTMENT ACCOUNT BALANCES BY YEAR, IF DUPLICATED/COPIED, THE NEW VERSION WILL LOSE ALL INVESTMENTS
IN ADDITION, NEW NETWORTH REPORTS CREATED TO SHOW AN ANNUAL BALANCE OF A MIX OF SAVINGS AND INVESTMENT ACCOUNTS WILL NO LONGER SHOW INDIVIDUAL INVESTMENTS.
MY REPORTS WERE SET-UP PRIOR TO VERSION 5 AND ONLY NOTICED THIS BUG RECENTLY AS I NEEDED TO MODIFY THE REPORTS TO ADD SOME NEW INVESTMENTS, SO UNABLE TO DETERMINE WHEN THIS BUG FIRST MANIFESTED AS I HAVE BEEN UPGRADING WITH NO SIGNIFICANT ISSUES SINCE VERSION 4.6 OR SO.


STEPS TO REPRODUCE
1. OPEN ATTACHED FILE
2. UNDER REPORTS/NETWORTH SELECT REPORT R000084 OR R000133 THEN THE NEW BUTTON TO CREATE A COPY
3. VIEW THE NEW COPY

OBSERVED RESULT
NEW REPORT IS MISSING INVESTMENTS

EXPECTED RESULT
REPORT SHOULD BE A DUPLICATE WITH THE SAME MIX OF ACCOUNTS AND INVESTMENTS

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Comment 1 Jack 2022-10-07 17:11:01 UTC
(please don't use all caps.  it looks like you are shouting.  thanks.)
Using the latest Appimage Version 5.1.3-7599ae179 on Linux (I don't have a Windows instance handy) the copies of those two reports seem to be identical to the original reports.  I don't  recall any recent changes to reports, so I don't know if it might be platform dependent, or possibly fixed by some unrelated change.  Can you try the latest version from https://binary-factory.kde.org/job/KMyMoney_Release_win64/lastSuccessfulBuild/artifact/ to see if the problem is still present.  Also, please report the exact version as shown in Help/About KMyMoney.
Comment 2 Thomas Baumgart 2022-10-08 16:24:52 UTC
It could well be, that the change to fix #416902 causes your problem. It was introduced around 5.1.0.
Comment 3 Thomas Baumgart 2022-10-08 16:26:52 UTC
Git commit a14607ce6fe056a9321595a631dc1eebbf0f5c4a by Thomas Baumgart.
Committed on 08/10/2022 at 16:26.
Pushed by tbaumgart into branch 'master'.

Allow access to investment sub-accounts in all pivot based reports

M  +1    -1    kmymoney/plugins/views/reports/kreportconfigurationfilterdlg.cpp

https://invent.kde.org/office/kmymoney/commit/a14607ce6fe056a9321595a631dc1eebbf0f5c4a
Comment 4 Tcpsorcerer 2022-10-09 19:57:32 UTC
(In reply to Jack from comment #1)
> (please don't use all caps.  it looks like you are shouting.  thanks.)
> Using the latest Appimage Version 5.1.3-7599ae179 on Linux (I don't have a
> Windows instance handy) the copies of those two reports seem to be identical
> to the original reports.  I don't  recall any recent changes to reports, so
> I don't know if it might be platform dependent, or possibly fixed by some
> unrelated change.  Can you try the latest version from
> https://binary-factory.kde.org/job/KMyMoney_Release_win64/
> lastSuccessfulBuild/artifact/ to see if the problem is still present.  Also,
> please report the exact version as shown in Help/About KMyMoney.

Hello, my apologies about the caps, I certainly was not shouting, just a long tiring day and didn't realize the caps was on.
I can duplicate the bug on the following versions under windows:
5.1.1-dcc7ca980 -  my daily driver for the past ~9 months
5.1.3.-5b-03a2216 - when I wanted to see if it was a bug to the above version

I just tried the latest version 5.1.3-8910ed3bb and still see the same behavior with missing investments.
Hope this helps.
Comment 5 Tcpsorcerer 2022-10-09 20:07:29 UTC
(In reply to Thomas Baumgart from comment #3)
> Git commit a14607ce6fe056a9321595a631dc1eebbf0f5c4a by Thomas Baumgart.
> Committed on 08/10/2022 at 16:26.
> Pushed by tbaumgart into branch 'master'.
> 
> Allow access to investment sub-accounts in all pivot based reports
> 
> M  +1    -1   
> kmymoney/plugins/views/reports/kreportconfigurationfilterdlg.cpp
> 
> https://invent.kde.org/office/kmymoney/commit/
> a14607ce6fe056a9321595a631dc1eebbf0f5c4a

From the previous comment @2022-10-08 16:24:52 UTC, should I be testing on a version prior to 5.1.0? If so not sure where to download.
Otherwise, from this comment, I gather an the next build should have a fix that can be tested?

Thank you
Comment 6 Jack 2022-10-09 20:42:21 UTC
Thomas' commit was to master branch, which will not be in a release for a while.  However, it looks like the commit can be backported/cherry-picked to the 5.1 branch, in which case it would be in the 5.1.4 release, not yet scheduled, or in a release appimage (https://binary-factory.kde.org/view/AppImage/job/KMyMoney_Release_appimage-centos7/) following the commit.
Using a copy of your data file, you could test with an appimage from master branch (https://binary-factory.kde.org/view/AppImage/job/KMyMoney_Nightly_appimage-centos7/), but that is not suggested for production use.  
Testing with a version prior to 5.1.0 might confirm that the change Thomas referred to is indeed the problem, but it's probably better to wait and test with some version which has the fix.
Comment 7 Tcpsorcerer 2022-10-09 21:22:46 UTC
(In reply to Jack from comment #6)
> Thomas' commit was to master branch, which will not be in a release for a
> while.  However, it looks like the commit can be backported/cherry-picked to
> the 5.1 branch, in which case it would be in the 5.1.4 release, not yet
> scheduled, or in a release appimage
> (https://binary-factory.kde.org/view/AppImage/job/KMyMoney_Release_appimage-
> centos7/) following the commit.
> Using a copy of your data file, you could test with an appimage from master
> branch
> (https://binary-factory.kde.org/view/AppImage/job/KMyMoney_Nightly_appimage-
> centos7/), but that is not suggested for production use.  
> Testing with a version prior to 5.1.0 might confirm that the change Thomas
> referred to is indeed the problem, but it's probably better to wait and test
> with some version which has the fix.

Thank you. I'll see if I can boot into a Linux to check it out.
I'll keep an eye here to test on Windows as well when ready.
Comment 8 Jack 2022-10-09 21:50:01 UTC
Sorry, I forgot you were on Windows.  You can get a windows version from master branch at https://binary-factory.kde.org/job/KMyMoney_Nightly_win64/.  The same caveat applies.

Also, if you reply to a bug by email, please trim everything you are replying to, as the entire message gets included as the next comment to the bug, so it just duplicates the previous comment.
Comment 9 Tcpsorcerer 2022-10-09 22:09:50 UTC
(In reply to Jack from comment #8)
I'm actually on bugs.kde.org but understood.

Just tried 5.1.80-76ee0e-4df and looks like this is resolved.
Additionally, it seems that what the big did was remove the investments from the report filter under accounts, and now I can see them. Which from memory was the behavior in prior versions before this bug became apparent.

The only other call-out is that prior to this bug, investments were indented in the report, under the investment account, but now they are not. Not critical, but nice to have.

Great work, I will continue with my daily driver, alternating with newer builds as needed.
Comment 10 Tcpsorcerer 2023-01-28 15:37:13 UTC
Not sure if relevant, but I was testing something else and this bug appears to be back on kmymoney-master-1783-windows-cl-msvc2019-x86_64.7z
Comment 11 Jack 2023-01-31 21:07:19 UTC
There is definitely something strange going on.  If you just hit "Apply" on the Range tab of the original report, the data all seems to disappear.  Saving the file with the new report and comparing the existing R000084 and copy of it from the XML file, I get:

                                         > budget="B000001"
dataRangeStart="1"        | dataRangeStart="nan"
dataRangeEnd="10"       | dataRangeEnd="nan"
dataMajorTick="1"          | dataMajorTick="0"
(edited to get approx alignment with non-fixed-width font, and removing the id and name differences)

Note that no budget shows up in either config, and both configs show All Dates and are are labelled 12/1/08 through 12/31/22.
Comment 12 Jack 2023-01-31 21:31:50 UTC
Simpler test is to open Report000084, click Configure, click Apply, the data all disappears.  Click Undo, the data does NOT reappear.  Close and reopen the report, and the data is all present again.  Among other problems, the display is apparently not always updated when the underlying data (either transaction or configuration data) is changed.  What is even stranger is that simply clicking Apply only seems to lose data in some reports but not others (only tried within Net Worth reports so far.).
Comment 13 Jack 2023-08-31 20:31:03 UTC
What appears to be the same bug was just brought up on https://discuss.kde.org/t/wierd-behavior-when-using-filters-in-reports/4624/1 and digging into the Configure dialog Accounts tab, the individual securities accounts (within the various investment accounts) are not listed.  I need to dig into the source code, but I wonder if they are being somehow filtered out of the report, or just not even being considered for inclusion.