GNOME Bugzilla – Bug 724738
Value in "Display Symbol" field not saved
Last modified: 2018-06-29 23:26:52 UTC
In the Security editor, if a value is entered in the "Display symbol" Filed, it is not saved and also it is not displayed in "Securities", even if the column is shown. Reopening the editor shows an empty field. Steps to reporduce: 1. Tools -> Security Editor 2. In the "Securities" window, click "Add" 3. in the "Edit security" window enter: - "AAAA" in "Full name" field - "BBBB" in "Symbol/abbreviation" field - "CCCC" in "Display symbol" field 4. Take note of the value in "Type" field (happens with any value) 5. Click "OK" 6. Find the newly created security in "Securities" window, under the "Type" you noted at step 4. 7. Make sure that "Display symbol" column is shown 8. Notice that there is no value in that column for the newly created security 8. Select new security and click "Edit" 9. Notice that the "Display symbol" field is empty (should contain "CCCC" instead) The same thing goes on if I try to add e "display symbol" for a security already existent. OS: Windows 7
The same bug applies to 2.6.0 too
Created attachment 300941 [details] [review] Saves the user symbol when editing non-currency commodities. gnc_ui_commodity_dialog_to_object() only calls gnc_commodity_set_user_symbol() if the commodity is a currency. This one-line patch ensures the same is done for non-currency commodities as well. Not extensively tested, but it appears to work without ill effects.
What's the actual use-case for this? There are two symbols for currencies, which have both an ISO-4217 code (e.g. USD) and customary (but not standardized) symbols used for displaying amounts, e.g. $. For what non-currency commodities is this true?
My own use-case is a number of commodities (funds) where the symbol is rather long and unwieldy, but must be stored in that way in order to work with online price quote fetching. It would be preferable to see a shortened (customised) version next to displayed amounts. This would appear to be a good use for the user symbol field. If this is valid for currencies, why not any commodity type? As it stands, the UI does not actually make use of the user symbol when displaying non-currency amounts - it still displays the full symbol name. I was going to raise another bug and propose a further patch to address this, should this first patch be accepted.
I like the idea to have a short display symbol for commodities. Fetching commodities by yahoo I often have 12 chars ISIN + upto 4 chars appendix to select a market or currency ending up in 16 char long symbols, which is really noisy in the CoA. But I am not shure, it should be done in the locale symbol. Probably we should distinguish locale symbol and display symbol. IMHO that discussion should be done in bug 723145 or a new thread.
(In reply to yomlogs from comment #4) > My own use-case is a number of commodities (funds) where the symbol is > rather long and unwieldy, but must be stored in that way in order to work > with online price quote fetching. It would be preferable to see a shortened > (customised) version next to displayed amounts. > > This would appear to be a good use for the user symbol field. If this is > valid for currencies, why not any commodity type?: Same use case here, i have some funds with symbols ranging from 20 to 50 chars (in fact I had to use the entire fund name), and it is really really annoying in the UI
I've been wanting to review this patch a long time ago, but just didn't find the time to do so. Apologies for the delay. The patch is close to a full solution. It however only saves the user symbol if the user is editing an existing commodity, not when if the user specifies a user symbol while creating a new commodity. The fix for that is trivial, so I have made the necessary change before commiting your patch to maint. The improvement will appear in the next stable gnucash release (2.6.8). Thank you for your contribution and once again apologies for the long delay.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=724738. Please update any external references or bookmarks.