gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sun Aug 2 15:04:39 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/103a053e (commit)
via https://github.com/Gnucash/gnucash/commit/7c462836 (commit)
from https://github.com/Gnucash/gnucash/commit/efc34b24 (commit)
commit 103a053e89af7cba75088475466eaca47a083340
Merge: efc34b247 7c462836f
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Aug 2 11:58:50 2020 -0700
Merge Jean Laroche's '797730_matcher_match_many_to_one' into maint.
commit 7c462836f1a56ec621fabd524726b93d473d663b
Author: jean <you at example.com>
Date: Thu May 7 14:50:25 2020 -0700
Bug 797730 - Transaction matching can match multiple imported transactions to the same existing one
This is a simple solution to the conflict problem. It does not guarantee an optimal match (i.e. a match with
the best combined match score) but it removes conflicts and finds an acceptable solution. The idea is simple:
- Start with the first imported transaction,
- Find all other imported transations that conflict with it (i.e., want to match the same register transaction).
- Of all these conflicting transactions, find the one with the best match to the register transaction
and set it as the winner: it keeps its match, and all other transactions go to their next favorite match.
- If any conflict happened, start back from the top as new conflicts can arise when imported transactions
lose their top match and go to their second best one (if any).
This loop is guaranteed to terminate because every time we go to the top, we remove at least one match
from the sum of all matches.
A bit of cleanup, a few questions are unresolved
Bug 797730 - Transaction matching can match multiple imported transactions to the same existing one
This is a simple solution to the conflict problem. It does not guarantee an optimal match (i.e. a match with
the best combined match score) but it removes conflicts and finds an acceptable solution. The idea is simple:
- Start with the first imported transaction,
- Find all other imported transations that conflict with it (i.e., want to match the same register transaction).
- Of all these conflicting transactions, find the one with the best match to the register transaction
and set it as the winner: it keeps its match, and all other transactions go to their next favorite match.
- If any conflict happened, start back from the top as new conflicts can arise when imported transactions
lose their top match and go to their second best one (if any).
This loop is guaranteed to terminate because every time we go to the top, we remove at least one match
from the sum of all matches.
Summary of changes:
gnucash/import-export/import-backend.c | 16 +++
gnucash/import-export/import-backend.h | 3 +
gnucash/import-export/import-main-matcher.c | 153 ++++++++++++++++++++++++++++
3 files changed, 172 insertions(+)
More information about the gnucash-patches
mailing list