GnuCash
Contact   Instructions
Bug 797546 - Changing account name leaves stale name in autocomplete
Summary: Changing account name leaves stale name in autocomplete
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Register (show other bugs)
Version: 3.7
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: ui
QA Contact: ui
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-01 08:27 EST by obscurans
Modified: 2020-01-09 10:24 EST (History)
3 users (show)

See Also:


Attachments

Description obscurans 2020-01-01 08:27:27 EST
Repro:

1. Create an account of any name, call this A
2. In any other account, enter a simple transaction crossed to A
3. Change the name of A to anything else
4. In any other account, type any prefix of A's old name (from testing, alphabetical ordering isn't particularly important)
5. Autocomplete will fill in the old name, which leads to "this account does not exist" warning

Workaround:

1. Create a new account with A's old name
2. Delete that account
3. Autocomplete now forgets A's old name
Comment 1 obscurans 2020-01-01 08:30:50 EST
By ordering isn't particularly important, I mean autocomplete *preferentially* completes to the stale names, even if existing names are alphabetically earlier, which is extra annoying.
Comment 2 obscurans 2020-01-01 08:37:23 EST
Further testing: workaround only succeeds with the full account name, not parents.

That is,

1. Create A:B
2. Teach autocomplete about A:B
3. Rename to A':B
4. Create and delete A
5. Fails to remove autocomplete entry for A:B

This effectively blocks me from attempting to rename parent accounts as it thoroughly breaks autocomplete state.
Comment 3 obscurans 2020-01-01 08:47:05 EST
1. The autocomplete entry not only has the old name, but it fails to recognize the new name at all (if you type a prefix of the new name but not the old)
2. Restarting the entire program resets state and is a valid workaround

Pretty much looks like a missing hook on account rename, with autocomplete having a separate copy (trie?) of all account names.
Comment 4 Bob 2020-01-03 10:56:30 EST
Looking at this...
Comment 5 Bob 2020-01-09 10:24:06 EST
I have fixed this issue and will be in version 3.9

Note You need to log in before you can comment on or make changes to this bug.