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 760617 - Reduce the import options for invoices as CSV.
Reduce the import options for invoices as CSV.
Status: RESOLVED WONTFIX
Product: GnuCash
Classification: Other
Component: Import - CSV
git-maint
Other All
: Normal minor
: ---
Assigned To: Mike Evans
gnucash-import-maint
Depends on:
Blocks:
 
 
Reported: 2016-01-14 11:34 UTC by Mike Evans
Modified: 2018-06-29 23:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike Evans 2016-01-14 11:34:17 UTC
Currently there are 5 file-type import options for invoices and bills. I propose:
1. Getting rid of the custom regex option, as I don't believe anyone will ever use it.
2. Since the (with quotes) regexes now accept a more flexible field format the without quotes options are no longer needed so get rid of the less flexible options.

This will just leave either comma or semi-colon options.

3. Possibly add a tab delimited option.
Comment 1 Geert Janssens 2016-01-14 17:19:20 UTC
No strong opinion on 1.

I don't agree with 2. however:
I don't think with and without quotes options are equivalent and their choice depends on the input format of the user.

For example if you have a notes field like this
;Something called "Bla";

This can be imported with the without-quotes regex, but not with the with-quotes regex. For the latter you'd need

;"Something called ""Bla""";

Option 3 would be a nice improvement.
Comment 2 Mike Evans 2016-01-14 20:47:35 UTC
According to https://tools.ietf.org/html/rfc4180 point 2.5


   5.  Each field may or may not be enclosed in double quotes (however
       some programs, such as Microsoft Excel, do not use double quotes
       at all).  If fields are not enclosed with double quotes, then
       double quotes may not appear inside the fields.  For example:

       "aaa","bbb","ccc" CRLF
       zzz,yyy,xxx
Comment 3 Geert Janssens 2016-03-10 15:18:22 UTC
My apologies I didn't reply any more Mike. I apparently forgot about it.

Post-mortem, here's what I wanted to add in reply: your reference indeed shows that proper csv can't have the example I gave. On the other hand there are lots of dialects of csv. Forcing our users to pre-process their data to make it comply with the strict standard would be unfortunate if we can relatively easily offer more than one option to parse.

As a side note I'll add that I'm currently reworking our plain csv importer in c++. I may run into similar issues regarding quotes or not. I may change my mind if it would turn out to be too complicated to support both in the new code ;)
Comment 4 John Ralls 2018-06-29 23:46:23 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=760617. Please update any external references or bookmarks.