gnucash maint: Populate and display the match list in the CSV Importer.
John Ralls
jralls at code.gnucash.org
Sun Sep 13 19:35:16 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/53619f43 (commit)
from https://github.com/Gnucash/gnucash/commit/d4fe5841 (commit)
commit 53619f4300fd5f3239cc5247dadf39de29958b66
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Sep 13 16:33:44 2020 -0700
Populate and display the match list in the CSV Importer.
Also fix a crash when the imported split doesn't have an online id
as is the case for all non-OFX imports.
diff --git a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
index 19ee0ad77..aadd5b4f5 100644
--- a/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
+++ b/gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp
@@ -2084,6 +2084,8 @@ CsvImpTransAssist::assist_match_page_prepare ()
draft_trans->trans = nullptr;
}
}
+ /* Show the matcher dialog */
+// gnc_gen_trans_list_show_all (gnc_csv_importer_gui);
}
diff --git a/gnucash/import-export/import-backend.c b/gnucash/import-export/import-backend.c
index 6cffb9080..df9410999 100644
--- a/gnucash/import-export/import-backend.c
+++ b/gnucash/import-export/import-backend.c
@@ -1122,6 +1122,10 @@ gboolean gnc_import_exists_online_id (Transaction *trans, GHashTable* acct_id_ha
/* Look for an online_id in the first split */
source_split = xaccTransGetSplit(trans, 0);
g_assert(source_split);
+
+ // No online id, no point in continuing. We'd crash if we tried.
+ if (!gnc_import_get_split_online_id (source_split))
+ return FALSE;
// Create a hash per account of a hash of all transactions IDs. Then the test below will be fast if
// we have many transactions to import.
dest_acct = xaccSplitGetAccount (source_split);
Summary of changes:
gnucash/import-export/csv-imp/assistant-csv-trans-import.cpp | 2 ++
gnucash/import-export/import-backend.c | 4 ++++
2 files changed, 6 insertions(+)
More information about the gnucash-changes
mailing list