From d37622162af016373418d881815e8e39fe03a96d Mon Sep 17 00:00:00 2001 From: yoyotogblo <31814048+yoyotogblo@users.noreply.github.com> Date: Sat, 3 Feb 2024 13:08:45 -0500 Subject: [PATCH 1/2] Change lookback and look forward time range when fuzzy matching (#2300) Change to 7 days prior and after for imported transactions when fuzzy matching --- packages/loot-core/src/server/accounts/sync.ts | 12 ++++++------ upcoming-release-notes/2300.md | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 upcoming-release-notes/2300.md diff --git a/packages/loot-core/src/server/accounts/sync.ts b/packages/loot-core/src/server/accounts/sync.ts index c394f7f8c1f..ccf2d09aba7 100644 --- a/packages/loot-core/src/server/accounts/sync.ts +++ b/packages/loot-core/src/server/accounts/sync.ts @@ -468,7 +468,7 @@ export async function reconcileExternalTransactions(acctId, transactions) { // If it didn't match, query data needed for fuzzy matching if (!match) { - // Look 1 day ahead and 4 days back when fuzzy matching. This + // Look 7 days ahead and 7 days back when fuzzy matching. This // needs to select all fields that need to be read from the // matched transaction. See the final pass below for the needed // fields. @@ -476,8 +476,8 @@ export async function reconcileExternalTransactions(acctId, transactions) { `SELECT id, is_parent, date, imported_id, payee, category, notes, reconciled FROM v_transactions WHERE date >= ? AND date <= ? AND amount = ? AND account = ?`, [ - db.toDateRepr(monthUtils.subDays(trans.date, 4)), - db.toDateRepr(monthUtils.addDays(trans.date, 1)), + db.toDateRepr(monthUtils.subDays(trans.date, 7)), + db.toDateRepr(monthUtils.addDays(trans.date, 7)), trans.amount || 0, acctId, ], @@ -631,7 +631,7 @@ export async function reconcileTransactions(acctId, transactions) { // If it didn't match, query data needed for fuzzy matching if (!match) { - // Look 1 day ahead and 4 days back when fuzzy matching. This + // Look 7 days ahead and 7 days back when fuzzy matching. This // needs to select all fields that need to be read from the // matched transaction. See the final pass below for the needed // fields. @@ -639,8 +639,8 @@ export async function reconcileTransactions(acctId, transactions) { `SELECT id, is_parent, date, imported_id, payee, category, notes, reconciled FROM v_transactions WHERE date >= ? AND date <= ? AND amount = ? AND account = ?`, [ - db.toDateRepr(monthUtils.subDays(trans.date, 4)), - db.toDateRepr(monthUtils.addDays(trans.date, 1)), + db.toDateRepr(monthUtils.subDays(trans.date, 7)), + db.toDateRepr(monthUtils.addDays(trans.date, 7)), trans.amount || 0, acctId, ], diff --git a/upcoming-release-notes/2300.md b/upcoming-release-notes/2300.md new file mode 100644 index 00000000000..95017eaf169 --- /dev/null +++ b/upcoming-release-notes/2300.md @@ -0,0 +1,6 @@ +--- +category: Enhancements +authors: [yoyotogblo] +--- + +Change lookback and look forward time range when fuzzy matching From a5ab1a8fae14b830dad49a3f13f0fedf2551243b Mon Sep 17 00:00:00 2001 From: Julian Dominguez-Schatz Date: Sat, 3 Feb 2024 13:16:15 -0500 Subject: [PATCH 2/2] Re-open autocomplete dropdown on change (#2325) * Re-open autocomplete dropdown on change * Add release notes with new PR ID --- .../src/components/autocomplete/Autocomplete.tsx | 1 + upcoming-release-notes/2325.md | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 upcoming-release-notes/2325.md diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx index 9938b6f051e..0e923d8d4b1 100644 --- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx @@ -359,6 +359,7 @@ function SingleAutocomplete({ setValue(value); setIsChanged(true); + setIsOpen(true); }} onStateChange={changes => { if ( diff --git a/upcoming-release-notes/2325.md b/upcoming-release-notes/2325.md new file mode 100644 index 00000000000..9868fd0eba9 --- /dev/null +++ b/upcoming-release-notes/2325.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [jfdoming] +--- + +Re-open autocomplete dropdown on change