GNOME Bugzilla – Bug 627831
KVP_TYPE_GLIST not implemented in sql backend.
Last modified: 2018-06-29 22:43:39 UTC
There was an error report on gnucash-de: http://lists.gnucash.org/pipermail/gnucash-de/2010-August/007448.html - Translation: "The online banking transaction templates seem to be not saved into sqlite3. In the XML file they are available just normal.!
That would concern the content of the kvp-frame /hbci/template-list, which is a GList of further kvp-frames.
Created attachment 169522 [details] Example gnucash file which contains some online banking template kvp slots The file contains a book kvp slot "hbci/template-list" which contains one such template online transfer. See the kvp slot structure around "The Name Of This Template". This needs to be saved in sqlite3 as well.
The manipulation (creating, deleting) of these slots need to be bracketed by calls to qof_book_begin_edit()/qof_book_commit_edit(). An alternative is to use the qof_book_set_string_option() API, though my memory of my quick look through some of the import code is that it actually navigates up/down the KVP tree. I could make these changes, but since I don't use hbci (or other import), I can't test them. @Christian, can you do this?
The problem isn't (only) the manipulation of these slots. I'm simply talking about converting an existing file into sqlite3. When I do this with the above file and convert back into XML (no manipulation at all so far), I see the book kvp slot "hbci/template-list" has disappeared completely. This should not happen.
Created attachment 170776 [details] The above XML file after "Save-As" as sqlite3 and subsequent Save-As as XML again.
Created attachment 170779 [details] Difference between old and new file. The hbci transaction list is missing (first hunk). Also, the posted-date slot in the transaction is missing (second hunk), but that's filed as another bug, bug#630286
(In reply to comment #4) > The manipulation (creating, deleting) of these slots need to be bracketed by > calls to qof_book_begin_edit()/qof_book_commit_edit(). Implemented in r19600, so this shouldn't be a problem anymore, if it ever was.
Just to repeat the original issue: The point of this report is that the hbci transaction list is missing (first hunk in comment#7 ). This is still an open issue.
I've worked out the problem and changed the summary to reflect what's wrong. I have a fix in progress, but it will take another day or two.
Created attachment 173240 [details] [review] Patch gnc-slots-sql.c to recurse into slot lists and frames when saving and restoring. Christian, Paul, please look this over. It's a bit complex, and it touches a bit more than I would have liked. It does pass Christian's test case on round trips, the only diffs being timezone differences.
*** Bug 632252 has been marked as a duplicate of this bug. ***
I've just checked in 19729, which implements recursion on KVP_TYPE_FRAME and KVP_TYPE_LIST. It successfully round trips both Christian's test file and one of my real-life files, except for a couple of unrelated issues (time zone differences between Christian and me in the first case and an element of split dates called tn:ns on my real file. Dunno what tn:ns is, but it doesn't appear that it's getting saved in the db.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=627831. Please update any external references or bookmarks.