[GNC-dev] Auto reconcile from register window
christopher.lck at gmail.com
Wed Oct 28 02:14:27 EDT 2020
I see no objections myself.
Auto-clear will have increased test coverage and visibility, and I have
a plan to modify so that the hash-table is generated once as soon as the
dialog is created, saved within the dialog, and updated when the end_value
is changed. Thus the user could have live feedback whenever a valid
autoclear target is entered. The algorithm can also be improved to clear
even when splits have duplicate amounts, see PR.
On Wed, 28 Oct 2020, 2:03 pm Mike Alexander, <mta at umich.edu> wrote:
> Yes, but, Autoclear doesn't need an account any more than reconcile
> needs one. Both gnc_plugin_page_register_cmd_reconcile and
> gnc_plugin_page_register_cmd_autoclear call
> gnc_plugin_page_register_get_account to get the account to work on.
> This may return a null pointer if the register doesn't have a clearly
> defined account (e.g. search results), but it works as well for one
> caller as for the other. Reconcile calls recnWindow to do the real work
> and it checks for a null account and returns immediately if given one.
> The corresponding autoclear method is autoClearWindow and it doesn't
> check for a null account pointer.
> It seems to me that if we fix autoClearWindow to check for a null
> account and hook up the menu item in the register window things should
> work fine. I can do that unless someone knows why it's a bad idea.
> On 26 Oct 2020, at 2:49, Christopher Lam wrote:
> > Having said that, when we type into the blank entry it knows which
> > account to tie the split to... So, the account could be found
> > somewhere...
> > On Mon, 26 Oct 2020, 2:38 pm Christopher Lam,
> > <christopher.lck at gmail.com> wrote:
> > From my understanding, this code is not hooked up to the register
> > because: a register is always a search list, and not necessarily tied
> > to an account. Proof: the blank transaction register entry has no
> > account.
> > I gather the original coder noticed the same, therefore didn't hook
> > it.
More information about the gnucash-devel