GNOME Bugzilla – Bug 548021
Changing from Stock/Mutual Fund account type loses quantity of unit information
Last modified: 2018-06-29 22:08:44 UTC
Please describe the problem: Changing an account type way from Stock/Mutual Fund account type loses quantity of units information. Steps to reproduce: Create a Stock/Mutual Fund account Create some journals by using the pricing features Have a debit or credit balance Close account tab Change the account type to something else Open to view the account Close the account Change account type to the original account type (Stock or Mutual Fund) Open to view transactions in account Actual results: Loss of quantity data Expected results: Minimally a warning dialog. "Warning changing your account type will loose quantity data permanently." Ideally, data is kept but not shown as in other account types in case the user wanted to revert back to those Unit Price account. Does this happen every time? Yes Other information: WinXP
I agree this information will be lost if the type is changed away from Stock. However, I do not directly agree this to be a bug. If there is special information in some account types, changing away from this account type means this information is lost - that's what I would expect for sure. Nevertheless, patches to change this are welcome.
Well, the information gets lost because you have to change the commodity of the account, which then scrubs the transactions. However the quantity information is stored in the splits.. So the question is why are the Splits getting changed when you change the account type? I just tried using your method and when I got back to the stock all my values were there... BUT I didn't change it to my default currency. Changing it my default currency DOES lose the information. So, it's only a problem when you change the type AND change the currency to your default currency. The reason is that the exchange rate from any commodity to itself is always 1.
So is this a bug?
Yes, but not the bug everyone has been thinking of. The bug is that account types are mutable. They shouldn't be.
The fix for bug 603378 makes account types immutable, solving this issue as well. The change will appear in the next stable software release due in the upcoming weekend.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=548021. Please update any external references or bookmarks.