Bug 305182 - Can't select closed accounts for reports
Summary: Can't select closed accounts for reports
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: general (show other bugs)
Version: 4.6.2
Platform: unspecified Linux
: NOR normal with 20 votes (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 08:12 UTC by Peter Albrecht
Modified: 2012-08-18 16:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
KMyMoney data file, with account-setup to reproduce the bug: "close accounts not shown for reports" (4.78 KB, application/octet-stream)
2012-08-17 10:01 UTC, Peter Albrecht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Albrecht 2012-08-15 08:12:20 UTC
I'm using KMyMoney since 2008 now. So I have some saving accounts, which are already closed by now (they expired after 3 years).
All fine, so far. But if I want to generate a custom report, showing only some specific accounts (e.g. investments of bank X from 2008 to 2012), I can't select those closed accounts in "Reports" -> "Configure" -> "Account". They are not listed there.


Reproducible: Always

Steps to Reproduce:
1. close existing account
2. try to select it in report configuration ("Reports" -> "Configure" -> "Account")
Actual Results:  
Closed account not listed.

Expected Results:  
All accounts (including closed ones) should be listed.
Comment 1 David Houlden 2012-08-15 09:30:09 UTC
I was involved in a discussion with the developers about this back in 2008 which resulted in Alvaro making some changes. For reference it can be found here. 
http://sourceforge.net/mailarchive/message.php?msg_id=20389117
Comment 2 Peter Albrecht 2012-08-15 13:34:30 UTC
Thanks for your reply David!
I checked my KMyMoney settings and found at
"Settings" -> "Configure KMyMoney..." -> "General" -> "Filter"
the option "[  ] Do not show closed accounts".

Unfortunately checking or unchecking this option seems to have no effekt on showing closed accounts in report filters. I even restarted KMyMoney after changing the settings.

I tested with the report "Net Worth By Year".

Could you please try to reproduce this bug?
Comment 3 David Houlden 2012-08-15 13:55:17 UTC
It works for me. I deselect the option you found in settings. When I open Net Worth By Year and go into configuration, I see the closed accounts. No need to restart KMyMoney.
What version are you running? I am running git HEAD compiled from source on 21st June but I think this has worked for much longer than that.
Comment 4 Peter Albrecht 2012-08-15 19:20:59 UTC
Thanks again, David, for your quick reply!

I use:
  - KMyMoney 4.6.2
  - KDE 4.8.3
  - Gentoo Linux (ebuild has version kmymoney-4.6.2-r2)

Running KMyMoney compiled from git HEAD? Wow, thats tough!  :)

Maybe I should try this on my test-system.
Comment 5 Peter Albrecht 2012-08-17 10:01:09 UTC
Created attachment 73253 [details]
KMyMoney data file, with account-setup to reproduce the bug: "close accounts not shown for reports"

I guess, I have found the problem with this bug: I have arranged my accounts in an account hierarchy:
  - Saving
     - Saving 01
     - Saving 02
  - Cash
     - Cash 01
     - Cash 02

The mentioned option "[ ] Do not show closed accounts" work very well for top-level-accounts (in KMyMoney 4.6.2 and KMyMoney compiled GIT HEAD at 2012-08-17). But it fails for Sub-Accounts, beeing closed.

I created an dummy KMyMoney data file to demonstrate and reproduce the bug.

The critical account is: "Asset" -> "old stuff" -> "old account"   (this one is not shown in account selection for reports. While "Asset" -> "old visible closed account" is shown.
Comment 6 Thomas Baumgart 2012-08-18 16:37:40 UTC
Git commit 138a8629769902d9d30a3bbdf1365ab7b133bc65 by Thomas Baumgart.
Committed on 18/08/2012 at 18:35.
Pushed by tbaumgart into branch 'master'.

Use the same logic for sub-accounts as for main accounts when
they are closed but should be shown in the account selection process.

M  +4    -2    kmymoney/widgets/kmymoneyaccountselector.cpp

http://commits.kde.org/kmymoney/138a8629769902d9d30a3bbdf1365ab7b133bc65
Comment 7 Thomas Baumgart 2012-08-18 16:43:37 UTC
Git commit 8316cdad23ce5ce7b6f231dcb46daf2fc413d0d3 by Thomas Baumgart.
Committed on 18/08/2012 at 18:35.
Pushed by tbaumgart into branch '4.6'.

Use the same logic for sub-accounts as for main accounts when
they are closed but should be shown in the account selection process.
(cherry picked from commit 138a8629769902d9d30a3bbdf1365ab7b133bc65)

M  +4    -2    kmymoney/widgets/kmymoneyaccountselector.cpp

http://commits.kde.org/kmymoney/8316cdad23ce5ce7b6f231dcb46daf2fc413d0d3