Skip to content

Fix recurring transactions dropping months on edit - #48

Merged
polius merged 1 commit into
mainfrom
fix/recurring-transactions
Sep 11, 2026
Merged

polius merged 1 commit into
mainfrom
fix/recurring-transactions

Conversation

@polius

@polius polius commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes three bugs in recurring transaction handling:

  • Bug A: editing endDate/frequency updated the template but never regenerated transactions, so months past the original end date were silently missing. update_transactions_from_recurring now deletes the affected range and regenerates from the template.
  • Bug B: monthly/yearly occurrences drifted to lower days (31st stuck on 28th after February) because dates were accumulated. Now advances from the start anchor (start + n periods) to re-anchor the original day each iteration.
  • Bug C: future/past boundary is strictly greater-than today consistently, so a transaction dated today is never overwritten.

Testing

Verified the router functions against an in-memory DB:

  • monthly 31st re-anchors (Jan 31 → Feb 28 → Mar 31), no drift
  • extending endDate/frequency change regenerates transactions without duplicates
  • today's transaction untouched in future mode; past preserved, future rebuilt; all mode rebuilds everything

Bug A: editing endDate/frequency updated the template but never regenerated the transactions, so months past the original end date were silently missing. update_transactions_from_recurring now deletes the affected range and regenerates from the template.

Bug B: monthly/yearly occurrences drifted to lower days (31st stuck on 28th after February) because dates were accumulated. Advance from the start anchor (start + n periods) to re-anchor the original day each iteration.

Bug C: make the future/past boundary strictly greater-than today consistently so a transaction dated today is never overwritten.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@polius polius added the bug Something isn't working label Sep 11, 2026
@polius
polius merged commit 5e9a371 into main Sep 11, 2026
3 checks passed
@polius
polius deleted the fix/recurring-transactions branch September 11, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant