GNOME Bugzilla – Bug 344966
Account type compatibility to parent not checked when creating an account
Last modified: 2018-06-29 21:08:14 UTC
SVN r14352. Before I forget it ;-) * create an account e of type Expense * create an account b of type Bank as child of e * edit account e and click OK when the dialog pops up Now GnuCash complains that it needs to make type changes (to e) to make both accounts compatible. This should have happened when clicking OK in the account _creation_ dialog.
GnuCash should fail at step 2 and not let you do that, because Bank is not a valid subaccount of Expense. So, yes, it should fail during the account creation (of account b). Now, let's say the user creates 'b' as type Expense and then goes to change it to type Bank. Again, GnuCash should not let the user do that. Moreover, it should NOT ask if the user wants to change 'e', because then it has to go verify every account under e! That's a lot of work and RARELY the right thing to do. Now... Let's say a user has a tree type Bank, b:c:d and reparents b under e, of type Expense. At this point GnuCash should not let the reparent happen due to the type. BUT it should offer to change the type of b, c, and d. I do not believe that r14591 properly fixes this bug.
*** Bug 163685 has been marked as a duplicate of this bug. ***
As of r14899 the account create/edit dialog shows only account types that are compatible to the account parents type. All incompatibilities cause an error. Compatible type changes might have to confirm that the children should be adjusted accordingly. So this bug could be called addressed now, right? Bug 163685 does not seem to be a duplicate in a strict sense, maybe it should be discussed there?
True for trunk.. Should this change get backported to 2.0? Is the fix isolated to r14899 or are there multiple changesets required?
Yes, true for trunk only. Backporting a fix would involve either r14591 or r14894-14899. You decide :) Hampton, did you take a look at this issue?
The change would be useful for 2.0.x as well, for sure. If it's possible with moderate effort (and still small probability of messing up other stuff), then I'd appreciate a back-port. (The milestone is still for 2.0.x.)
Backported r14894-14899 to 2.0 as r15141. Fixed in 2.0.3
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=344966. Please update any external references or bookmarks.