From 982a31cff04375b885eb3ff6feb18770271b2ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoit=20Gr=C3=A9goire?= Date: Sat, 11 Jan 2003 19:44:28 +0000 Subject: [PATCH] =?UTF-8?q?2002-1-6=20=20Benoit=20Gr=EF=BF=BDgoire=20=20=20=09*=20src/import-export/import-backend.?= =?UTF-8?q?c:=20Fixed=20the=20date=20heuristics=20modifications,=20which?= =?UTF-8?q?=20had=20an=20unfortunate=20interaction=20with=20old=20debuggin?= =?UTF-8?q?g=20code,=20causing=20the=20score=20to=20be=20reversed,=20and?= =?UTF-8?q?=20making=20the=20matcher=20mostly=20unusable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7808 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 3 +++ src/import-export/import-backend.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index de170d48ab..a66ce8ff50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2002-1-6 Benoit Grégoire + * src/import-export/import-backend.c: Fixed the date heuristics modifications, which had an unfortunate interaction with old debugging code, causing the score to be reversed, and making the matcher mostly unusable. + 2003-01-09 Derek Atkins * src/register/ledger-core/split-register-model.c: diff --git a/src/import-export/import-backend.c b/src/import-export/import-backend.c index d68c42c5e7..5bdb05718f 100644 --- a/src/import-export/import-backend.c +++ b/src/import-export/import-backend.c @@ -478,19 +478,19 @@ static void split_find_match (GNCImportTransInfo * trans_info, if (datediff_day == 0) { prob = prob+3; - /*DEBUG("heuristics: probability + 3 (date)");*/ + DEBUG("heuristics: probability + 3 (date)"); } else if (datediff_day <= MATCH_DATE_THRESHOLD) { prob = prob+2; - /*DEBUG("heuristics: probability + 2 (date)");*/ + DEBUG("heuristics: probability + 2 (date)"); } else if (datediff_day > MATCH_DATE_NOT_THRESHOLD) { /* Extra penalty if that split lies awfully far away from the given one. */ prob = prob-10; - /* DEBUG("heuristics: probability - 10 (date)"); */ + DEBUG("heuristics: probability - 10 (date)"); } @@ -545,8 +545,8 @@ static void split_find_match (GNCImportTransInfo * trans_info, (strlen(gnc_import_get_trans_online_id(xaccSplitGetParent(split)))>0)) { /* If the pref is to show match even with online ID's, - reverse the confidence value to distinguish them */ - prob = 0-prob; + puninsh the transaction with online if */ + prob = prob-3; } /* Is the probability high enough? Otherwise do nothing and return. */