After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541541 - RFE: auto-hide unused accounts
RFE: auto-hide unused accounts
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
git-master
Other Linux
: Low enhancement
: future
Assigned To: gnucash-ui-maint
gnucash-ui-maint
Depends on:
Blocks: 473506
 
 
Reported: 2008-07-04 11:40 UTC by Rolf Leggewie
Modified: 2018-06-29 22:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to implement that RFE (9.14 KB, patch)
2014-05-03 15:56 UTC, Michalis
committed Details | Review

Description Rolf Leggewie 2008-07-04 11:40:43 UTC
Large account trees like those used in German business accounting would profit if there was an option to hide all unused accounts (those without any transactions)
Comment 1 Derek Atkins 2008-07-04 15:07:03 UTC
You can configure gnucash to hide zero-value accounts.  Is that not sufficient?
Comment 2 Rolf Leggewie 2008-07-04 15:08:29 UTC
Something that is reasonably close although not the same

View -> Filter By -> Other
Comment 3 Rolf Leggewie 2008-07-04 15:09:42 UTC
well, some accounts are meant to have zero balance (I have some accounts like that to check if payments have been made).  They should of course be shown.  So it certainly is a helper, but not 100% the same.
Comment 4 Rolf Leggewie 2008-07-04 15:13:15 UTC
a minor detail in that regard.  a zero-balance account that becomes non-zero is not shown until the view is refreshed.
Comment 5 Michalis 2014-05-03 15:56:18 UTC
Created attachment 275750 [details] [review]
Patch to implement that RFE

Added a checkbox on "Filter by -> Others" to show (default) or hide accounts that don't have any transactions.
If an account does not have any transactions, but its children do, it will still be shown (unlike the zero total amount).
Default behavior is same as current.
Comment 6 Geert Janssens 2014-05-20 12:16:15 UTC
Comment on attachment 275750 [details] [review]
Patch to implement that RFE

Thank you for your patch.

I have committed it after I fixed a compiler warning (which is converted in an error in my configuration):
The call to g_return_val_if_fail in your new function xaccAccountGetNrSplits will expand to "return NULL" if acc is not a valid Account. Since your function returns a gint64 this is a type mismatch. I have changed it to return 0 which I what you probably meant.

I have a few comments I like to add also:

* I have noticed git am frequently complains about whitespace errors in your patches. I usually eliminate them by calling git am --whitespace=fix so they're not really a big deal except that now your local commit doesn't match my pushed commit anymore. Perhaps you can configure your editor to avoid these white-space issues proactively. Most whitespace errors are trailing whitespace or mixing tabs and spaces to indent your code. Some editors can be configured to correct these automatically.

* I have taken the liberty to rename xaccAccountGetNrSplits to xaccAccountCountSplits in a follow-up commit. I have done so to get a more consistent api because there is also a function xaccTransactionCountSplits. More consistency == easier to work with.

* I have also slightly modified the documentation for the new function. Specifically I changed your \note construct to explain the parameters into using @param which is the construct specifically designed for that.

* For completeness I'll note that the first time a book is opened after this commit a warning will be printed in gnucash.trace:
WARN <gnc.gui> error reading group Page 1 key ShowUnused: Key file does not have key 'ShowUnused'

It's harmless in itself as the next restart the new key will be in the state file anyway. But I mention it here so bug followers are aware this will happen.

Thanks again for the patch
Comment 7 Geert Janssens 2014-05-20 12:17:07 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 8 John Ralls 2018-06-29 22:06:38 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=541541. Please update any external references or bookmarks.