Bug 406608 - Custom report based on Annual Budget incorrectly getting Actuals
Summary: Custom report based on Annual Budget incorrectly getting Actuals
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.0.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-16 18:30 UTC by Stephane Couturier
Modified: 2019-04-20 20:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.0.4


Attachments
default annual budget (27.27 KB, image/png)
2019-04-16 18:31 UTC, Stephane Couturier
Details
custom annual budget (after save close re open) (29.67 KB, image/png)
2019-04-16 18:31 UTC, Stephane Couturier
Details
File created according to the description (1.00 KB, application/x-kmymoney)
2019-04-19 12:58 UTC, Thomas Baumgart
Details
simple file with incorrect report (1.14 KB, application/x-kmymoney)
2019-04-20 19:23 UTC, Stephane Couturier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Couturier 2019-04-16 18:30:47 UTC
SUMMARY
Hi, I have the issue on a custom report created from the Reports / 7. Budgeting / Annual Budget which changes in nature.
This default report only shows the budget data from a Budget.

 
STEPS TO REPRODUCE
1. Can start from a blank kmymoney file
2. Open Reports / 7. Budgeting / Annual Budget
3. click new to create a new report, click ok, save the file, exit kmymoney
4. reopen the file and see the created report:

OBSERVED RESULT
The custom report layout is now changed to display also the actuals/current values, and the difference.

So as a consequence I can never keep a custom simple annual budget report.

EXPECTED RESULT
the nature/layout of the report should not change


SOFTWARE/OS VERSIONS

KDE Frameworks 5.56.0
Qt 5.12.2


ADDITIONAL INFORMATION
Comment 1 Stephane Couturier 2019-04-16 18:31:13 UTC
Created attachment 119445 [details]
default annual budget
Comment 2 Stephane Couturier 2019-04-16 18:31:54 UTC
Created attachment 119447 [details]
custom annual budget (after save close re open)
Comment 3 Thomas Baumgart 2019-04-19 12:58:59 UTC
Created attachment 119500 [details]
File created according to the description

I am unable to duplicate the behavior you encounter. This does not mean that there is no bug but I cannot chase it.

Can you create such an (empty) file and attach it here, please? Likewise, I attach the file I created with version 5.0.3 here for you to verify if the problem is showing up with it as well. The report is called "Copy of Yearly Budget"
Comment 4 Thomas Baumgart 2019-04-19 12:59:49 UTC
Updated status
Comment 5 Stephane Couturier 2019-04-20 19:23:13 UTC
Created attachment 119536 [details]
simple file with incorrect report
Comment 6 Stephane Couturier 2019-04-20 19:33:16 UTC
Thanks a lot for looking into this :)

The report you created is correct indeed.

Actually, for the issue to be visible, at least one Budget needs to exist and be selected as the budget to be used by the report.

- Go to Budget and create one (no need to change anything more)
- Go to the Report copy, check that it is now using the new budget
- Save, Exit, re open the file, then you may see that the report is also showing actuals and difference. 
I attached a simple file showing this.
Comment 7 Thomas Baumgart 2019-04-20 20:59:29 UTC
Git commit f9fdfce0b07aff9e24589381f81ccbfff07ab55e by Thomas Baumgart.
Committed on 20/04/2019 at 20:58.
Pushed by tbaumgart into branch '5.0'.

Fix loading of report attribute "includingBudgetActuals"

The budget report attribute "includingBudgetActuals" was not handled
correctly when a file was loaded into memory.

Existing files showing a problem cannot be fixed automatically. The
respective reports need to be recreated by the user.

Also, some more attributes needed a fixed seed to solve issue #396978.
FIXED-IN: 5.0.4

M  +5    -1    kmymoney/plugins/xmlhelper/xmlstoragehelper.cpp

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