[PR #6240] Fix merging split transactions #13458

Closed
opened 2026-04-10 21:54:37 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6240

State: closed
Merged: Yes


Fixes https://github.com/actualbudget/actual/issues/5781

This resolves the lint and testing issues identified in https://github.com/actualbudget/actual/pull/5856, which was closed for inactivity. The following description is taken from that PR:

Changes

  • Modified mergeTransactions to load subtransactions for both transactions being merged
  • When the kept transaction doesn't have splits but the dropped one does, transfer all subtransactions by updating their parent_id
  • Mark the kept transaction as is_parent and clear its category (parent transactions with splits shouldn't have a direct category)
  • Added comprehensive test covering this scenario

Test Plan

Added test preserves split categories when merging split transaction with uncategorized imported transaction which:

  • Creates a manual parent transaction with 2 subtransactions (different categories)
  • Creates an imported transaction without splits
  • Merges them
  • Verifies subtransactions are transferred with correct parent_id
  • Verifies no orphaned subtransactions remain
**Original Pull Request:** https://github.com/actualbudget/actual/pull/6240 **State:** closed **Merged:** Yes --- Fixes https://github.com/actualbudget/actual/issues/5781 This resolves the lint and testing issues identified in https://github.com/actualbudget/actual/pull/5856, which was closed for inactivity. The following description is taken from that PR: ## Changes - Modified mergeTransactions to load subtransactions for both transactions being merged - When the kept transaction doesn't have splits but the dropped one does, transfer all subtransactions by updating their parent_id - Mark the kept transaction as is_parent and clear its category (parent transactions with splits shouldn't have a direct category) - Added comprehensive test covering this scenario ## Test Plan Added test preserves split categories when merging split transaction with uncategorized imported transaction which: - Creates a manual parent transaction with 2 subtransactions (different categories) - Creates an imported transaction without splits - Merges them - Verifies subtransactions are transferred with correct parent_id - Verifies no orphaned subtransactions remain
GiteaMirror added the pull-request label 2026-04-10 21:54:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#13458