Bug 391453 - Displaying the ledger without an account having been selected displays a closed account
Summary: Displaying the ledger without an account having been selected displays a clos...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-05 21:05 UTC by Jack
Modified: 2018-03-06 20:36 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2018-03-05 21:05:35 UTC
Originally reported as part of bug 390406 (switching between ledger and investment views did not always show the same account) the issue here is that if you select the Ledger view without having selected and account (in some other view) it displays a "arbitrary" account.  (Arbitrary in the sense I don't know how it chooses, but it might just be the account with the lowest internal ID.)  In that bug, it displayed an old, closed account, which probably should not be shown at all.

I suggest the preferred display should be an empty ledger, until an account it actually chosen, but if a random/arbitrary account is displayed, it should be one of the preferred accounts, if there are any, but in no case should a closed account be displayed.

I don't suppose it really matters much if this is considered a minor bug or a wishlist, but it should rarely be an issue, once the other bug is fixed.
Comment 1 Thomas Baumgart 2018-03-06 15:49:14 UTC
I never saw this problem since all my files have at least one preferred account setup and the first of them shown in the combo box is the one that is selected. Turning off all those preferred account settings I was able to duplicate the problem.
Comment 2 Dave Nelson 2018-03-06 17:06:18 UTC
I just checked kmm 4.8.1, in my case the acct displayed does seem to be the one  with the lowest internal ID.

Could kmm5 just do the same?  I think this is how Investments view implicitly selects the oldest account as the default.

I have no preferred accounts.
Comment 3 Thomas Baumgart 2018-03-06 20:04:31 UTC
Git commit 6a5731e0707a14924d80db3c2e9d8913cf593665 by Thomas Baumgart.
Committed on 06/03/2018 at 20:04.
Pushed by tbaumgart into branch '5.0'.

Select first account in combo box drop down

After program start the first non-invest account found in the accounts
model was used to be loaded into the ledger if no account was selected
otherwise. This has been changed so that the first non-closed,
non-investment account in the combo-box at the top of the ledger view.
FIXED-IN: 5.0.1

M  +3    -4    kmymoney/views/kgloballedgerview_p.h

https://commits.kde.org/kmymoney/6a5731e0707a14924d80db3c2e9d8913cf593665
Comment 4 Dave Nelson 2018-03-06 20:36:14 UTC
I just cherry-picked your commit 6a5731e0 and it now looks good!

Sorry for all the fuss about a minor issue.

This was the last of my bugs, but I'll keep looking.