Version: SVN 1101783 (using KDE 4.3.5)
Installed from: Compiled From Sources
After accounts are closed, the institutions view can be left displaying institutions which no longer have any open accounts. My suggestion is that if closed accounts are not displayed and all accounts for an institution are closed then the institution should not be displayed.
SVN commit 1122029 by asoliverez:
Fixed whether closed accounts would be displayed in the institutions view so that the general setting would be taken into account
Hide an institution if it has no accounts and the "Do not show accounts" setting is activated or the "Show all accounts" action is disabled.
M +9 -2 kinstitutionsview.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1122029
I'm sure this was fixed but I just noticed that it is no longer working. Using SVN 1152395 I am seeing all institutions even those where all accounts are closed.
The fix must have been lost while removing qt3support.
After further looking into this I've decided that the current behavior is a correct one. I say this considering the fact the adding a new institution will display the empty institution in the institutions view (which seems OK to me since the institution was just added). If this is so I don't see a reason to hide institutions with closed accounts only (which are hidden). That would mean that there is an inconsistency.
So I'm closing this as invalid, of course, any other suggestions, points of view are welcome.
The behaviour was to hide empty institutions only if "hide closed accounts" was checked. ie, it follows the logic that you hide unnecessary information if you desire to do so.
I find that logic sensible for users who only want to see the most useful info.
(In reply to comment #5)
> The behaviour was to hide empty institutions only if "hide closed accounts" was
> checked. ie, it follows the logic that you hide unnecessary information if you
> desire to do so.
> I find that logic sensible for users who only want to see the most useful info.
But 'hide closed accounts' does not mean hide institutions and as I said empty institutions are not hidden, which is OK I think. If the institution is not needed it can be safely deleted.
Kmymoney does not allow an institution to be deleted even if all accounts for that institution are closed. The fix as implemented by Alvaro still seems logical to me. It removed a lot of old unused institutions from the institution view which I did not need to see but still retained the option of getting them back by showing all accounts.
To me, this is a valid bug. I've added the previous fix and I agree with the logic behind it.
I'm sorry to disagree but to me hiding institutions on the 'Hide closed accounts' options does not seem right. Why don't we hide the liability group when there are no accounts, or only closed accounts, isn't that the same? Why do we have a separate 'Hide unused categories' and don't use the 'Hide closed accounts' option? Because we don't want to overload the semantics of the option.
I would agree to have a 'Hide unused institutions' with the semantics that if the institution has no visible accounts (closed-hidden or no accounts) then it would become hidden.
Accounts and categories are central to the application, so they deserve their own separate options.
Institutions are not, and adding another option just for this would only add bloat, IMHO.
However, if you feel really strong about this, let's change it to a wishlist to add the option to hide unused institutions when release is done.
The bug should not be closed because it was a feature we already had, and added recently enough to know it's current.
I agree. If it's just me and this seems fine to everyone else than we can go ahead and do it as requested. I mean I also wanted to fix this immediately after reported but I got the second thoughts after thinking about it.
We also had the 'feature' that and empty institution (with no accounts) was not displayed which I think was more of a bug and it is fixed with the current behavior.
SVN commit 1224575 by conet:
Instead of synchronizing the whole account tree on each data changed take advantage of the new, more granular, signals and perform the appropriate modifications in the model's data after it has been loaded once.
Also create a separate instance for the institutions model. This change has the following rationale. Mixing the two hierarchies in the same model (by account type and institution) would make it difficult to implement changes since depending on the changes it would imply structural modifications in only one instance of the same account. So for example changing the institution means a structural change in the institution hierarchy but no change in the accounts by type hierarchy. Separating the two hierarchies means that one account can be found only once in the model and it also simplifies the implementation of the modifications slots.
M +394 -205 models/accountsmodel.cpp
M +60 -7 models/accountsmodel.h
M +12 -11 models/models.cpp
M +5 -3 models/models.h
M +2 -2 views/kinstitutionsview.cpp
M +39 -3 views/kmymoneyview.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1224575
Cristian has closed this as fixed but I still see all of my unused institutions. I can't find a way to suppress them even though all accounts for the institutions are closed.
Did you try checking 'hide closed accounts' and unchecking 'show all accounts'? It works here.
Yes, those settings are what I always use. I do not see any closed accounts but I see institutions with no accounts under them in the institutions view.
Since I don't have any other ideas... Are you sure that you are running the latest revision from SVN?
New checkout from svn. Help -> About KMyMoney shows Version 4.5.90-svn1224684. Running on KDE 4.5.5. I even tried starting with a new kmymoneyrc. I still see the same problem. No closed accounts are shown but the institutions are still shown.
SVN commit 1224707 by conet:
The 'hide unused institutions' implementation was not working correctly if one institution had child accounts. Fix that by handling only empty institutions (with no accounts) with the flag (hideClosedAccounts()) and all the other institutions with the visibility of it's children.
M +5 -3 accountsmodel.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1224707
Now it should really be fixed. Thanks for your perseverance :).
Yes, that has fixed it. Thanks Cristian.