gnucash master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Wed Feb 22 08:46:08 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/8c0032ef (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b2703d8a (commit)
	from  https://github.com/Gnucash/gnucash/commit/7fbe4253 (commit)



commit 8c0032efc2ddf876f605cb6ece05e0f77ac63edb
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Feb 22 14:46:02 2023 +0100

    Bug 798691 - Memo field not updated on CSV import using U+C

diff --git a/gnucash/import-export/import-backend.cpp b/gnucash/import-export/import-backend.cpp
index b90a029f7..e4a81b8a6 100644
--- a/gnucash/import-export/import-backend.cpp
+++ b/gnucash/import-export/import-backend.cpp
@@ -946,6 +946,10 @@ gnc_import_process_trans_item (Account *base_acc,
                     }
                 }
 
+                auto fs_memo = xaccSplitGetMemo (trans_info->first_split);
+                if (fs_memo && *fs_memo)
+                    xaccSplitSetMemo(selected_match->split, fs_memo);
+
                 update_desc_and_notes(trans_info);
 
                 /*DEBUG("CommitEdit selected_match")*/

commit b2703d8a027945c8f6bf04e20fbba01be03112f0
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Feb 22 14:45:44 2023 +0100

    CsvTokenizer - add additional test case for escaped quotes
    
    It simulates the case where csv fields are fully quoted and an escaped
    quote ("") is found in some field. This case is handled correctly,
    adding the test to guard this in potential future modifications.

diff --git a/gnucash/import-export/csv-imp/test/test-tokenizer.cpp b/gnucash/import-export/csv-imp/test/test-tokenizer.cpp
index 2c6908239..aad18520e 100644
--- a/gnucash/import-export/csv-imp/test/test-tokenizer.cpp
+++ b/gnucash/import-export/csv-imp/test/test-tokenizer.cpp
@@ -178,6 +178,7 @@ static tokenize_csv_test_data comma_separated [] = {
         { "Test\\ with backslash,nextfield", 2, { "Test\\ with backslash","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
         { "Test with \\\" escaped quote,nextfield", 2, { "Test with \" escaped quote","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
         { "Test with \"\" escaped quote,nextfield", 2, { "Test with \" escaped quote","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
+        { "\"Test (quoted) with \"\" escaped quote\",\"nextfield\"", 2, { "Test (quoted) with \" escaped quote","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
         { "\"Unescaped quote test\",nextfield", 2, { "Unescaped quote test","nextfield",NULL,NULL,NULL,NULL,NULL,NULL } },
         { NULL, 0, { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } },
 };



Summary of changes:
 gnucash/import-export/csv-imp/test/test-tokenizer.cpp | 1 +
 gnucash/import-export/import-backend.cpp              | 4 ++++
 2 files changed, 5 insertions(+)



More information about the gnucash-changes mailing list