GNOME Bugzilla – Bug 780889
Split-register transactions result in invalid price:type "transaction"
Last modified: 2018-06-29 23:55:46 UTC
When validating GNUCASH XML against the schema, I saw a number of errors in the data with a consistent pattern: <price> <price:id type="guid">deadbeef3c30471f767e815bc2419e00</price:id> <price:commodity> <cmdty:space>NYSE</cmdty:space> <cmdty:id>XOM</cmdty:id> </price:commodity> <price:currency> <cmdty:space>ISO4217</cmdty:space> <cmdty:id>USD</cmdty:id> </price:currency> <price:time> <ts:date>2016-12-09 00:00:00 -0500</ts:date> </price:time> <price:source>user:split-register</price:source> <price:type>transaction</price:type> <price:value>83133648/1000000</price:value> </price> error: character content of element "price:type" invalid; must be equal to "ask", "bid", "last", "nav" or "unknown" I'm unclear about the root cause but it does seem to reoccur on a consistent basis Workaround: Use the Price editor to correct the price:type from "transaction" to "last"
Thanks for noticing, but the schema isn't normative. From src/doc/xml/README: "WARNING: Please be aware that these files are informative only. GnuCash doesn't use them in any way. Their only function is to document (parts of) the xml data format's internals." I've added transaction to the schema anyway.
If you bring up the specific price in the Price Editor, it does not allow "Transaction" in the Type dropdown. That would also need to be updated also.
No, that's intentional. A 'transaction' price is one created from entering or editing a transaction in a register. Ideally if you edit the price in the price editor it would force you to pick one of the other categories, but there's a limit to how much we can prevent users from doing stupid things without bogging the program down.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=780889. Please update any external references or bookmarks.