After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 548021 - Changing from Stock/Mutual Fund account type loses quantity of unit information
Changing from Stock/Mutual Fund account type loses quantity of unit information
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Engine
2.2.x
Other All
: Normal major
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2008-08-16 13:53 UTC by Brian
Modified: 2018-06-29 22:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Brian 2008-08-16 13:53:16 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
Comment 1 Christian Stimming 2008-10-30 09:07:21 UTC
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.
Comment 2 Derek Atkins 2008-10-30 14:19:57 UTC
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.
Comment 3 Phil Longstaff 2009-05-25 13:39:05 UTC
So is this a bug?
Comment 4 John Ralls 2013-09-14 05:02:02 UTC
Yes, but not the bug everyone has been thinking of. The bug is that account types are mutable. They shouldn't be.
Comment 5 Geert Janssens 2017-03-21 14:42:29 UTC
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.
Comment 6 John Ralls 2018-06-29 22:08:44 UTC
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.