Interesting behavior (potential bug) here. If the memo is the empty
string, then this heuristic always gives a +1. This explains the reason
that I'm seeing 4 and 6 instead of 3 and 5. My memo is the empty string
and the imported memo is "Check". Half of 0 is 0 and so zero characters
are compared and that results in equal.
else if ((strncasecmp(memo, xaccSplitGetMemo(split),
strlen(xaccSplitGetMemo(split)) / 2) == 0)) {
...
prob = prob + 1;
}
On Mon, 2026-02-23 at 07:32 -0600, Jon Schewe via gnucash-user wrote:
> Quick update this morning before I goto the office.
>
> I got a debug build created and added some additional logging and
> fixed
> the compilation errors with the current debug lines (need %lld
> instead
> of %d when printing the date diff).
>
> For the check that cleared on 2/12 I want to match against 2/4.
> The debug logs show that both the check on 2/18 and 2/4 were added to
> the list of possible matches. However the display dialog is only
> showing me the 2/18 check. Seems that something is getting lost
> between
> split_find_match and the dialog display.
>
>
> On Mon, 2026-02-23 at 05:58 -0600, Jon Schewe via gnucash-user wrote:
> > I thought about that transaction being blocked, however hte
> > transaction
> > that I want shows up when I check the next next transaction.
> > I'm having some trouble figuring out how GnuCash is computing some
> > probabilities as I'm getting numbers that don't quite line up.
> >
> > Here's more information in hopes that someone recognizes it. I'll
> > see
> > about getting a debug version built. It's unfortunate that there
> > isn't
> > a way to turn on the debugging at runtime without a full rebuild.
> >
> > Looking at split_find_match:
> >
> > The amount always matches, so that's +3
> > The date never matches, but is either under the threshold or not
> > (never
> > outside the excluded threshold), so that's +2 or 0
> > The number never matches, so that's 0. Although it might be -2 if
> > somehow the bank side has something in the number field (I don't
> > see
> > it
> > in the OFX file)
> > The memo never matches, so that should be 0.
> > Same for the description, 0
> >
> > Given that I expect to see a 5 or a 3. I'm getting 6 and 4.
> >
> > Here's my check information:
> > Check date -> cleared bank
> > 1068 1/14 -> 1/22
> > 1069 1/21 -> 1/29
> > 1071 1/28 -> 2/5
> > 1072 2/4 -> 2/12
> > 1073 2/18 -> not cleared
> >
> > With options:
> > display threshold 0
> > auto-add 3
> > auto-clear 6
> > likely match: 4
> > unlikely match 28
> >
> > Check that cleared 1/29 was actually written on 1/21
> > GnuCash presents me with:
> > 1/28 - 6
> > 1/21 - 4 -> this didn't happen yesterday, I've selected it as a
> > match
> > now
> > 2/4 - 4
> > 2/18 - 4
> >
> > Check that cleared 1/22, written 1/14
> > 1/21 - 6
> > 1/28 - 4
> > 2/4 - 4
> > 2/18 - 4
> >
> > Why didn't 1/14 come up as an option? Also how did I get 6 and 4
> > instead of 5 and 3?
> >
> > Check that cleared 2/5, written 1/28
> > 2/3 - 6
> > 1/21 - 4
> > 1/28 - 4 - manually selected
> > 2/18 - 4
> >
> > Check that cleared 2/12, written 2/4
> > 2/28 - 4
> >
> > Why not the other matches?
> >
> > As expected when I open up the same OFX file again, the checks that
> > I
> > just manually assigned are no longer presented.
> >
> > Given that the behavior changed from yesterday to today, I'm
> > wondering
> > if there is something about the current date in there? Or maybe
> > closing
> > GnuCash and opening it matters?
> >
> >
> > On Sun, 2026-02-22 at 21:21 -0800, John Ralls wrote:
> > > Maybe something else is blocking that transaction. Most likely
> > > would
> > > be that you (inadvertently) matched it already: That sets a field
> > > on
> > > the split in that account with the FITID from the import it
> > > matched
> > > with and if it’s set it’s excluded from being matched again.
> > > Unlikely
> > > but worth mentioning is that transactions being edited are also
> > > excluded.
> > >
> > > If you’re willing to build GnuCash yourself you can un-comment
> > > the
> > > DEBUG statements in split_find_match and recompile, then run
> > > gnucash
> > > with —log gnc.import=debug. That will dump a ton of detail into
> > > the
> > > trace file where you should find the reason that transaction
> > > doesn’t
> > > match.
> > >
> > > Regards,
> > > John Ralls
> > >
> > > > On Feb 22, 2026, at 12:44, Jon Schewe <[email protected]> wrote:
> > > >
> > > >
> > > > Thank you, that's exactly what I'm looking for. I see that all
> > > > I
> > > > need to do is to double click on it and I've got exactly what I
> > > > wanted.
> > > >
> > > > However it appears to be skipping over some transactions and I
> > > > don't understand why.
> > > > I have a check that cleared the bank on 1/22. The check was
> > > > written
> > > > on 1/14 and has that date in GnuCash.
> > > > GnuCash is showing 4 possible transactions (all with the same
> > > > value):
> > > > 1/21 - 6
> > > > 1/28 - 6
> > > > 2/4 - 6
> > > > 2/18 - 4
> > > >
> > > > However it's not showing me the transaction on 1/14 as an
> > > > option.
> > > > Why is this transaction skipped? They are all for the same
> > > > amount.
> > > > I even tried changing the match display threshold to be 0 and
> > > > it
> > > > still doesn't come up.
> > > > I'm experimenting with values. I currently have display
> > > > threshold
> > > > set to 0, auto-add set to 3, auto-clear set to 5, likely match
> > > > set
> > > > to 14, unlikely match set to 28.
> > > > The day difference between 1/14 and 1/22 is 8 days, so I would
> > > > think the likely match set to 14 and the unlikely match set to
> > > > 28
> > > > would be reasonable. Unless the date thresholds are all +/-
> > > > half
> > > > what is in the dialog, but I don't think that's the case.
> > > > I tried doubling the dates to likely 28 and unlikely to 52 and
> > > > no
> > > > change to the list of possible transactions.
> > > >
> > > > Now that I see the dialog, of course I see something I'd like
> > > > added. That's to have the transaction number show up in the
> > > > match
> > > > view.
> > > >
> > > > On Sun, 2026-02-22 at 08:49 -0800, John Ralls wrote:
> > > > > GnuCash already does that,
> > > > >
> > > >
> > > see
> > > https://code.gnucash.org/docs/C/gnucash-manual/trans-
> > > import.html#trans_match_picker
> > > > > . Button1 in that paragraph means mouse button 1, normally
> > > > > the
> > > > > left one (or the only one on Mac one-button mice). While that
> > > > > doc
> > > > > says that it works for Clear I checked the code (gnc-main-
> > > > > matcher.cpp line 797) and it works for both C and U+C.
> > > > >
> > > > > Regards,
> > > > > John Ralls
> > > > >
> > > > >
> > > > > > On Feb 22, 2026, at 07:21, Paul Kroitor <[email protected]>
> > > > > > wrote:
> > > > > >
> > > > > > That idea, of a "choose alternate match" in the context
> > > > > > menu
> > > > > > of
> > > > > > the (various) import windows is great! I second the motion.
> > > > > > But
> > > > > > it's hardly a trivial change. Maybe add it to the requested
> > > > > > features?
> > > > > >
> > > > > > Paul
> > > > > >
> > > > > > On 2026-02-22 10:04 a.m., Jon Schewe via gnucash-user
> > > > > > wrote:
> > > > > > > Thank you for the code reference and the explanation. I'm
> > > > > > > a
> > > > > > > software
> > > > > > > developer, so that helps me a lot.
> > > > > > >
> > > > > > > The check number is coming through, so I'm only matching
> > > > > > > on
> > > > > > > date and
> > > > > > > amount. I could try getting the bank to add the check
> > > > > > > information to
> > > > > > > their QFX export, but that seems like an exercise in
> > > > > > > futility.
> > > > > > >
> > > > > > > Is there a way to have GnuCash present me with multiple
> > > > > > > options for
> > > > > > > matches rather than the most likely match only?
> > > > > > >
> > > > > > > I've got the following settings in Preferences -> Import
> > > > > > >
> > > > > > > Enable skip transaction action: yes
> > > > > > > enable update match action: no
> > > > > > > Use basesian matching: yes
> > > > > > > Match display threshold: 2
> > > > > > > auto-add threshold: 3
> > > > > > > auto-clear threshold: 6
> > > > > > > likely match day threshold: 8
> > > > > > > unlikely match day threshold: 21
> > > > > > > commercial ATM fees threshold: 2
> > > > > > > automatically create new commodities: no
> > > > > > >
> > > > > > > QIF import
> > > > > > > Show documentation: yes
> > > > > > > Not cleared: selected
> > > > > > >
> > > > > > >
> > > > > > > On Sat, 2026-02-21 at 22:08 +0800, Christopher Lam wrote:
> > > > > > > > Hi, having multiple checks for the same amount but
> > > > > > > > different dates
> > > > > > > > and check number seems like a headache for any manual
> > > > > > > > or
> > > > > > > > automated
> > > > > > > > matcher.
> > > > > > > > Here's the algorithm as originally written since 2002
> > > > > > > > (23
> > > > > > > > years ago!)
> > > > > > > >
> > > >
> > > https://github.com/Gnucash/gnucash/blob/6983adb14a389c13f828bae4f
> > > 485b4748a8ead24/gnucash/import-export/import-backend.cpp#L579
> > > > > > > > Note the following scoring system:
> > > > > > > > - identical amounts get +3, otherwise -2 or -5
> > > > > > > > - identical dates get +3, otherwise +2, 0 or -5
> > > > > > > > - identical trans->num get +4, otherwise -2, or 0
> > > > > > > > - etc.
> > > > > > > >
> > > > > > > > Thus, an exact identical match in trans->num gets a
> > > > > > > > relatively strong
> > > > > > > > score; you may need to check if the QFX/OFX sets it to
> > > > > > > > the
> > > > > > > > check
> > > > > > > > number. You may want to adjust the date thresholds in
> > > > > > > > the
> > > > > > > > global
> > > > > > > > preference.
> > > > > > > >
> > > > > > > > On Sat, 21 Feb 2026 at 10:43, Jon Schewe via gnucash-
> > > > > > > > user
> > > > > > > > <[email protected]> wrote:
> > > > > > > > > I'm running into an issue when importing QFX files
> > > > > > > > > and
> > > > > > > > > matching
> > > > > > > > > transactions. Every week I write a check for the same
> > > > > > > > > amount.
> > > > > > > > > However
> > > > > > > > > the check doesn't clear the bank for a week or two.
> > > > > > > > > When
> > > > > > > > > I import
> > > > > > > > > my
> > > > > > > > > QFX file GnuCash wants to match the most recent check
> > > > > > > > > rather than
> > > > > > > > > the
> > > > > > > > > one 2 weeks back. Does anyone have a solution for
> > > > > > > > > allowing multiple
> > > > > > > > > matches to show up in the import dialog so that I can
> > > > > > > > > select the
> > > > > > > > > proper
> > > > > > > > > check?
> > > > > > > > >
> > > > > > > > > Also, is there a way for the check number to be
> > > > > > > > > visible
> > > > > > > > > in the
> > > > > > > > > import
> > > > > > > > > dialog?
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > > Jon
> > > > > > > > >
> > > > > > > > > _______________________________________________
> > > > > > > > > gnucash-user mailing list
> > > > > > > > > [email protected]
> > > > > > > > > To update your subscription preferences or to
> > > > > > > > > unsubscribe:
> > > > > > > > > https://lists.gnucash.org/mailman/listinfo/gnucash-
> > > > > > > > > user
> > > > > > > > > -----
> > > > > > > > > Please remember to CC this list on all your replies.
> > > > > > > > > You can do this by using Reply-To-List or Reply-All.
> > > > > > > _______________________________________________
> > > > > > > gnucash-user mailing list
> > > > > > > [email protected]
> > > > > > > To update your subscription preferences or to
> > > > > > > unsubscribe:
> > > > > > > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > > > > > > -----
> > > > > > > Please remember to CC this list on all your replies.
> > > > > > > You can do this by using Reply-To-List or Reply-All.
> > > > > > _______________________________________________
> > > > > > gnucash-user mailing list
> > > > > > [email protected]
> > > > > > To update your subscription preferences or to unsubscribe:
> > > > > > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > > > > > -----
> > > > > > Please remember to CC this list on all your replies.
> > > > > > You can do this by using Reply-To-List or Reply-All.
> > > > >
> > > > > _______________________________________________
> > > > > gnucash-user mailing list
> > > > > [email protected]
> > > > > To update your subscription preferences or to unsubscribe:
> > > > > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > > > > -----
> > > > > Please remember to CC this list on all your replies.
> > > > > You can do this by using Reply-To-List or Reply-All.
> > >
> >
> > _______________________________________________
> > gnucash-user mailing list
> > [email protected]
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > -----
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
> _______________________________________________
> gnucash-user mailing list
> [email protected]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
_______________________________________________
gnucash-user mailing list
[email protected]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.