GNOME Bugzilla – Bug 420342
remember register filter and ordering settings
Last modified: 2018-06-29 21:30:10 UTC
When I start GnuCash, I have the account tree opened and all the account registers opened in the previous session. So far so good. But it is a little annoyance to have to reselect the previously selected filters (no reconciled transactions, for example) and reordering. Could it be possible to save the complete state of an account register (not only its open status) on close ? Or maybe have a default order and/or a default filter associated to an account directly in its (advanced) properties ? That way, when an account is opened these options are immediately applied. Other information: I'm not sure whether it's a bug or I haven't found an option, but I searched in the help, the gconf options, the WishList wiki and the Bug List but have not found anything solving my problem. Thank you in advance for your time and consideration.
Confirmed. This straddles enhancement and minor, but I agree with severity:minor.
*** Bug 392049 has been marked as a duplicate of this bug. ***
I'd like to add that time range options for the current year/quarter/month would be nice.
It would be _really_ nice to have this. I would like to be able to have filter settings saved for each account. I'd really like to have reconciled transactions turned off by default.
Is there any opinion on if this information should be saved in ~/.gnucash/books or in the actual register file itself?
*** Bug 539574 has been marked as a duplicate of this bug. ***
*** Bug 567565 has been marked as a duplicate of this bug. ***
*** Bug 528341 has been marked as a duplicate of this bug. ***
I guess this should be saved in the actual register file, since this really needs to be per-account, not a global saved filter. Also, on a recent discussion on the mailing list regarding this feature, I've suggested that automatically saving all filtering and ordering settings for an account will probably surprise users. Instead, adding an extra "Remember filter settings for this account" checkbox will probably make sense (and something similar for sorting).
That sounds reasonable. I can imagine some accounts that I don't want to save the filters for.
A "Per account setting". Wow, it would be great. ----- A french user
*** Bug 588615 has been marked as a duplicate of this bug. ***
I'd like to add my support for this feature. At some point past transactions are simply not needed and it slows down navigating through the ledger/register. I would say the simplest solution would be to make an option that can be set either per account or even for the whole file to have filters that can allow for filtering either a date certain, a certain time period in the past (like 3 months prior to todays date) or even filtering out reconciled transactions.
Created attachment 198015 [details] [review] Save Filter patch I had a look at this, missed the bounty on it but no matter. This patch against svn allows the filter status for accounts to be saved as a kvp called filter. Changed the dialog to include a tick box to enable the save otherwise it works as before. I see no point in saving any thing on the date page as I think this will be far to problematic in normal use. There are two points I am unsure of: 1) What is an LD_SUBACCOUNT, have been unable to test the switch case for this. 2) I added the gnc_ppr_update_status_query at line 597 to enable the saved filter on load but not sure if it is the correct location. This same setup could be used to save the field sort order of an account if individual account setting are to be saved but not sure if this should be a global setting in gconf.
Comment on attachment 198015 [details] [review] Save Filter patch Thank you for your patch. Like you, I'm not sure what LD_SUBACCOUNT is used for. I think this has to to with the option to open an account register for the subaccounts of a certain account. You can do this by going to the Accounts overview page, right-click on any account and then select "Open Subaccounts". This will open a register in "transaction view" and the name of the register will be <Account name>+ (note the "+"). I think your switch case breaks the filter for this action. You add a + sign to your filter string if the register is of type LD_SUBACCOUNT. As a result the strtoll will fail and the filter is always empty. I propose you remove the switch case and simply return either a valid filter string or NULL instead of "" (g_strdup handles NULL just fine). This is slightly more efficient. Then in gnc_plugin_page_register_new_common you can simply check if the returned filter string isn't NULL before converting to a hex number. This is also faster than having to pass by strcmp. Other than that your patch seems to be fine.
Created attachment 198612 [details] [review] Save Filter patch Changed the patch as suggested, still needed to test for the right account type otherwise it would fail in scheduled transaction editor but have used an if statement to test for both account types and also changed the dialog glade file to make it look better. As a result of you telling me about the sub account option, don't know why I missed that one as I thought I looked every where, I have also changed slightly the tab color procedure I did ages ago to work the same way which now makes it work on sub accounts.
Comment on attachment 198612 [details] [review] Save Filter patch Committed as r21421. Thank you very much.
I've committed your patch as it is, because it is already sufficient to close this enhancement request if we want to. I'd like to add some small notes though I forgot about earlier: (In reply to comment #14) > This patch against svn allows the filter status for accounts to be saved as a > kvp called filter. Changed the dialog to include a tick box to enable the save > otherwise it works as before. I wonder if we shouldn't also save the state of the save tick box itself. I now find myself in the situation that I have saved a filter setting, and want to change it again later on and have to manually tick the box again. The way it's currently implemented could also lead to some confusion: suppose I have changed the filter and marked it for saving. How do I remove the saved filter again ? I don't have the perfect answer to these questions by the way, I'm just wondering out loud in an attempt to come to the best possible user experience. > I see no point in saving any thing on the date > page as I think this will be far to problematic in normal use. > I wonder why this would be problematic in normal use ? I can imagine a scenario where I would only want to see the entries in an account for the current year because the earlier years have been closed from an accounting point of view. Would it be complicated to implement a save feature for the date tab as well ? > There are two points I am unsure of: > 1) What is an LD_SUBACCOUNT, have been unable to test the switch case for this. > 2) I added the gnc_ppr_update_status_query at line 597 to enable the saved > filter on load but not sure if it is the correct location. > 1) has been addressed I think. 2) it seems to work fine like this, so I assume this is one good location to enable the saved filter. > This same setup could be used to save the field sort order of an account if > individual account setting are to be saved but not sure if this should be a > global setting in gconf. Personally, I would prefer to use what you have done now for sort order as well. - This gives more consistency in the two options - I don't necessarily want to sort all my accounts in the same order On the other hand, I don't know of a scenario in which I would want to save the sort order on an account. When I sort that's usually temporary. Of course several of the earlier comments on this bug suggest some people would like to have the option to save the order of accounts.
I will have a think about the points raised and have a look at saving the sort order the same way.
Created attachment 199814 [details] [review] Patch to save sort and updated filter I have added the same routines to save the sort order and updated the filter patch to include the dates. Some Notes... The save tick boxes will remain ticked as long as the saved entry is not the default so on restart the tick box will be unticked or it is unticked manually. The start date and end date is only saved if the respective choose date option is active, any other option will cause the date to be reset to default.
Comment on attachment 199814 [details] [review] Patch to save sort and updated filter Committed in r21499, thank you very much.
*** Bug 592659 has been marked as a duplicate of this bug. ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=420342. Please update any external references or bookmarks.