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 630286 - Please add handling code for GDate kvp values in SQL, too
Please add handling code for GDate kvp values in SQL, too
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Backend - SQL
git-master
Other All
: Normal normal
: ---
Assigned To: Phil Longstaff
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2010-09-21 19:33 UTC by Christian Stimming
Modified: 2018-06-29 22:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Stimming 2010-09-21 19:33:24 UTC
I've added a GDate kvp value in r18924 earlier this year, and I also added the XML serialization. However, I both forgot and was unable to implement the SQL in/output as well. This GDate kvp value is subsequently being used e.g. in the "posted-date" kvp_slot of a transaction, r18925, which is my attempt to finally fix bug#137017. However, this requires the correct serialization of that kvp value, which currently doesn't happen in the SQL backend. @Phil: Could you add a suitable serialization there? The GDate type in general is already being handled as CT_GDATE in gnc-backend-sql.c, so I guess this can't be too hard.#

An example file is in bug#627831 attachment#169522 [details] which contains one transaction with this "posted-date" slot. Currently, after saving to sqlite3 and again saving to XML the posted-date slot has disappeared because the GDate kvp value isn't being handled so far. Once it is implemented, I guess the transaction from that attachment will keep its posted-date slot. Thanks!
Comment 1 Phil Longstaff 2010-09-21 20:00:05 UTC
For testing, I have started to add test cases to:

1) create a session
2) store the session to sqlite3 file
3) create new session
4) load 2nd session from the sqlite3 file
5) compare all objects in session1/session2

For completeness, there should be all object types, kvp types, but I'm not there yet.  This will test some of this.
Comment 2 Phil Longstaff 2010-09-26 20:38:19 UTC
Turns out that sqlite has changed so that the way I used to modify a table to add a column no longer works.  Will require a bit more work than I thought of to fix this.  Still, not too hard.
Comment 3 Phil Longstaff 2010-10-10 22:22:25 UTC
r19647
Comment 4 John Ralls 2018-06-29 22:44:59 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=630286. Please update any external references or bookmarks.