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 792833 - User specifies source of 'num' field'; either transaction number or split action (requires at least GnuCash 2.5.0)
User specifies source of 'num' field'; either transaction number or split act...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
2.7.x
Other Linux
: Normal normal
: ---
Assigned To: gnucash-general-maint
gnucash-general-maint
: 793626 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2018-01-23 16:34 UTC by Laurent Bigonville
Modified: 2018-06-30 00:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple test file created with current maint HEAD gnucash (228.00 KB, application/x-sqlite3)
2018-01-31 10:58 UTC, Geert Janssens
Details

Description Laurent Bigonville 2018-01-23 16:34:02 UTC
Hi,

I just updated from 2.6.18 to 2.7.3 and when opening my accounts, I got the following error:

"User specifies source of 'num' field'; either transaction number or split action (requires at least GnuCash 2.5.0)"
Comment 1 Geert Janssens 2018-01-31 09:35:42 UTC
Thank you for your report.

Unfortunately I can't reproduce this, so we'll need more details.

1. Did you effectively set the "Use Split Action Field for Number" in File->Properties ?

2. What file format is your book ? XML, Sqlite, (My/Postgre)SQL ?

3. Is there anything in the gnucash trace file after you try to open your books in 2.7.3 ? http://wiki.gnucash.org/wiki/Tracefile explains where you can find the trace file.
Comment 2 Laurent Bigonville 2018-01-31 10:03:02 UTC
Hi,

1) IIRC yes I selected that option at the creation of the file

2) SQLite

3) I'm not seeing anything suppositious at 1st sight

(I'm using fr_BE.UTF-8 is that matters)
Comment 3 Geert Janssens 2018-01-31 10:55:44 UTC
(In reply to Laurent Bigonville from comment #2)
> Hi,
> 
> 1) IIRC yes I selected that option at the creation of the file
> 
> 2) SQLite

Thanks, that's what I needed to reproduce. Next is to find a solution...

For the other developers: it appears the feature flags are recursive slots. The first slot is named "features" and holds a reference to the child slot. The child slot is named "/Number Field Source" (not the initial /) and stores the description displayed to the user.

I think the preceding slash is causing trouble in 2.7.x, while in 2.6.18 this is filtered out just fine. I suspect this bug got introduced in the code to flatten kvp.
Comment 4 Geert Janssens 2018-01-31 10:58:35 UTC
Created attachment 367683 [details]
Simple test file created with current maint HEAD gnucash

The attached file can be used to reproduce this issue. I created this file from a gnucash build I generated from today's maint branch (so somewhere between 2.6.19 and 2.6.20 still to be released).
Comment 5 John Ralls 2018-02-20 05:32:21 UTC
*** Bug 793626 has been marked as a duplicate of this bug. ***
Comment 6 John Ralls 2018-02-20 20:07:35 UTC
Excellent detective work leads to a simple fix. Thanks, Geert!

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 7 Laurent Bigonville 2018-04-08 22:47:17 UTC
Hi,

Are you sure it's fixed in 3.0?

I get same error with that version
Comment 8 Geert Janssens 2018-04-10 07:56:31 UTC
It should be fixed, however only for books that were never saved with gnucash 2.7.x. Did you try 2.7.x on a copy of your data file only or on your original file ?
Note that since your book is in sqlite format gnucash will automatically save any changes, including updating feature codes.

What does the following sqlite query return for your book:
select * from slots where name like '%Number Field%'

You will need to execute this query in some sqlite client on your book. Gnucash itself doesn't allow direct query input.
Comment 9 Laurent Bigonville 2018-04-10 08:31:56 UTC
sqlite> select * from slots where name like '%Number Field%';
1269|cf727f41e1484c8193b7a43835d2bcf4|/Number Field Source|4|0|User specifies source of 'num' field'; either transaction number or split action (requires at least GnuCash 2.5.0)||1970-01-01 00:00:00||0|1|
Comment 10 Geert Janssens 2018-04-10 09:47:04 UTC
Thanks. That confirms your database was modified by one of the 2.7 test instances.

The solution in this case depends on whether you have indeed enabled the option to swap transaction number and split action.

If you do, change the name field to read
features/Number Field Source

Otherwise drop the '/Number Field Source' record.

If you're unsure, you can drop the record anyway and reset the option in gnucash to your preference. The feature only affects presentation of the data, not the storage format.

Does this fix it for you ?
Comment 11 Laurent Bigonville 2018-04-11 16:21:47 UTC
OK it works for me here.

But that's far from being user friendly, wouldn't potentially other people be impacted by this?
Comment 12 Geert Janssens 2018-04-11 17:54:10 UTC
Glad that worked for you.

As for the impact, it will only happen to users that opened their production data file with a beta version of gnucash instead of on a copy of it. I believe we did warn about that elaborately with each release.
Comment 13 John Ralls 2018-06-30 00:03:38 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=792833. Please update any external references or bookmarks.