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 780889 - Split-register transactions result in invalid price:type "transaction"
Split-register transactions result in invalid price:type "transaction"
Status: RESOLVED NOTABUG
Product: GnuCash
Classification: Other
Component: Backend - XML
2.6.15
Other Linux
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2017-04-03 23:34 UTC by carlint
Modified: 2018-06-29 23:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description carlint 2017-04-03 23:34:22 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"
Comment 1 John Ralls 2017-04-04 04:19:35 UTC
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.
Comment 2 carlint 2017-04-04 22:04:40 UTC
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.
Comment 3 John Ralls 2017-04-05 00:40:00 UTC
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.
Comment 4 John Ralls 2018-06-29 23:55:46 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=780889. Please update any external references or bookmarks.