Fix duplicate bill suggestions after renaming a bill
Merged
JO
1mo ago+84+84+01234567890123456789-9-9-0123456789
Fixes #3591.
Bills were matched to their bank transactions by the editable name field. Renaming a bill changed that field, so the detector found no existing series and suggested the same bill again.
This change stores the name the detector matched on in matcher_hints["detected_name"] and matches on it via a new RecurringTransaction#matcher_name, falling back to name for older rows. Bills created by the detector and by create_from_transaction record that name.
Limitation: bills renamed before this change have no stored detected name, so they still need to be re-linked or backfilled.
Summary by CodeRabbit
- Improvements
- Recurring bills continue matching transactions by their originally detected name after you rename them, including bills that had no stored detected name before renaming.
- Bills created from transactions without a merchant name can use the detected transaction name for matching.
- Suggested recurring transactions and income sources use detected names for name-based matching, helping existing series match transactions and preventing duplicate suggestions.