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 627831 - KVP_TYPE_GLIST not implemented in sql backend.
KVP_TYPE_GLIST not implemented in sql backend.
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Backend - SQL
git-master
Other All
: Normal critical
: ---
Assigned To: John Ralls
Chris Shoemaker
: 632252 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-08-24 11:35 UTC by Christian Stimming
Modified: 2018-06-29 22:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example gnucash file which contains some online banking template kvp slots (11.75 KB, text/plain)
2010-09-05 20:29 UTC, Christian Stimming
  Details
The above XML file after "Save-As" as sqlite3 and subsequent Save-As as XML again. (10.33 KB, text/plain)
2010-09-21 19:00 UTC, Christian Stimming
  Details
Difference between old and new file. (2.01 KB, text/plain)
2010-09-21 19:36 UTC, Christian Stimming
  Details
Patch gnc-slots-sql.c to recurse into slot lists and frames when saving and restoring. (13.49 KB, patch)
2010-10-25 23:56 UTC, John Ralls
needs-work Details | Review

Description Christian Stimming 2010-08-24 11:35:12 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.!
Comment 1 Christian Stimming 2010-08-24 11:37:33 UTC
That would concern the content of the kvp-frame /hbci/template-list, which is a GList of further kvp-frames.
Comment 2 Christian Stimming 2010-08-24 11:40:57 UTC
That would concern the content of the kvp-frame /hbci/template-list, which is a GList of further kvp-frames.
Comment 3 Christian Stimming 2010-09-05 20:29:42 UTC
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.
Comment 4 Phil Longstaff 2010-09-19 17:44:48 UTC
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?
Comment 5 Christian Stimming 2010-09-21 18:59:05 UTC
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.
Comment 6 Christian Stimming 2010-09-21 19:00:24 UTC
Created attachment 170776 [details]
The above XML file after "Save-As" as sqlite3 and subsequent Save-As as XML again.
Comment 7 Christian Stimming 2010-09-21 19:36:49 UTC
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
Comment 8 Christian Stimming 2010-09-21 19:38:17 UTC
(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.
Comment 9 Christian Stimming 2010-10-17 08:32:05 UTC
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.
Comment 10 John Ralls 2010-10-25 03:04:17 UTC
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.
Comment 11 John Ralls 2010-10-25 23:56:56 UTC
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.
Comment 12 John Ralls 2010-10-26 04:29:44 UTC
*** Bug 632252 has been marked as a duplicate of this bug. ***
Comment 13 John Ralls 2010-10-29 22:26:02 UTC
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.
Comment 14 John Ralls 2018-06-29 22:43:39 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=627831. Please update any external references or bookmarks.